摘要:
Stamps and Enovelope Size 题意: 给你最多贴S张邮票。有N个邮票集合,每个集合有不同的面值。问哪个集合的最大连续邮资最大,输出最大连续邮资和集合元素。 如果不止一个集合结果相同,输出集合元素少的,如果仍相同,输出最大面值小的。 思路: 最开始直接进行的深搜,感觉应该会TL, 阅读全文
摘要:
题意: 给你一串数字,要求你对其进行折叠使其长度最短。 折叠情况:全是一个字母 & 重复的字符串 AAAAAAAAAABABABCCD --> 9(A)3(AB)CCD NEERCYESYESYESNEERCYESYESYES --> 2(NEERC3(YES)) 思路: 用dp[i][j]表示从 阅读全文
摘要:
题意: 给你一个残缺的塔,每个数字由他下面左右两个数相加得。给你其中一部分,要求输出全部的数字。 阅读全文
摘要:
Cake Slicing 题意:有一个n行m列的网格上有一些黑点,要求进行切割,使最后每块上只有一个黑点,求最少的刀数 思路:记忆化搜索,枚举每一条边来切,每一次搜索自己所能切割的所有情况取最小值 但是TL,纠结了一下,发现明明2个for(横+竖)就能切出来,硬是被我写成了n^2 的,自己好坑- - 阅读全文