-
高级语言程序设计课程第九次个人作业
这个作业属于哪个课程:https://edu.cnblogs.com/campus/fzu/gjyycx 这个作业要求在哪里:https://edu.cnblogs.com/campus/fzu/gjyycx/homework/15595 学号:102500427 姓名:廖伦哲 1.声明一个结构体类 -
高级语言程序设计课程第九次个人作业
这个作业属于哪个课程:https://edu.cnblogs.com/campus/fzu/gjyycx?filter=homework 这个作业要求在哪里: https://edu.cnblogs.com/campus/fzu/gjyycx/homework/15595 学号:102500422 -
第四章作业
我的贪心策略: 为了减少选点,尽量选择一个点能占据多个位置的,这样子就是选最右边的点,通过循环每次选择最右侧的点,如果第i个最右侧的点大于第i+1个最左侧的点,计数器就加1,同时从第i+1个最右侧的点开始 时间复杂度:O(n log n) 对贪心算法的理解: 贪心算法就是在全局问题中分解出若干个单一 -
实验五
实验五 实验任务一 源代码: #include <memory> #include <iostream> #include <vector> #include "publisher.hpp" void test1() { std::vector<Publisher *> v; v.push_back -
高级语言程序设计课程第九次个人作业
这个作业属于哪个课程:https://edu.cnblogs.com/campus/fzu/gjyycx 这个作业要求在哪里: https://edu.cnblogs.com/campus/fzu/gjyycx/homework/15595 学号:<052301346> 姓名:<郑积超> 作业内容 -
高级语言程序设计第九次作业
这个作业属于哪个课程:https://edu.cnblogs.com/campus/fzu/gjyycx 这个作业要求在哪里:https://edu.cnblogs.com/campus/fzu/gjyycx/homework/15595 学号:102500417 姓名:刘朝榕 设计程序 1. 点击 -
高级语言程序设计课程第九次个人作业
这个作业属于哪个课程:https://edu.cnblogs.com/campus/fzu/gjyycx 这个作业要求在哪里:https://edu.cnblogs.com/campus/fzu/gjyycx/homework/15595 学号:102500328 姓名:刘宇桓 声明一个结构体类型, -
实验五 多态
Task1: 1.源代码: #include <iostream> #include <string> #include "publisher.hpp" // Publisher类:实现 Publisher::Publisher(const std::string &name_): name {na -
实验5 多态
Task1 publisher.hpp #pragma once #include <string> // 发行/出版物类:Publisher (抽象类) class Publisher { public: Publisher(const std::string &name_ = ""); // 构 -
高级语言程序设计课程第九次个人作业
这个作业属于哪个课程:https://edu.cnblogs.com/campus/fzu/gjyycx 这个作业要求在哪里:https://edu.cnblogs.com/campus/fzu/gjyycx/homework/15595 学号:102500413 姓名:陈帅 声明一个结构体类型,用 -
实验五
任务一: 1.源代码: (1)publisher.hpp: #pragma once #include <string> // 发行/出版物类:Publisher (抽象类) class Publisher { public: Publisher(const std::string &name_ = -
实验5 多态
任务1 源代码 publisher.hpp 1 #pragma once 2 3 #include <string> 4 5 // 发行/出版物类:Publisher (抽象类) 6 class Publisher { 7 public: 8 Publisher(const std::string -
选点问题的贪心解法
最近在算法课上学到了贪心算法,老师布置了这个“选点问题”。题目要求在数轴上选最少的点,使得每个给定区间都至少包含一个点。 我一开始试着画了几个例子。比如给三个区间:[1,3]、[2,4]、[3,5]。如果随便选点,可能在1、2、3各放一个点,用了三个点。但仔细观察,其实选点3就能覆盖所有区间。这让我 -
实验5
任务1-1 1.把数组中最大最小值赋给相应地址变量 2.min和max的地址 任务1-2 1.找到数组最大值,返回最早出现的最大值元素的地址。 2.可以 任务2 1.80Byte,s1占用字节数,s1实际上在\0截断前的占用字节数 2.不行。s1是地址常量。应该使用strcpy函数进行字符串拷贝赋值 -
实验5
任务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 *pmax); i -
实验五
任务一 1.c 点击查看代码 #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, in -
实验5
实验任务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 *pmax); -
高级程序设计个人作业第九次
这个作业属于哪个课程 <班级的链接> 这个作业要求在哪里 <作业链接> 学号 092300303 姓名 池博洋 @目录声明一个结构体类型,用来存放某个学生的姓名、学号、性别、班级、三科成绩,并且打印出来该学生信息定义一个结构体数组,用来存放班级中N个学生以上信息,编写三个函数进行信息输入、排序和输出 -
实验五
实 验 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, -
实验5
task 1-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, i