摘要: https://leetcode.com/problems/divisor-game/ Alice and Bob take turns playing a game, with Alice starting first. Initially, there is a number N on the 阅读全文
posted @ 2019-05-06 22:39 丧心病狂工科女 阅读(302) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/min-cost-climbing-stairs/ On a staircase, the i-th step has some non-negative cost cost[i] assigned (0 indexed). Once yo 阅读全文
posted @ 2019-05-06 20:00 丧心病狂工科女 阅读(113) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/counting-bits/ Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the numbe 阅读全文
posted @ 2019-05-06 19:35 丧心病狂工科女 阅读(91) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/unique-binary-search-trees/ Given n, how many structurally unique BST's (binary search trees) that store values 1 ... n? 阅读全文
posted @ 2019-05-06 17:55 丧心病狂工科女 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 给字符串 s 然后 Q 次询问 字符串 t 是不是 s 的子序列 序列自动机是用来判断是否是子序列的算法 时间复杂度是 $O(len)$ nx[i][j] 数组存的是在 s 中第 i 位后面第一个 j 字母出现的位置 阅读全文
posted @ 2019-05-06 15:57 丧心病狂工科女 阅读(1224) 评论(1) 推荐(0) 编辑
摘要: A. Stock Arbitraging Welcome to Codeforces Stock Exchange! We're pretty limited now as we currently allow trading on one stock, Codeforces Ltd. We hop 阅读全文
posted @ 2019-05-06 12:57 丧心病狂工科女 阅读(321) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/2-keys-keyboard/ Initially on a notepad only one character 'A' is present. You can perform two operations on this notepa 阅读全文
posted @ 2019-05-06 10:08 丧心病狂工科女 阅读(129) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/student-attendance-record-ii/ Given a positive integer n, return the number of all possible attendance records with leng 阅读全文
posted @ 2019-05-06 09:45 丧心病狂工科女 阅读(110) 评论(0) 推荐(0) 编辑