摘要: River HopscotchTime Limit:2000MSMemory Limit:65536KTotal Submissions:3659Accepted:1587DescriptionEvery year the cows hold an event featuring a peculiar version of hopscotch that involves carefully jumping from rock to rock in a river. The excitement takes place on a long, straight river with a rock 阅读全文
posted @ 2014-04-12 19:48 acvc 阅读(184) 评论(0) 推荐(0) 编辑
摘要: CodeForces 3 67EDescriptionSereja is interested in intervals of numbers, so he has prepared a problem about intervals for you. An interval of numbers is a pair of integers[l, r](1 ≤ l ≤ r ≤ m). Interval[l1, r1]belongs to interval[l2, r2]if the following condition is met:l2 ≤ l1 ≤ r1 ≤ r2.Sereja want 阅读全文
posted @ 2014-04-08 23:23 acvc 阅读(468) 评论(2) 推荐(0) 编辑
摘要: Mashmokh and NumbersIt's holiday. Mashmokh and his boss, Bimokh, are playing a game invented by Mashmokh.In this game Mashmokh writes sequence ofndistinct integers on the board. Then Bimokh makes several (possibly zero) moves. On the first move he removes the first and the second int... 阅读全文
posted @ 2014-04-07 11:45 acvc 阅读(303) 评论(0) 推荐(0) 编辑
摘要: D. Mashmokh and ACMMashmokh's boss, Bimokh, didn't like Mashmokh. So he fired him. Mashmokh decided to go to university and participate in ACM instead of finding a new job. He wants to become a member of Bamokh's team. In order to join he was given some programming tasks and one ... 阅读全文
posted @ 2014-04-07 11:39 acvc 阅读(210) 评论(0) 推荐(0) 编辑
摘要: Pierre is recently obsessed with an online game. To encourage users to log in, this game will give users a continuous login reward. The mechanism of continuous login reward is as follows: If you have not logged in on a certain day, the reward of that day is 0, otherwise the reward is the previous da 阅读全文
posted @ 2014-04-06 20:40 acvc 阅读(372) 评论(0) 推荐(0) 编辑
摘要: 近日闲的蛋疼做了6道水题。number one:欧拉回路判断 hdu单词接龙。number two:CodeForces 296A很欣喜的A了这道题,后来才知道是div2的A题,我脑残。number threeCodeForces 284A很逗比的一题,开始想用费马小定理,不过最后还是模拟过的。number fourCodeForces 287B赤裸裸的贪心+数学。又是div2的B题怎么感觉B题有C题的难度。做不出感觉自己sb,做出没啥感觉,很纠结。number fiveCodeForces 289B逗比的排序题目,number sixCodeForces 296B组合数学,也可以dp做 ps 阅读全文
posted @ 2014-04-04 22:28 acvc 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 欧拉回路裸题了啦啦。2#include3#include4#include5#include6usingnamespacestd;7constintMAX=1e3+10;8intdeg[MAX];9structedge10{11intfrom,to;12};13vectorans[MAX];14intvis[MAX];15intG[MAX][MAX];16voiddfs(intu,intn)17{18vis[u]=1;19for(inti=1;i<=n;i++)if(!vis[i]&&G[u][i])20dfs(i,n);21}22intmain()23{24intn,m 阅读全文
posted @ 2014-04-03 22:54 acvc 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Ant TripProblem DescriptionAnt Country consist of N towns.There are M roads connecting the towns.Ant Tony,together with his friends,wants to go through every part of the country.They intend to visit every road , and every road must be visited for exact one time.However,it may be a mission impossible 阅读全文
posted @ 2014-04-03 21:23 acvc 阅读(203) 评论(0) 推荐(0) 编辑
摘要: DescriptionA network administrator manages a large network. The network consists of N computers and M links between pairs of computers. Any pair of computers are connected directly or indirectly by successive links, so data can be transformed between any two computers. The administrator finds that s 阅读全文
posted @ 2014-04-02 11:24 acvc 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 没事扯淡再写篇题解吧!反正只会大众题目。A:题意:给出n个队列以及每个人付费所需要的时间求出用时最短的一条队列。sl:比较逗比(叙述这么长)的水体,5分钟1Y 。1#include2#include3#include4usingnamespacestd;5constintMAX=100+10;6constintinf=0x3f3f3f3f;7intk[MAX];8intmain()9{10intn;inta;intret,ans;11while(scanf("%d",&n)==1)12{13ret=0;ans=inf;14for(inti=0;i2#include3 阅读全文
posted @ 2014-03-31 20:23 acvc 阅读(334) 评论(0) 推荐(0) 编辑