上一页 1 ··· 44 45 46 47 48 49 50 51 52 ··· 98 下一页
摘要: A car travels from a starting position to a destination which is target miles east of the starting position. Along the way, there are gas stations. Ea 阅读全文
posted @ 2018-12-30 21:13 Veritas_des_Liberty 阅读(333) 评论(0) 推荐(0) 编辑
摘要: 965. Univalued Binary Tree A binary tree is univalued if every node in the tree has the same value. Return true if and only if the given tree is univa 阅读全文
posted @ 2018-12-30 13:40 Veritas_des_Liberty 阅读(312) 评论(0) 推荐(0) 编辑
摘要: We are given a 2-dimensional grid. "." is an empty cell, "#" is a wall, "@" is the starting point, ("a", "b", ...) are keys, and ("A", "B", ...) are l 阅读全文
posted @ 2018-12-29 21:41 Veritas_des_Liberty 阅读(408) 评论(0) 推荐(0) 编辑
摘要: There are N workers. The i-th worker has a quality[i] and a minimum wage expectation wage[i]. Now we want to hire exactly K workers to form a paid gro 阅读全文
posted @ 2018-12-24 22:26 Veritas_des_Liberty 阅读(299) 评论(0) 推荐(0) 编辑
摘要: 4w3:第四周程序填空题1 描述 下面程序的输出是: 3+4i 5+6i 请补足Complex类的成员函数。不能加成员变量。 输入无输出3+4i5+6i样例输入 样例输出 Approach: 4w4:第四周程序填空题2 描述 下面的MyInt类只有一个成员变量。MyInt类内部的部分代码被隐藏了。假 阅读全文
posted @ 2018-12-23 22:24 Veritas_des_Liberty 阅读(897) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; class CDemo { private: int n; public: CDemo(int i = 0):n(i){} CDemo& operator++(); CDemo operator++(int); operator int() { return n; } friend ... 阅读全文
posted @ 2018-12-23 22:02 Veritas_des_Liberty 阅读(280) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; class Complex { public: double real, imag; public: Complex(double r = 0, double i = 0): real(r), imag(i){}; friend ostream& operator>(... 阅读全文
posted @ 2018-12-23 21:40 Veritas_des_Liberty 阅读(682) 评论(0) 推荐(0) 编辑
摘要: Your car starts at position 0 and speed +1 on an infinite number line. (Your car can go into negative positions.) Your car drives automatically accord 阅读全文
posted @ 2018-12-23 18:57 Veritas_des_Liberty 阅读(325) 评论(0) 推荐(0) 编辑
摘要: 961. N-Repeated Element in Size 2N Array In a array A of size 2N, there are N+1 unique elements, and exactly one of these elements is repeated N times 阅读全文
posted @ 2018-12-23 12:57 Veritas_des_Liberty 阅读(246) 评论(0) 推荐(0) 编辑
摘要: There are n cities connected by m flights. Each fight starts from city u and arrives at v with a price w. Now given all the cities and flights, togeth 阅读全文
posted @ 2018-12-22 13:05 Veritas_des_Liberty 阅读(302) 评论(0) 推荐(0) 编辑
上一页 1 ··· 44 45 46 47 48 49 50 51 52 ··· 98 下一页