上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 98 下一页
摘要: 描述 下面的程序输出结果是: A::Fun A::Do A::Fun C::Do 请填空: 输入无输出A::FunA::DoA::FunC::Do样例输入 样例输出 Code: Analysis: 和之前那个6w4的分析方法差不多,只不过这次是变成了指针罢了。 阅读全文
posted @ 2019-01-07 12:17 Veritas_des_Liberty 阅读(969) 评论(0) 推荐(0)
摘要: 描述 下面程序的输出结果是: destructor B destructor A 请完整写出 class A。 限制条件:不得为 class A 编写构造函数。 输入无输出destructor Bdestructor A样例输入 样例输出 Code: Analysis: 刚开始想的是加一A的析构函数 阅读全文
posted @ 2019-01-07 12:11 Veritas_des_Liberty 阅读(504) 评论(0) 推荐(0)
摘要: 描述 下面程序的输出结果是: A::Fun C::Do 请填空: 输入无输出A::FunC::Do样例输入 样例输出 Code: Analysis: 随便写了一下就提交了,没想到能过。 main中Call中的实参是C类的引用,但是根据输出的结果来看,Call函数中并不是传入C类的对象。就三个类,一个 阅读全文
posted @ 2019-01-07 12:00 Veritas_des_Liberty 阅读(465) 评论(0) 推荐(0)
摘要: 描述 魔兽世界的西面是红魔军的司令部,东面是蓝魔军的司令部。两个司令部之间是依次排列的若干城市。 红司令部,City 1,City 2,……,City n,蓝司令部两军的司令部都会制造武士。武士一共有 dragon 、ninja、iceman、lion、wolf 五种。每种武士都有编号、生命值这两种 阅读全文
posted @ 2019-01-06 21:55 Veritas_des_Liberty 阅读(1313) 评论(1) 推荐(0)
摘要: 970. Powerful Integers Given two non-negative integers x and y, an integer is powerful if it is equal to x^i + y^j for some integers i >= 0 and j >= 0 阅读全文
posted @ 2019-01-06 12:43 Veritas_des_Liberty 阅读(230) 评论(0) 推荐(0)
摘要: 121. Best Time to Buy and Sell Stock Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitte 阅读全文
posted @ 2019-01-05 22:35 Veritas_des_Liberty 阅读(266) 评论(0) 推荐(0)
摘要: In the world of Dota2, there are two parties: the Radiant and the Dire. The Dota2 senate consists of senators coming from two parties. Now the senate 阅读全文
posted @ 2019-01-05 21:50 Veritas_des_Liberty 阅读(344) 评论(0) 推荐(0)
摘要: There are n different online courses numbered from 1 to n. Each course has some duration(course length) t and closed on dth day. A course should be ta 阅读全文
posted @ 2019-01-05 17:52 Veritas_des_Liberty 阅读(329) 评论(0) 推荐(0)
摘要: 描述 补足程序,使得下面程序输出的结果是: ****100 输入无输出****100样例输入 样例输出 Code: 分析: 看题知道cout的是函数名,而只有输出“函数名()”才能得到与样例输出一样的结构,所以要重载”<<”,让cout输出函数指针。 阅读全文
posted @ 2019-01-03 12:41 Veritas_des_Liberty 阅读(270) 评论(0) 推荐(0)
摘要: 描述 写一个MyString 类,使得下面程序的输出结果是: 1. abcd-efgh-abcd- 2. abcd- 3. 4. abcd-efgh- 5. efgh- 6. c 7. abcd- 8. ijAl- 9. ijAl-mnop 10. qrst-abcd- 11. abcd-qrst- 阅读全文
posted @ 2019-01-03 11:38 Veritas_des_Liberty 阅读(709) 评论(0) 推荐(0)
上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 98 下一页