摘要: 题目描述 某工厂收到了 nn 个产品的订单,这 nn 个产品分别在 A,BA,B 两个车间加工,并且必须先在 AA 车间加工后才可以到 BB 车间加工。某个产品 ii 在 A,BA,B 两车间加工的时间分别为A_i,B_iAi​,Bi​。怎样安排这 nn 个产品的加工顺序,才能使总的加工时间最短。这 阅读全文
posted @ 2022-05-16 11:17 辛夸高岭桂 阅读(436) 评论(0) 推荐(0)
摘要: 小伟报名参加中央电视台的智力大冲浪节目。本次挑战赛吸引了众多参赛者,主持人为了表彰大家的勇气,先奖励每个参赛者 m 元。先不要太高兴!因为这些钱还不一定都是你的?!接下来主持人宣布了比赛规则:首先,比赛时间分为 n 个时段 (n≤500),它又给出了很多小游戏,每个小游戏都必须在规定期限 ti 前完 阅读全文
posted @ 2022-05-15 17:14 辛夸高岭桂 阅读(130) 评论(0) 推荐(0)
摘要: 题目描述 Farmer John takes the heritage of his cows very seriously. He is not, however, a truly fine bookkeeper. He keeps his cow genealogies as binary tr 阅读全文
posted @ 2022-05-12 10:39 辛夸高岭桂 阅读(67) 评论(0) 推荐(0)
摘要: Steven 买了一个模型直升机,这架飞机由两节 5 号电池供电。为了保证能够长时间飞行,他买了很多 5 号电池。这些电池的生产商不同,质量也有差异,因而使用寿命也有所不同。有的能使用 5 个小时,有的可能就只能使用 3 个小时。显然如果他只有两个电池,一个能用 5 小时一个能用 3 小时,那么他只 阅读全文
posted @ 2022-04-27 12:01 辛夸高岭桂 阅读(114) 评论(0) 推荐(0)
摘要: #ifndef Person_hpp #define Person_hpp #include<iostream> #include<string> #include<iomanip> using namespace std; class Person{ private: string name; s 阅读全文
posted @ 2021-12-14 12:53 辛夸高岭桂 阅读(32) 评论(1) 推荐(0)
摘要: 恢复内容开始 //task2.cpp #include <iostream> #include <typeinfo> // definitation of Graph class Graph { public: void draw() { std::cout << "Graph::draw() : 阅读全文
posted @ 2021-11-24 23:23 辛夸高岭桂 阅读(62) 评论(2) 推荐(0)
摘要: #ifndef Vector_int_HPP #define Vectoe_int_HPP #include<iostream> #include<cassert> using namespace std; class Vector_int{ public: Vector_int(int n); V 阅读全文
posted @ 2021-11-06 15:58 辛夸高岭桂 阅读(15) 评论(2) 推荐(0)
摘要: #ifndef Info_hpp #define Info_hpp #include<iostream> using namespace std; class Info{ public: Info(); Info(string nickname0,string contact0,string cit 阅读全文
posted @ 2021-10-31 12:08 辛夸高岭桂 阅读(43) 评论(2) 推荐(0)
摘要: #ifndef Complex_hpp #define Complex_hpp #include<iostream> #include<cmath> using namespace std; class Complex{ public: Complex(); Complex(double a) { 阅读全文
posted @ 2021-10-24 22:45 辛夸高岭桂 阅读(54) 评论(2) 推荐(0)