A good way to get a competitive edge is to write down a game plan for what you're going to do in a contest round. This will help you script out your actions, in terms of what to do both when things go... Read More
posted @ 2010-05-22 12:27 ACHunter Views(300) Comments(0) Diggs(0)
>>原题传送门<<解法:DP注意到如果剩余[L,R]区间内的作业还没有交,最优解一定是先交L点或R点。可以证明如果先交M点(L<M<R)的作业不会得到更优的解,因为交过M点后依然需要交R点和L点的作业,那么路径M»L»R或M»R»L一定会再次经过M,而那是M一定是可交的。进一步可得未交区间[0,1000]缩小至[E,E] ... Read More
posted @ 2010-05-15 23:00 ACHunter Views(241) Comments(0) Diggs(0)
>>>原题传送门<<<  状态压缩DP,用三维数组dp[i][j][k]记录状态,i的二进制表示已上场的球员——右边第x位为1表示第x号球员已经上过场;j的二进制表示各垒的情况——右边第x位为1表示第x垒有球员;k表示已出局或牺牲的人数;从初状态dp[0][0][0] = 0开始枚举每一个该状态下还没上场的球员此刻... Read More
posted @ 2010-05-10 21:50 ACHunter Views(237) Comments(0) Diggs(0)
代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--#include<cstdio>#include<cstring>#include<algorithm>usingnamespacestd;#defineLC(x... Read More
posted @ 2010-05-10 18:41 ACHunter Views(150) Comments(0) Diggs(0)