随笔分类 - ACM
摘要:Problem Description很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。Input本题目包含多组测试,请处理到...
阅读全文
摘要:DescriptionAngel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M 2 #include 3 #include 4 #defi...
阅读全文
摘要:DescriptionThere is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a...
阅读全文
摘要:Description一个每块地板标记着0~9某个数字的迷宫,其中标记1的地板不可以走,标记2~9的地板可以不花时间地跳到任意相同数字的位置,也可以和标记0的地板一样向前后左右任意方向花1个单位时间移动1的距离。给出起点和终点,求起点到终点的最短时间。Input每组数据第一行一个n,表示尺寸,2 ...
阅读全文
摘要:DescriptionYou have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language. Fortunately, you ...
阅读全文
摘要:Problem DescriptionGive you three sequences of numbers A, B, C, then we give you a number X. Now you need to calculate if you can find the three numbe...
阅读全文
摘要:Description— The Brother of mine, the Head of Monastic Order wants to know tomorrow about the results long-term researches. He wants to see neither mo...
阅读全文
摘要:DescriptionTokyoflash推出了一款摩斯电码手表,样图如下。要读懂这款手表,首先要了解一些摩斯电码的知识。在了解了这些摩斯电码符号之后,就不难看懂表盘中显示的信息是“02 17 PM”了,也就是指下午2点17分。在12小时计时法中小时的取值范围为01到12之间的整数,AM代表上午,P...
阅读全文
摘要:DescriptionThe Farey Sequence Fn for any integer n with n >= 2 is the set of irreducible rational numbers a/b with 0 2 #include 3 #define N 1000010 4...
阅读全文
摘要:DescriptionA lattice point (x,y) in the first quadrant (xandyare integers greater than or equal to 0), other than the origin, is visible from the orig...
阅读全文
摘要:Description中南大学ACM的暑期集训马上就要开始了,这次集训会将全体N名集训队员(编号分别为1, 2, …, N)按集训选拔赛的排名分成两组,前K名队员分入A组,其余队员分入B组。但现在助理教练CSGrandeur一不小心把集训选拔赛的排名弄丢了,而之前又没将A组和B组的人员确定出来,于是...
阅读全文
摘要:Problem DescriptionMr Wang wants some boys to help him with a project. Because the project is rather complex,the more boys come, the better it will be...
阅读全文
摘要:Problem DescriptionA tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by dire...
阅读全文
摘要:Problem Description上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从...
阅读全文
摘要:Description给定些数字,这些数中只有一个数出现了奇数次,找出这个数。Input每组数据第一行n表示数字个数,1 2 int main() 3 { 4 int n, x, ans; 5 while (scanf("%d", &n) != EOF) 6 { 7 ...
阅读全文
摘要:DescriptionThe Happy Desert is full of sands. There is only a kind of animal called camel living on the Happy Desert. ‘Cause they live here, they need...
阅读全文
摘要:Description你有一个日志文件,里面记录着各种系统事件的详细信息。自然的,事件的时间戳按照严格递增顺序排列(不会有两个事件在完全相同的时刻发生)。遗憾的是,你的系统被病毒感染了,日志文件中混入了病毒生成的随机伪事件(但真实事件的相对顺序保持不变)。备份的日志文件也被感染了,但由于病毒采用的随...
阅读全文
摘要:Problem DescriptionToday is Ignatius' birthday. He invites a lot of friends. Now it's dinner time. Ignatius wants to know how many tables he needs at ...
阅读全文
摘要:DescriptionYou've decided to carry out a survey in the theory of prime numbers. Let us remind you that a prime number is a positive integer that has e...
阅读全文
摘要:Problem DescriptionThere is a town with N citizens. It is known that some pairs of people are friends. According to the famous saying that “The friend...
阅读全文

浙公网安备 33010602011771号