摘要:
1 #include 2 #include 3 #include 4 #include 5 #include 6 7 using namespace std; 8 9 int main() 10 { 11 int n,m; 12 while(cin >> n >> m) 13 { 14 string s,t; 15 ... 阅读全文
摘要:
1 #include <iostream> 2 #include <unordered_map> 3 #include <algorithm> 4 #include <vector> 5 #include <queue> 6 7 using namespace std; 8 9 class Solu 阅读全文
摘要:
1 class Solution 2 { 3 private: 4 enum op {PLUS,MINUS}; 5 int left_constant_sum = 0; 6 int left_x_sum = 0; 7 int right_constant_sum = 0; 8 ... 阅读全文
摘要:
1 class Solution 2 { 3 public: 4 vector result; 5 int size; 6 vector letterCasePermutation(string S) 7 { 8 size = S.size(); 9 DFS(... 阅读全文
摘要:
1 class Solution 2 { 3 public: 4 //if doesn't find,return NULL 5 TreeNode *BinarySearchTreeNodeFindMin(TreeNode *TreeRoot) 6 { 7 if(TreeRoot==NULL) 8 ... 阅读全文
摘要:
1 class Solution 2 { 3 public: 4 string originalDigits(string s) 5 { 6 vector CharacterList(26,0); 7 for(auto c:s) 8 { 9 ... 阅读全文
摘要:
1 struct cmp 2 { 3 bool operator()(const pair p1, const pair p2) 4 { 5 if(p1.second!=p2.second) 6 return p1.second > p2.second; //second的小值优先 7 return p1.fi... 阅读全文
摘要:
其实可以把初始化创建人的ID的过程给抽出来做成一个函数,不过这只博主就是懒辣~ 阅读全文
摘要:
1 class Solution 2 { 3 public: 4 vector majorityElement(vector& nums) 5 { 6 unordered_map mymap; 7 vector result; 8 for(auto d:nums) 9... 阅读全文
摘要:
1 class Solution 2 { 3 public: 4 string reverseWords(string s) 5 { 6 string result; 7 string tmp; 8 9 for(auto c:s) 10 { ... 阅读全文