摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
描述 补足程序,使得下面程序输出的结果是: ****100 输入无输出****100样例输入 样例输出 Code: 分析: 看题知道cout的是函数名,而只有输出“函数名()”才能得到与样例输出一样的结构,所以要重载”<<”,让cout输出函数指针。 阅读全文
摘要:
描述 写一个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- 阅读全文
摘要:
Given a char array representing tasks CPU need to do. It contains capital letters A to Z where different letters represent different tasks. Tasks coul 阅读全文
摘要:
There are a number of spherical balloons spread in two-dimensional space. For each balloon, provided input is the start and end coordinates of the hor 阅读全文
摘要:
Given a collection of intervals, find the minimum number of intervals you need to remove to make the rest of the intervals non-overlapping. Note: Exam 阅读全文
摘要:
Given a non-negative integer num represented as a string, remove k digits from the number so that the new number is the smallest possible. Note: The l 阅读全文