-
实验3
任务1 源代码 button.hpp 点击查看代码 #pragma once #include <iostream> #include <string> class Button { public: Button(const std::string &label); const std::strin -
实验3
实验任务1 一、代码 1. button.hpp #pragma once #include <iostream> #include <string> class Button { public: Button(const std::string &label); const std::string -
实验3
任务1 代码: 1 #pragma once 2 #include <iostream> 3 #include <string> 4 5 class Button { 6 public: 7 Button(const std::string &label); 8 const std::string& -
高级语言程序设计第六次作业
这个作业属于哪个课程:https://edu.cnblogs.com/campus/fzu/2026gjyycxsj/ 这个作业要求在哪里: https://edu.cnblogs.com/campus/fzu/2026gjyycxsj/homework/16752 学号:0102600232 姓名 -
高级语言程序设计第七次作业
这个作业属于哪个课程:https://edu.cnblogs.com/campus/fzu/2026gjyycxsj/ 这个作业要求在哪里: https://edu.cnblogs.com/campus/fzu/2026gjyycxsj/homework/16753 学号:<102400216> 姓 -
实验3
实验任务1 源代码 点击查看代码 #pragma once #include <iostream> #include <string> class Button { public: Button(const std::string &label); const std::string& get_la -
实验3 类和对象_基础编程2
面向对象程序设计 实验3 实验任务一 源码以及运行测试截图 button.hpp #pragma once #include <iostream> #include <string> class Button { public: Button(const std::string &label); c -
实验3
实验任务1 源代码 button.hpp 点击查看代码 #pragma once #include <iostream> #include <string> class Button { public: Button(const std::string &label); const std::str -
20242328 2026-2027-1 《网络与系统攻防技术》实验5实验报告
20242328 2026-2027-1 《网络与系统攻防技术》实验5实验报告 实验名称:信息搜集技术实践 实验环境:Kali Linux(VMware 虚拟机)、Windows 物理机(靶机 192.168.231.1) 实验时间:2026-11-23 1. 基础知识 信息搜集的两种方式:被动搜集 -
第四章作业
贪心策略 从左到右扫描当前数字串: 找到第一个满足 s i>s i+1 的位置,删除 s i ;如果整个串非递减,即 s 1 ≤ s 2 ≤⋯≤ s m ,则删除最后一个数字;重复上述过程 k 次。 更高效的实现使用单调栈: 遍历每个数字;当还可以删除数字,且栈顶数字大于当前数字时,弹出栈顶,表示删 -
实验3
task1 源代码 button.hpp #pragma once #include <iostream> #include <string> class Button { public: Button(const std::string &label); const std::string& ge -
算法第四章作业
一、删数问题分析 问题本质 给定一个n位正整数a,删除其中k个数字,剩下数字按原次序组成新数,要求新数最小。等价于:从原数字串中保留n-k个数字,使得到的子序列字典序最小,最后去掉前导零。由于数字的高位权重大,因此应尽量让靠前的数字小。 贪心策略 从左向右扫描当前数字串,找到第一个满足a_i > a -
20242325 2026-2027-1 《网络与系统攻防技术》实验五实验报告
20242325 2026-2027-1 《网络与系统攻防技术》实验五实验报告 一、基础知识 (一)信息搜集技术概述 信息搜集(Information Gathering)是渗透测试与网络攻防行动的首要阶段,也是整个网络安全生命周期中最为核心的环节。据攻防实战统计,超过 60% 的前期精力都集中在目 -
实验3
任务1: 源代码: button.hpp #pragma once #include <iostream> #include <string> class Button { public: Button(const std::string &label); const std::string& ge -
实验3
任务1 源代码button.hpp 点击查看代码 #pragma once #include <iostream> #include <string> class Button { public: Button(const std::string &label); const std::string -
实验三
实验3 类和对象_基础编程2 一、实验目的 理解类的组合(has-a)关系,掌握组合类的定义与使用方法。 区分深拷贝与浅拷贝,掌握动态内存管理场景下拷贝构造函数、析构函数、赋值函数的编写。 熟练使用std::vector、std::string容器,掌握迭代器与常用STL算法。 运用面向对象思想设计 -
实验3
实验结论 1. 实验任务1 源代码 button.hpp #pragma once #include <iostream> #include <string> class Button { public: Button(const std::string &label); const std::st -
实验三
实验3 类的组合与深拷贝 1. 实验任务1 1.1 源代码如下 button.hpp #pragma once #include <iostream> #include <string> class Button { public: Button(const std::string &label); -
第四章
include <bits/stdc++.h> using namespace std; int main(){ string a; int k; cin>>a>>k; int n=a.size(); while(k--){ int i=0; while (i<a.size()-1 && a[i]< -
第四章作业
(一) 问题分析 删数问题描述为:给定一串数字构成的字符串,在保持字符原有相对顺序不变的前提下,删除恰好k个字符,使得剩余字符组成的整数数值最小,输出结果需要去除前导零,若结果为空则输出数字0。该问题目标是构造最小整数,高位数字对数值大小的影响优先级高于低位,因此适合采用贪心思想结合单调栈进行求解。