题目链接: http://acm.split.hdu.edu.cn/showproblem.php?pid=1950 Description 'Oh no, they've done it again', cries the chief designer at the Waferland chip ...
分类:
其他好文 时间:
2016-08-19 22:06:15
阅读次数:
158
题目地址:http://acm.split.hdu.edu.cn/showproblem.php?pid=5521
思路:边数太多,不能直接建图。对于每个集合,设置一个虚拟点,对于每个集合中的点u:连一条u->S权值为0的边(点在集合中,花费为0);连一条S->u权值为w的边(从集合中一点到另一点花费w)。分别计算从点1到i和从点n到i的最短路,枚举i,则ans=min( ans,max ( d...
分类:
其他好文 时间:
2016-08-19 20:51:28
阅读次数:
181
题目链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=1270 题意:给出N个5000以内的两两相加产生的N*(N-1)/2个数(已排好序),求那N个数。(按序输出) 思路:将给出的序列称为a,N个数的序列称为b,则b1+b2=a1,b1+b3=a ...
分类:
其他好文 时间:
2016-08-19 20:48:41
阅读次数:
363
题目链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=1022 题意:给出火车在进站口的顺序,火车进站,出站遵循先进后出的规律问能实现出站顺序如给出的顺序吗?能输出步骤,不能输出No 方法:用数组v[i]表示进站的第i个火车是v[i],用vis[i ...
分类:
其他好文 时间:
2016-08-19 20:46:08
阅读次数:
171
Description 有N个比赛队(1<=N<=500),编号依次为1,2,3,。。。。,N进行比赛,比赛结束后,裁判委员会要将所有参赛队伍从前往后依次排名,但现在裁判委员会不能直接获得每个队的比赛成绩,只知道每场比赛的结果,即P1赢P2,用P1,P2表示,排名时P1在P2之前。现在请你编程序确定 ...
分类:
Web程序 时间:
2016-08-19 20:42:12
阅读次数:
176
http://acm.split.hdu.edu.cn/showproblem.php?pid=5652 题意:中国和印度中间由平原'0'和高山'1'两种地理环境。高山是无限高的,不论怎样过不去。每一年都会又多出一座高山。下面K行表示第i年maps[x][y]变为高山。问你在第几年后,两国人民不能再 ...
分类:
其他好文 时间:
2016-08-19 20:40:30
阅读次数:
150
题目链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=1042 题意:求N!(N<10000) 方法:用数组储存数,因为位数太多,每位存5个数 ...
分类:
其他好文 时间:
2016-08-19 20:35:29
阅读次数:
123
题目链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=5391 题意:求(n-1)!对n取模 方法:如果是素数就是n-1,如果不是素数(除了4)都是0,4的结果是2 ...
分类:
其他好文 时间:
2016-08-19 20:32:33
阅读次数:
148
题目链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=5234 题意:一个N*M的方阵,每个值代表蛋糕量,只能选择吃完或不吃,从(1,1)只能向下和向右走的情况下到(n,m)。问在不超过K值情况下,最多能吃多少? 方法:用dp[i][j][k]表示 ...
分类:
移动开发 时间:
2016-08-19 20:30:43
阅读次数:
212
http://acm.split.hdu.edu.cn/showproblem.php?pid=4405 Aeroplane chess Problem Description Hzz loves aeroplane chess very much. The chess map contains N ...
分类:
其他好文 时间:
2016-08-19 19:07:11
阅读次数:
143