-
第四章作业 贪心算法
1.请分析作业的"删数问题",说明你的贪心策略,利用假设替换的反证法证明你的算法满足贪心选择性质,并给出时间复杂度分析 贪心策略:从左向右扫描数字串,找到第一个大于后一位的数字并删除;重复 k 次;若数字单调递增,则删除末尾 k 位。 贪心选择性质证明(反证):假设最优解没有删除该位置数字。因为该位 -
第四章贪心算法
1、删数问题 问题描述:给定数字字符串,删除k个字符,字符相对顺序不变,使剩下的整数最小。 贪心策略:采用单调不减栈。从左向右遍历每一位数字:只要还有删除次数k>0、栈不为空、栈顶数字大于当前数字,就弹出栈顶(删除该高位数字,k自减),直到不满足条件后将当前数字入栈;遍历结束若k>0,说明序列单调递 -
第四章作业
1.删数问题 写入整数n,k。其中n用字符串表示。删除K个数字使得修改后的数字按原顺序组成的数最小。通过观察发现,高位数字对整个数影响最大,尽量先降低高位。贪心策略:自左向右遍历,当遇到当前数比下一位更大,删除当前数,重复该过程,知道删除够k个数字为止。如果是递增序列,删除末尾K位数。假设替换反证法 -
实验3
实验任务1 源代码 button.hpp 点击查看代码 #pragma once #include <iostream> #include <string> class Button { public: Button(const std::string &label); const std::str -
高级语言程序设计课程第六次个人作业
这个作业属于哪个课程:https://edu.cnblogs.com/campus/fzu/2026gjyycxsj/ 这个作业要求在哪里: https://edu.cnblogs.com/campus/fzu/2026gjyycxsj/homework/16752 学号:0102600106 姓名 -
实验三
实验三 实验任务一 代码 #pragma once #include <iostream> #include <string> class Button { public: Button(const std::string &label); const std::string& get_label( -
高级语言程序设计课程第六次个人作业
这个作业属于哪个课程:https://edu.cnblogs.com/campus/fzu/2026gjyycxsj 这个作业要求在哪里: https://edu.cnblogs.com/campus/fzu/2026gjyycxsj/homework/16752 学号:0102600110 姓名: -
实验3
任务1 源码 button.hpp #pragma once #include <iostream> #include <string> class Button { public: Button(const std::string &label); const std::string& get_l -
实验3
实验任务1 一、代码 1. button.hpp #pragma once #include <iostream> #include <string> class Button { public: Button(const std::string &label); const std::string -
实验3
task1 源代码 button.hpp 点击查看代码 #pragma once #include <iostream> #include <string> class Button { public: Button(const std::string &label); const std::str -
实验三
实验3 类的组合与深拷贝 1. 实验任务1 1.1 源代码如下 button.hpp #pragma once #include <iostream> #include <string> class Button { public: Button(const std::string &label); -
实验3
实验结论 1. 实验任务1 源代码 button.hpp #pragma once #include <iostream> #include <string> class Button { public: Button(const std::string &label); const std::st -
高级语言程序设计第六次作业
这个作业属于哪个课程:https://edu.cnblogs.com/campus/fzu/2026gjyycxsj/ 这个作业要求在哪里: https://edu.cnblogs.com/campus/fzu/2026gjyycxsj/homework/16752 学号:0102600232 姓名 -
实验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& -
实验3
task1 源代码 button.hpp #pragma once #include <iostream> #include <string> class Button { public: Button(const std::string &label); const std::string& ge -
作业四
第四次作业:Selenium 爬虫 + MySQL + Flume/Kafka 实时采集实践 本篇博客记录第四次作业的完整过程:用 Selenium + MySQL 爬取东方财富 A 股股票数据、中国 MOOC 课程信息,并在华为云环境完成 Flume + Kafka 日志采集实验。代码按代码块形式 -
20242411 2026-2027-1 《网络与系统攻防技术》实验二实验报告
20242411 2026-2027-1 《网络与系统攻防技术》实验二实验报告一、基础知识1.1 后门与反向连接后门是绕过正常认证或交互流程、为后续访问提供隐蔽通道的程序或机制。后门可能通过恶意软件、钓鱼、被篡改的软件包、弱口令服务或漏洞利用进入系统。反向连接模式由目标主机主动连接控制端,通常可以减 -
20242422 2026-2027-1 《网络与系统攻防技术》实验七实验报告
20242422 2026-2027-1 《网络与系统攻防技术》实验七实验报告 1. 基础知识 SET(Social-Engineer Toolkit)是一套面向社会工程学攻击的开源工具包,按 Spear-Phishing、Website Attack Vectors、Credential Harv 2026-2027-1-网络与系统攻防技术(2423/2424)(北京电子科技学院 - 网络空间安全系) 20242422liuxiang 2026-12-01 20:01 0 5 -
20242420 2026-2027-1 《网络与系统攻防技术》 实验六实验报告
实验六 Metasploit 攻击渗透实践 北京电子科技学院 · 网络攻防实验报告 基于 Metasploitable2 靶机的漏洞复现与验证 项目 内容 学生姓名 王睿 学号 20242420 班级 2424 专业 网络空间安全 指导教师 王志强 实验日期 2026 年 12 月 目录 1 实验目 -
数据采集作业四
码云链接 作业① 爬取东方财富网股票 1)爬取东方财富网股票 from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import We