-
实验六
实验任务4 #include <stdio.h> #include <stdlib.h> #define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 作者 double -
第四章作业
一、选点问题分析 1、选点问题定义(核心:区间选点) 给定数轴上的n个闭区间[a_i, b_i],要求选择最少的点,使得每个区间至少包含一个选点。 例如:区间{[1,3], [2,5], [4,6]},选点4即可覆盖所有区间,是最优解。 2、选点问题的贪心策略 核心策略(三步搞定) 排序:将所有区间 -
OOP实验六
实验任务一 源代码: #include <algorithm> #include <iostream> #include <stdexcept> #include <vector> #include "contestant.hpp" #include "utils.hpp" const std::s -
马头市区—beta冲刺
马头市区 - Beta冲刺 一、项目回顾与改进 1. alpha冲刺后存在的问题及解决 在Alpha阶段结束后,团队进行了密集的内部测试,发现了三个影响用户体验的核心问题,针对这些问题我们进行了深入的技术探索并完成了修复。 (1)战术板界面 UI 交互冲突 问题描述:用户的操作意图与系统响应状态机设 -
团队作业6
所属课程 https://edu.cnblogs.com/campus/gdgy/Class12Grade23ComputerScience 作业要求 https://edu.cnblogs.com/campus/gdgy/Class12Grade23ComputerScience/homework -
实验6
Task1 源代码 Contestant.h #pragma once #include <iomanip> #include <iostream> #include <string> struct Contestant { long id; // 学号 std::string name; // 姓 -
团队复审和分析
Alpha阶段项目复审 这个作业属于哪个课程 https://edu.cnblogs.com/campus/gdgy/Class34Grade23ComputerScience/ 这个作业要求在哪里 https://edu.cnblogs.com/campus/gdgy/Class34Grade23 -
实验6
task1.c task1.c 1 #include <stdio.h> 2 #include <string.h> 3 #define N 3 4 typedef struct student { 5 int id; 6 char name[20]; 7 char subject[20]; 8 d -
高级语言程序设计课程第十次个人作业
这个作业属于哪个课程:https://edu.cnblogs.com/campus/fzu/gjyycx 这个作业要求在哪里:https://edu.cnblogs.com/campus/fzu/gjyycx/homework/15596 学号:102500413 姓名:陈帅 (1)编写一个程序,将 -
贪心算法分析选点问题
一、 贪心算法分析选点问题 先明确选点问题标准定义(作业高频考点):给定一条直线上的 $n$ 个点,坐标分别为 $x_1 \le x_2 \le \dots \le x_n$,现需选取若干个点,使得每个点都能被某个选取的点覆盖,覆盖范围为选取点坐标的 $[a, a+1]$ 区间(区间长度固定为1), -
实验六
task1 contestant.hpp #pragma once #include<iomanip> #include<iostream> #include<string> struct Contestant{ long id; std::string name; std::string majo -
回溯法分析最小重量机器设计问题
一、 回溯法分析最小重量机器设计问题 先明确最小重量机器设计问题定义(回溯法分析的前提): 一台机器由 $n$ 个部件组成,每个部件都有 $m$ 个不同的供应商可选;第 $i$ 个部件从第 $j$ 个供应商采购,对应重量 $w_{ij}$、费用 $c_{ij}$;要求总费用不超过给定上限 $C$,求 -
实验6
前三个实验代码均已进行验证并运行 Task.4 #include <stdio.h> #define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 作者 double sa -
实验6
实验六 实验任务一代码 contestant.hpp #pragma once #include <iomanip> #include <iostream> #include <string> struct Contestant { long id; // 学号 std::string name; -
高级语言程序设计课程第十次个人作业
班级:https://edu.cnblogs.com/campus/fzu/gjyycx 要求:https://edu.cnblogs.com/campus/fzu/gjyycx/homework/15596 学号:102500428 姓名:杜翰墨 (1) (2) (3) (4) (5) (6) ( -
OOP6
任务一 task1.cpp #include <algorithm> #include <iostream> #include <stdexcept> #include <vector> #include "contestant.hpp" #include "utils.hpp" const std -
实验6 文件I/O与异常处理
实验任务1 代码 c++ 1 #pragma once 2 #include <iomanip> 3 #include <iostream> 4 #include <string> 5 6 struct Contestant { 7 long id; // 学号 8 std::string name -
实验六
任务四 #include<stdio.h> #define N 10 typedef struct{ char isbn[20]; char name[80]; char author[20]; double sales_price; int sales_count; }Book; void out -
算法第四章作业
1.贪心策略:先把所有区间按照右端点从小到大排序,之后按顺序逐个检查每个区间,如果当前区间没有被上一个选好的点覆盖,就在这个区间的右端点位置选一个新点。 证明:每一步选择未被覆盖区间的右端点是局部最优解,这个点能覆盖后续区间,最优解中存在覆盖当前区间的点,将这个点替换为选的右端点,也能覆盖所有区间而 -
实验6
1 #include <stdio.h> 2 #include <stdlib.h> 3 #define N 10 4 5 typedef struct { 6 char isbn[20]; // isbn号 7 char name[80]; // 书名 8 char author[80]; //