摘要:
class Solution { public: int binaryGap(int N) { int position = 0; vector V; while (N) { if (N & 1)//N&1==1,表示最后一位是1 { V.pus... 阅读全文
posted @ 2018-09-28 19:45
Sempron2800+
阅读(90)
评论(0)
推荐(0)
摘要:
class Solution { public: int numSpecialEquivGroups(vector& A) { set ST; for (auto a : A) { vector V1; vector V2; for (int i = 0; i < a... 阅读全文
posted @ 2018-09-28 19:02
Sempron2800+
阅读(115)
评论(0)
推荐(0)
摘要:
class Solution { public: int calPoints(vector& ops) { stack ST; int sum = 0; for (auto o : ops) { if (o == "C") { int n = S... 阅读全文
posted @ 2018-09-28 18:27
Sempron2800+
阅读(89)
评论(0)
推荐(0)
摘要:
本题经过一下午的思考,终于解出来了。使用的是层次遍历的思想。 阅读全文
posted @ 2018-09-28 17:34
Sempron2800+
阅读(114)
评论(0)
推荐(0)
摘要:
class Solution { public: void SplitString(const string& s, vector& v, const string& c) { string::size_type pos1, pos2; pos2 = s.find(c); pos1 = 0; while (strin... 阅读全文
posted @ 2018-09-28 07:36
Sempron2800+
阅读(113)
评论(0)
推荐(0)
浙公网安备 33010602011771号