摘要: 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 雪溯 阅读(166) 评论(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 雪溯 阅读(231) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=3352有重边的话重边就不被包含在双连通里了割点不一定连着割边,因为这个图不一定是点连通,所以可能出现反而多增加了双连通分量数的可能必须要用割边的思路来看#include #include using namespace std;const int... 阅读全文
posted @ 2014-08-17 15:41 雪溯 阅读(160) 评论(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 雪溯 阅读(352) 评论(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 雪溯 阅读(232) 评论(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) 编辑
摘要: 感受到出题人深深的~恶意这提醒人们以后。。。数字后面要用gets~不要getchar此外。。不要相信那个100?Borg MazeTime Limit:1000MSMemory Limit:65536KTotal Submissions:8524Accepted:2872DescriptionThe... 阅读全文
posted @ 2014-08-13 12:09 雪溯 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 这教导人们一定要看题,要看题,元音包含了‘y’,完毕,要看题啊#include #include #include using namespace std;char buff[1001];int main(){ scanf("%s",buff); for(int i=0;buff[i];... 阅读全文
posted @ 2014-08-12 21:20 雪溯 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 题目:给定3#include using namespace std;const int maxsum=250*250*2+1;const int maxhlen=250*250;bool vis[maxsum];int len[maxsum];int use[maxhlen];int heap[m... 阅读全文
posted @ 2014-08-10 10:53 雪溯 阅读(209) 评论(0) 推荐(0) 编辑