2013年6月3日

Uva 10859 - Placing Lampposts 树形dp

摘要: Input: Standard InOutput: Standard OutNext Generation Contest 1Time Limit: 2 secondsProblem DPlacing LamppostsAs a part of the mission �Beautification of Dhaka City�, the government has decided to replace all the old lampposts with new expensive ones. Since the new ones are quite expensive and the b 阅读全文

posted @ 2013-06-03 15:56 电子幼体 阅读(170) 评论(0) 推荐(0) 编辑

Uva 11825 - Hackers' Crackdown 状态压缩

摘要: Problem HHackers’ CrackdownInput:Standard InputOutput:Standard OutputMiracle Corporations has a number of system services running in a distributed computer system which is a prime target for hackers. The system is basically a set ofNcomputer nodes with each of them running a set ofNservices. Note th 阅读全文

posted @ 2013-06-03 10:42 电子幼体 阅读(172) 评论(0) 推荐(0) 编辑

Uva 10891 - Game of Sum dp博弈

摘要: Problem EGame of SumInput File:e.inOutput:Standard OutputThis is a two player game. Initially there areninteger numbers in an array and playersAandBget chance to take them alternatively. Each player can take one or more numbers from the left or right end of the array but cannot take from both ends a 阅读全文

posted @ 2013-06-03 01:58 电子幼体 阅读(140) 评论(0) 推荐(0) 编辑

高斯消元模板

摘要: int gauss(int r, int c) { bool flag=false; int coe=1; int i=0,t=0; for(int j=0; j0) { index=k; break; } if(a[index][j]) { if(index != i) { for(int k=j; k=j; --l) ... 阅读全文

posted @ 2013-06-03 00:48 电子幼体 阅读(117) 评论(0) 推荐(0) 编辑

导航