摘要: POJ推荐50题1. 标记 难 和 稍难 的题目大家可以看看,思考一下,不做要求,当然有能力的同学可以直接切掉。2. 标记为 A and B 的题目是比较相似的题目,建议大家两个一起做,可以对比总结,且二者算作一个题目。3. 列表中大约有70个题目。大家选做其中的50道,且每类题目有最低数量限制。4. 这里不少题目在 BUPT ACM FTP 上面都有代码,请大家合理利用资源。5. 50个题目要求每个题目都要写总结,养成良好的习惯。6. 这50道题的规定是我们的建议,如果大家有自己的想法请与我们 Email 联系。7. 建议使用 C++ 的同学在 POJ 上用 G++ 提交。8. 形成自己编写 阅读全文
posted @ 2012-04-10 22:36 'wind 阅读(221) 评论(0) 推荐(0)
摘要: Problem DescriptionThe Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ago. But the jungle overtakes roads relentlessly, so the large road network is too expensive to maintain. The Council of Elders must 阅读全文
posted @ 2012-04-10 21:15 'wind 阅读(153) 评论(0) 推荐(0)
摘要: Input输入数据首先包含一个正整数N,表示测试实例的个数,然后是N行数据,每行包括三个正整数A,B,C。Output对每个测试实例请输出计算后的结果,每个实例的输出占一行。Sample Input3 2 3 4 3 3 5 4 4 6Sample Output0 2 4code:View Code #include<stdio.h>int mod;int fu(long long a,long long b){ long long ans=1,m=a; while(b) { if(b&1) ans=(ans*m)%mod; ... 阅读全文
posted @ 2012-04-10 20:13 'wind 阅读(142) 评论(0) 推荐(0)
摘要: Problem Description在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最短的从商店到赛场的路线,你可以帮助他们吗?Input输入包括多组数据。每组数据第一行是两个整数N、M(N<=100,M<=10000),N表示成都的大街上有几个路口,标号为1的路口是商店所在地,标号为N的路口是赛场所在地,M则表示在成都有几条路。N=M=0表示输入结束。接下来M行,每行包括3个整数A,B,C(1<=A,B<=N,1<=C<=1000),表示在 阅读全文
posted @ 2012-04-10 19:41 'wind 阅读(279) 评论(0) 推荐(0)
摘要: DescriptionYou have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language. Fortunately, you have a dictionary to help you understand them.InputInput consists of up to 100,000 dictionary entries, followed by a blank line, followed by a message 阅读全文
posted @ 2012-04-10 18:52 'wind 阅读(315) 评论(0) 推荐(0)