• 2023-10-18[LeetCode] 2530. Maximal Score After Applying K Operations
    Youaregivena 0-indexed integerarray nums andaninteger k.Youhavea startingscore of 0.Inone operation:chooseanindex i suchthat 0<=i<nums.length,increaseyour score by nums[i],andreplace nums[i] with ceil(nums[i]/3).
  • 2023-09-14[LeetCode] 85. Maximal Rectangle_Hard tag: Dynamic Programming
    Givena rowsxcols binary matrix filledwith 0'sand 1's,findthelargestrectanglecontainingonly 1'sandreturn itsarea. Example1:Input:matrix=[["1","0","1","0","0"],["1&q
  • 2023-09-041142 Maximal Clique(附测试点1,3错误分析)
    题目:A clique isasubsetofverticesofanundirectedgraphsuchthateverytwodistinctverticesinthecliqueareadjacent.A maximalclique isacliquethatcannotbeextendedbyincludingonemoreadjacentvertex.(Quotedfromhttps://en.wikipedia.or
  • 2023-08-17CF803C Maximal GCD 题解
    题意构造一个长度为\(k\),和为\(n\)的严格单调递增序列,并最大化其最大公约数。(\(1\len,k\le10^{10}\))题解首先可以发现一个事实,这个序列的最大公约数一定为\(n\)的因子。所以我们可以考虑枚举\(n\)的所有因子并判断其能否成为整个序列的最大公约数。假设我们现在枚