- 博客(4)
- 收藏
- 关注
原创 算法练习记录:贪心
一、活动调度问题题目:假设要用很多个教室对一组活动进行调度。我们希望使用尽可能少的教室来调度所有的活动。输入要求:第一行为活动的个数 N(1<=N<=1 000 000) 。接下来 N 行为 Si 和 Fi(0<=Si<Fi<=2 000 000 000) ,分别代表第 i 个活动的开始时间和结束时间。活动 i 的区间段为 [Si,Fi)输出要求:输出有一行 M ,为所需教室的最小数量。测试输入:111 43 50 65 73 8
2021-05-22 19:11:18
355
原创 2020年OOP试题
第二题 (20 points) (1) Shape is an abstract class with a pure virtual function: Area(). (2) Circle is inherited from Shape, with a data member Radius, and a member function Area() to get the area of a circle. (3) Triangle is inherited from Shape, with two..
2021-05-15 23:10:07
241
原创 《C++ primer》读书笔记:面向对象程序设计
目录1.1 OOP(object-oriented programming):概述本节要点继承动态绑定15.1 OOP(object-oriented programming):概述本节要点数据抽象:将类的接口和实现相分离。 继承:可以定义类似的类型并对其相似关系建模。 动态绑定:可以在一定程度上忽略相似类型的区别,从而以统一的方式使用它们的对象。继承基类(base class)→ 派生类(derived class)基类将两种不同的函数区别对待: 类型相关.
2021-05-15 15:00:46
355
原创 运算符的重载
++/--运算符++/- - operand, operand value after operating = operand +1/-1,expresson value = operand +1/-1operand ++/- -, operand value after operating = operand +1/-1, expresson value = operand 重载模板//Global operator//Pre operator: RetType ope...
2021-05-14 17:02:23
141
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人