随笔分类 - 动态规划 记忆化搜索
摘要:题目链接:点这里 题意: 1~N标号的球 现在A有C个,B有C个 每次可以随机得到D个不同的球(1~N);问你A或B中的C个球都出现一次的 期望次数 题解: dp[i][j][k]表示 随机出现了i个仅仅属于A的球的个数,仅仅属于B的球的个数,同时属于A,B的球的个数
阅读全文
摘要:Cake slicing A rectangular cake with a grid of m×n unit squares on its topneeds to be sliced into pieces. Several cherries are scatteredon the top of
阅读全文
摘要:F Fighting for Triangles DescriptionAndy and Ralph are playing a two-player game on a triangular board that looks like the following:1 234 ...
阅读全文
摘要:Alexander Charles McMillan loves to gamble, and during his last trip to the casino he ran across a new game. It is played on a linear sequence of squa...
阅读全文
摘要:B. Longtail HedgehogThis Christmas Santa gave Masha a magic picture and a pencil. The picture consists ofnpoints connected bymsegments (they might cro...
阅读全文
摘要:1079: [SCOI2008]着色方案Description有n个木块排成一行,从左到右依次编号为1~n。你有k种颜色的油漆,其中第i种颜色的油漆足够涂ci个木块。所有油漆刚好足够涂满所有木块,即c1+c2+...+ck=n。相邻两个木块涂相同色显得很难看,所以你希望统计任意两个相邻木块颜色不同的...
阅读全文
摘要:D. ZumaGenos recently installed the game Zuma on his phone. In Zuma there exists a line ofngemstones, thei-th of which has colorci. The goal of the ga...
阅读全文
摘要:PermutationProblem DescriptionThere is an arrangement of N numbers and a permutation relation that alter one arrangement into a...
阅读全文
摘要:Problem H: Two EndsIn the two-player game “Two Ends”, an even number of cards is laid out in a row. On each card, faceup, is written a positive intege...
阅读全文

浙公网安备 33010602011771号