摘要:
很典型的数位dp,把全球第一的代码拿过来研究了一下,加了点注释 代码作者:waakaaka 个人主页:https://leetcode.com/waakaaka/ 阅读全文
摘要:
1 class Solution 2 { 3 public: 4 int shipWithinDays(vector& weights, int D) 5 { 6 int load = 0; 7 for(int i = 0; i=0) 20 { 21 ... 阅读全文
摘要:
class Solution { public: int numPairsDivisibleBy60(vector& time) { int hash[1501] {0}; for(int i = 0;i =0&&left <= 1500) { ... 阅读全文
摘要:
1 #define _for(i,a,b) for(int i = (a);i < (b);i ++) 2 class Solution 3 { 4 public: 5 int bitwiseComplement(int N) 6 { 7 if(N==0) 8 return 1; 9... 阅读全文