上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 47 下一页
摘要: 1 class Solution 2 { 3 private: 4 vector> graphA,graphB; 5 int colSize; 6 int mark; 7 const int xList[4] {1,0,0,-1}; 8 const int yList[4] {0,1,-1,0... 阅读全文
posted @ 2018-11-06 19:10 Asurudo 阅读(690) 评论(0) 推荐(0)
摘要: 1 #define _for(i,a,b) for(int i = (a);i > dialList {{4,6},{6,8},{7,9},{4,8},{0,3,9},{},{0,1,7},{2,6},{1,3},{2,4}}; 9 const int MOD = 1000000007; 10 public: 11 int knightDialer(i... 阅读全文
posted @ 2018-11-06 18:27 Asurudo 阅读(436) 评论(0) 推荐(0)
摘要: 1 class RecentCounter 2 { 3 private: 4 queue q; 5 public: 6 RecentCounter() 7 { 8 } 9 10 int ping(int t) 11 { 12 if(q.emp... 阅读全文
posted @ 2018-11-04 12:36 Asurudo 阅读(365) 评论(0) 推荐(0)
摘要: 1 class Solution 2 { 3 public: 4 int minFallingPathSum(vector>& A) 5 { 6 vector> B = A; 7 for(int i = 0;i > dp = B; 16 for(int i = B.siz... 阅读全文
posted @ 2018-10-31 19:19 Asurudo 阅读(218) 评论(0) 推荐(0)
摘要: 1 class Solution 2 { 3 public: 4 int numSubarraysWithSum(vector& A, int S) 5 { 6 if(S==0) 7 { 8 int result = 0; 9 ... 阅读全文
posted @ 2018-10-30 20:10 Asurudo 阅读(437) 评论(0) 推荐(0)
摘要: 1 class Solution 2 { 3 public: 4 int numUniqueEmails(vector& emails) 5 { 6 for(int i = 0;i strSet; 32 for(auto s:emails) 33 strSet.i... 阅读全文
posted @ 2018-10-30 18:50 Asurudo 阅读(228) 评论(0) 推荐(0)
摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 10 using namespace std; 11 12 #define _for(i,a,b) for(int i = (a);i = b; 21 ... 阅读全文
posted @ 2018-10-27 16:26 Asurudo 阅读(269) 评论(0) 推荐(0)
摘要: 1 class Solution 2 { 3 private: 4 int visited[309]; 5 int nowKilled; 6 int numOfNode; 7 int toBeDeleted; 8 public: 9 void DFS(int killer,vecto... 阅读全文
posted @ 2018-10-23 20:05 Asurudo 阅读(464) 评论(0) 推荐(0)
摘要: 1 class Solution 2 { 3 private: 4 vector result; 5 public: 6 vector threeEqualParts(vector& A) 7 { 8 int oneSum = 0; 9 for(auto d:A) 1... 阅读全文
posted @ 2018-10-23 19:40 Asurudo 阅读(403) 评论(0) 推荐(0)
摘要: 1 class Solution 2 { 3 public://saeed ssaaedd 4 bool isLongPressedName(string name, string typed) 5 { 6 int typedEnd = 0; 7 for(int i = 0;i = typed.... 阅读全文
posted @ 2018-10-23 18:32 Asurudo 阅读(171) 评论(0) 推荐(0)
上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 47 下一页