-
实验六
实验任务4 #include <stdio.h> #include <stdlib.h> #define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 作者 double -
实验6
实验任务1: 源代码contestant.hpp 1 #pragma once 2 #include<iomanip> 3 #include<iostream> 4 #include<string> 5 6 struct Contestant{ 7 long id; 8 std::string na -
实验6
任务1: 源代码: contestant.hpp #pragma once #include <iomanip> #include <iostream> #include <string> struct Contestant { long id; // 学号 std::string name; // -
实验6
一、实验任务1 源代码contestant.hpp 1 #pragma once 2 #include<iomanip> 3 #include<iostream> 4 #include<string> 5 struct Contestant{ 6 long id; 7 std::string nam -
实验六
实验1: 1 #include<stdio.h> 2 #include<string.h> 3 #include<stdlib.h> 4 #define N 3 5 typedef struct student{ 6 int id; 7 char name[20]; 8 char subject[2 -
实验6
实验6 c语言结构体和枚举应用编程 #include <stdio.h> #include <string.h> #define N 3 // 运行程序输入测试时,可以把N改小一些输入测试 typedef struct student { int id; // 学号 char name[20]; / -
实验6
试验任务4 1 #define _CRT_SECURE_NO_WARNINGS 2 #include<stdio.h> 3 #include<string.h> 4 #define N 10 5 typedef struct { 6 char isbn[20]; 7 char name[80]; 8 -
实验6
实验任务1: contestant.hpp: #pragma once #include <iomanip> #include <iostream> #include <string> struct Contestant { long id; // 学号 std::string name; // 姓 -
实验6 文件I/O与异常处理
实验任务1 源代码: #pragma once #include <iomanip> #include <iostream> #include <string> struct Contestant { long id; // 学号 std::string name; // 姓名 std::strin -
Test6
任务一 源代码 contestant.hpp 点我展开代码 #pragma once #include <iomanip> #include <iostream> #include <string> struct Contestant { long id; // 学号 std::string nam -
实验6
实验任务4 源代码 1 #include <stdio.h> 2 #define N 10 3 #include<stdlib.h> 4 typedef struct { 5 char isbn[20]; // isbn号 6 char name[80]; // 书名 7 char author[8 -
实验6
实验任务4 源代码 1 #include <stdio.h> 2 #define N 10 3 4 typedef struct { 5 char isbn[20]; 6 char name[80]; 7 char author[80]; 8 double sales_price; 9 int sa -
oop实验六
实验六 test1 源代码: 1 #pragma once 2 #include <iomanip> 3 #include <iostream> 4 #include <string> 5 6 struct Contestant { 7 long id; // 学号 8 std::string na -
20232412 2025-2026-1 《网络与系统攻防技术》实验八实验报告
1.实验内容 (1)Web前端HTML 能正常安装、启停Apache。理解HTML,理解表单,理解GET与POST方法,编写一个含有表单的HTML。 (2)Web前端javascipt 理解JavaScript的基本功能,理解DOM。 在(1)的基础上,编写JavaScript验证用户名、密码的规则 -
实验五
task1 task1.1 #include <stdio.h> #define N 5 void input(int x[], int n); void output(int x[], int n); void find_min_max(int x[], int n, int *pmin, int -
实验5
实验任务1 1 #include <stdio.h> 2 #define N 5 3 4 void input(int x[], int n); 5 void output(int x[], int n); 6 void find_min_max(int x[], int n, int *pmin, -
第四次作业
贪心策略: 1.优先选择结束时间最早的活动; 2.从第一个活动开始,每次选 “开始时间大于上一个选中活动结束时间” 的活动,直到遍历完所有活动。 证明贪心选择性质: 假设 A 是问题的一个最优解,将 A 中的区间按结束时间升序排序,设 A 中第一个区间为([sk,ek])。 情况 1:(k=1)(即 -
实验5
实验任务1.1: 1 #include <stdio.h> 2 #define N 5 3 4 void input(int x[], int n); 5 void output(int x[], int n); 6 void find_min_max(int x[], int n, int *pm -
experiment5
一、实验目的 深度理解使用指针间接访问数据、代码 会使用指针间接访问数组元素(一维、二维) 会使用指针处理字符串 会使用指针作函数参数(形参、实参)和返回值 能灵活应用数组、指针、函数,编程解决实际问题 二、实验准备 实验前,请复习第6章: 使用指针间接访问数组(一维、两维) 指针作为函数参数 使用 -
第四次作业
我的贪心策略: 1.为了尽量减少点的数量,应该让一个点尽可能覆盖更多区间 2.选择区间的右端点是最优策略,因为右端点是当前区间中最靠右、仍能覆盖该区间的点 3.右端点越小,未来可覆盖的区间越多,从整体上减少点的数量 总结.将区间按右端点从小到大排序,依次选择最早结束区间的右端点作为选点,并用它覆盖尽