05 2019 档案

摘要:意外的简单,也可能是无耻的用了sort的缘故。 Runtime: 68 ms, faster than 96.70% of Python3 online submissions forMerge k Sorted Lists. Memory Usage: 17.3 MB, less than 19. 阅读全文
posted @ 2019-05-29 15:35 夜歌乘年少 阅读(185) 评论(0) 推荐(0)
摘要:REM:生成一个文件 del > Time.log echo > Time.log REM:获取系统日期及时间,同时将时间转换为8位(8:16:00-->08:16:00).写入文件。 :ABC set CurDate=%date:~0,10% set CurTime=%time% set hh=%CurTime:~0,2% if /i %hh% LSS 10 ... 阅读全文
posted @ 2019-05-29 09:36 夜歌乘年少 阅读(312) 评论(1) 推荐(0)
摘要:参考资料:https://www.youtube.com/watch?v=sz1qaKt0KGQ DFS总结: 回到题目上: 树生成策略: )不能位于开头 [left == n right =n -1] 只有在前面有( 没有被匹配的时候(left大于right)的时候 才能加上 )[if left 阅读全文
posted @ 2019-05-29 00:27 夜歌乘年少 阅读(2975) 评论(1) 推荐(0)
摘要:突然发现代码开头的注释取消注释就是ListNode的定义,可以本地调试了。。。 这道题注意两个链表可以同时为None. Runtime: 44 ms, faster than 86.67% of Python3 online submissions forMerge Two Sorted Lists 阅读全文
posted @ 2019-05-27 23:52 夜歌乘年少 阅读(208) 评论(0) 推荐(0)
摘要:链表题没法在本地打断点调试真的烦。。。不过好在这题简单 注意考虑要去除的元素在正数第一位的情况就好。 Runtime: 40 ms, faster than 88.15% of Python3 online submissions forRemove Nth Node From End of Lis 阅读全文
posted @ 2019-05-27 22:47 夜歌乘年少 阅读(180) 评论(0) 推荐(0)
摘要:参考资料:https://blog.csdn.net/puqutogether/article/details/45574903 写一个回溯法递归快要掉了半条命。。。什么时候菜到这种地步了。。。哎 注意在return前的那次循环后面要删除最后一个添加的字符,让循环可以继续,不会退出到主函数里。参考最 阅读全文
posted @ 2019-05-27 18:12 夜歌乘年少 阅读(223) 评论(0) 推荐(0)
摘要:出差没有状态,啃不动前面几道硬骨头,倒着做。 Ver.1: 时间复杂度很美,但是无法处理 1 2 2 2 5, 1 1 1 2 3这类输入: Ver.2: 其实只要去掉末尾的判断,然后不断缩短list就行了: Runtime: 2480 ms, faster than 100.00% of Pyth 阅读全文
posted @ 2019-05-26 23:21 夜歌乘年少 阅读(475) 评论(0) 推荐(0)
摘要:testcase311/313: 跑半小时的代码: 阅读全文
posted @ 2019-05-18 14:56 夜歌乘年少 阅读(367) 评论(0) 推荐(0)
摘要:方法有点蠢,没想好怎么不用循环取所有元素的前index位,就顺手这么写了。 Success Details Runtime: 32 ms, faster than 99.37% of Python3 online submissions forLongest Common Prefix. Memor 阅读全文
posted @ 2019-05-18 13:48 夜歌乘年少 阅读(197) 评论(1) 推荐(0)
摘要:应该有比双循环更省时间的方法(in),可惜在客户现场网络不好,就用双循环做了。 Success Details Success Runtime: 96 ms, faster than 54.32% of Python3 online submissions forRoman to Integer. 阅读全文
posted @ 2019-05-15 19:21 夜歌乘年少 阅读(171) 评论(0) 推荐(0)
摘要:做好分类,注意边界。 Success Details Success Runtime: 52 ms, faster than 98.97% of Python3 online submissions forInteger to Roman. Memory Usage: 13.3 MB, less t 阅读全文
posted @ 2019-05-15 12:53 夜歌乘年少 阅读(223) 评论(1) 推荐(0)
摘要:随手写一个循环,42testcase TLE。 从两侧向中央循环会漏条件,先放着吧。 阅读全文
posted @ 2019-05-10 10:30 夜歌乘年少 阅读(158) 评论(0) 推荐(0)
摘要:(leetcode给的范例已经不是模糊了 根本就是导向答题者往错误的地方想,还是要自己做好分类。 错误的思路,无法处理字符串中央的.*代表匹配0次: 阅读全文
posted @ 2019-05-04 20:39 夜歌乘年少 阅读(170) 评论(0) 推荐(0)
摘要:简单题,如果不转string要牺牲一些时间复杂度: Submission Detail 11509 / 11509 test cases passed. Status: Accepted Runtime: 128 ms Memory Usage: 13.2 MB Submitted: 1 minut 阅读全文
posted @ 2019-05-04 18:21 夜歌乘年少 阅读(156) 评论(0) 推荐(0)
摘要:分 空白 无符号 正号 负号 无意义符号分别讨论: 有点难看 应该写成函数分开的 Submission Detail 1079 / 1079 test cases passed. Status: Accepted Runtime: 44 ms Memory Usage: 13.3 MB Submit 阅读全文
posted @ 2019-05-03 12:27 夜歌乘年少 阅读(162) 评论(0) 推荐(0)