上一页 1 ··· 69 70 71 72 73 74 75 76 77 ··· 114 下一页
摘要: 并查集方案 阅读全文
posted @ 2019-02-10 22:33 Sempron2800+ 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 上面这个是参考别人的解决方案,思路不好理解,我又从新写了一个啰嗦的: 阅读全文
posted @ 2019-02-10 13:59 Sempron2800+ 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 1 public class Solution 2 { 3 private Stack ST = new Stack(); 4 private string SmallestStr = String.Empty; 5 private string[] Ary = new string[] { "a","b","c","d","e"... 阅读全文
posted @ 2019-02-05 22:33 Sempron2800+ 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 这道题的描述有一些不清楚,主要是If two nodes have the same position, then the value of the node that is reported first is the value that is smaller. 这一句,应该是先按照层排序,同层的 阅读全文
posted @ 2019-02-05 21:52 Sempron2800+ 阅读(149) 评论(0) 推荐(0) 编辑
摘要: class Solution: def judgeIntersection(self,a:'Interval',b:'Interval'): #返回值1,bool类型,是否有交集:True-有交集,False-无交集 #返回值2,int类型,哪个先结束:0-A先结束,1-B先结束,2-AB同时结束 #返回值3,Interval类型,交集的... 阅读全文
posted @ 2019-02-05 18:34 Sempron2800+ 阅读(209) 评论(0) 推荐(0) 编辑
摘要: import sys class Solution: def sumEvenAfterQueries(self, A: 'List[int]', queries: 'List[List[int]]') -> 'List[int]': result = list() len0 = len(A) len1 = len(queries) ... 阅读全文
posted @ 2019-02-03 16:46 Sempron2800+ 阅读(150) 评论(0) 推荐(0) 编辑
摘要: public class Solution { public int MincostTickets(int[] days, int[] costs) { int weeklyStart = 0; int monthlyStart = 0; int[] dp = new int[days... 阅读全文
posted @ 2019-01-28 18:35 Sempron2800+ 阅读(249) 评论(0) 推荐(0) 编辑
摘要: public class Solution { private string M1(int A, int B) { StringBuilder sb = new StringBuilder(); int groupA = A / 2; int freeA = A % 2; ... 阅读全文
posted @ 2019-01-28 14:53 Sempron2800+ 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 补充一个python的实现: 阅读全文
posted @ 2019-01-22 11:38 Sempron2800+ 阅读(97) 评论(0) 推荐(0) 编辑
摘要: public class Solution { public IList PowerfulIntegers(int x, int y, int bound) { var list = new List(); for (int i = 0; i a).ToList(); ... 阅读全文
posted @ 2019-01-22 11:02 Sempron2800+ 阅读(117) 评论(0) 推荐(0) 编辑
上一页 1 ··· 69 70 71 72 73 74 75 76 77 ··· 114 下一页