http://wenku.baidu.com/view/728cd5126edb6f1aff001fbb.html 关于悬线法,这里面有详解. 我当时只想到了记录最大长度,却没有想到如果连最左边和最右边的位置都记录的话这题就可以解决了. 学习了一种新算法很开心. Cut the cake Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 8…
Cut the cake Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1250 Accepted Submission(s): 489 Problem Description: Mark bought a huge cake, because his friend ray_sun’s birthday is coming. Ma…
Cut the Cake Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 263 Accepted Submission(s): 113 Problem Description MMM got a big big big cake, and invited all her M friends to eat the cake toge…
MMM got a big big big cake, and invited all her M friends to eat the cake together. Surprisingly one of her friends HZ took some (N) strawberries which MMM likes very much to decorate the cake (of course they also eat strawberries, not just for dec…
Cut the Cake Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 300 Accepted Submission(s): 135 Problem Description MMM got a big big big cake, and invited all her M friends to eat the cake toge…
Strange Towers of Hanoi Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 2677 Accepted: 1741 Description Background Charlie Darkbrown sits in another one of those boring Computer Science lessons: At the moment the teacher just explains the…
World Cup Noise Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 16374 Accepted: 8097 Description Background "KO-RE-A, KO-RE-A" shout 54.000 happy football fans after their team has reached the semifinals of the FIFA World Cup in their…
Cut the Cake Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1657 Accepted Submission(s): 806 Problem Description MMM got a big big big cake, and invited all her M friends to eat the cake tog…
Common Subsequence Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 22698 Accepted Submission(s): 9967 Problem Description A subsequence of a given sequence is the given sequence with some el…
题目 CF2B The least round way 做法 后面\(0\)的个数,\(2\)和\(5\)是\(10\)分解质因数 则把方格中的每个数分解成\(2\)和\(5\),对\(2\)和\(5\)求两边动规,得出最小值\(ans=min(num_2,num_5)\) 我们贪心地选择最小值所对应的\(2\)或\(5\),然后从\((n,n)\)按动规路径返回 Code #include<bits/stdc++.h> typedef int LL; const LL maxn=1e3+9;…