摘要: import java.math.BigInteger;import java.util.Scanner;public class Main { static BigInteger p,l,r,div; static int n; public static int cmp(Big... 阅读全文
posted @ 2014-08-28 10:24 雪溯 阅读(212) 评论(0) 推荐(0) 编辑
摘要: http://codeforces.com/contest/462A:Appleman and Easy Task要求是否全部的字符都挨着偶数个'o'#include using namespace std;char maz[101][101];int n;int cnt[101][101];con... 阅读全文
posted @ 2014-08-28 08:45 雪溯 阅读(343) 评论(0) 推荐(0) 编辑
摘要: ParatroopersTime Limit:1000MSMemory Limit:65536KTotal Submissions:7267Accepted:2194DescriptionIt is year 2500 A.D. and there is a terrible war between... 阅读全文
posted @ 2014-08-21 09:42 雪溯 阅读(170) 评论(0) 推荐(0) 编辑
摘要: Going HomeTime Limit:1000MSMemory Limit:65536KTotal Submissions:17955Accepted:9145DescriptionOn a grid map there are n little men and n houses. In eac... 阅读全文
posted @ 2014-08-20 10:44 雪溯 阅读(170) 评论(0) 推荐(0) 编辑
摘要: Minimum CostTime Limit:4000MSMemory Limit:65536KTotal Submissions:13511Accepted:4628DescriptionDearboy, a goods victualer, now comes to a big problem,... 阅读全文
posted @ 2014-08-20 09:52 雪溯 阅读(202) 评论(0) 推荐(0) 编辑
摘要: Jamie's Contact GroupsTime Limit:7000MSMemory Limit:65536KTotal Submissions:6511Accepted:2087DescriptionJamie is a very popular girl and has quite a l... 阅读全文
posted @ 2014-08-18 13:47 雪溯 阅读(234) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=3352有重边的话重边就不被包含在双连通里了割点不一定连着割边,因为这个图不一定是点连通,所以可能出现反而多增加了双连通分量数的可能必须要用割边的思路来看#include #include using namespace std;const int... 阅读全文
posted @ 2014-08-17 15:41 雪溯 阅读(163) 评论(0) 推荐(0) 编辑
摘要: http://codeforces.com/contest/459A题 Pashmak and Garden化简化简水题,都告诉平行坐标轴了,数据还出了对角线,后面两个点坐标给的范围也不错#include int x[4],y[4];int abs(int n){ return n#inclu... 阅读全文
posted @ 2014-08-17 02:52 雪溯 阅读(357) 评论(0) 推荐(0) 编辑
摘要: 给你一个uint32 a,让你找到另一个uint32 b,使b > a,且b的二进制中1的个数等于a二进制中1的个数。且使b最小。(数据保证可出)1 因为1的个数不变,所以必然大于n+lowbit(n);(lowbit(int n){return n&-n;}//取n的最小一个100000串,也就是... 阅读全文
posted @ 2014-08-16 23:55 雪溯 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 坑!!!我还以为一个整数会截到两行!!Agri-NetTime Limit:1000MSMemory Limit:10000KTotal Submissions:40056Accepted:16303DescriptionFarmer John has been elected mayor of h... 阅读全文
posted @ 2014-08-13 15:19 雪溯 阅读(151) 评论(0) 推荐(0) 编辑