07 2012 档案

摘要:FlowersTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 0Accepted Submission(s): 0Problem DescriptionAs is known to all, the blooming time and duration varies between different kinds of flowers. Now there is a garden planted full of flowers. The gar 阅读全文
posted @ 2012-07-31 17:25 jiai 阅读(266) 评论(7) 推荐(0)
摘要:Power transmissionTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 998Accepted Submission(s): 352Problem DescriptionThe project West-East power transmission is famous around the world. It transmits the electricity from western areas to east China 阅读全文
posted @ 2012-07-30 18:09 jiai 阅读(290) 评论(0) 推荐(0)
摘要:MatrixTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1011Accepted Submission(s): 348Problem DescriptionMachines have once again attacked the kingdom of Xions. The kingdom of Xions has N cities and N-1 bidirectional roads. The road network is such 阅读全文
posted @ 2012-07-29 11:00 jiai 阅读(441) 评论(0) 推荐(0)
摘要:HeroTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 860Accepted Submission(s): 427Problem DescriptionWhen playing DotA with god-like rivals and pig-like team members, you have to face an embarrassing situation: All your teammates are killed, and yo 阅读全文
posted @ 2012-07-29 09:45 jiai 阅读(265) 评论(0) 推荐(0)
摘要:Meeting point-2Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 550Accepted Submission(s): 322Problem DescriptionIt has been ten years since TJU-ACM established. And in this year all the retired TJU-ACMers want to get together to celebrate the tenth 阅读全文
posted @ 2012-07-29 09:03 jiai 阅读(230) 评论(0) 推荐(0)
摘要:Meeting point-1Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1546Accepted Submission(s): 464Problem DescriptionIt has been ten years since TJU-ACM established. And in this year all the retired TJU-ACMers want to get together to celebrate the tent 阅读全文
posted @ 2012-07-28 18:56 jiai 阅读(228) 评论(0) 推荐(0)
摘要:2081: 最优贸易Time Limit:1000 ms Memory Limit:131072 kBJudge type: Multi-cases(Detailed Mode - 10 cases)Total Submit :236(51 users)Accepted Submit :82(35 users)Page View : 3006 C 国有 n 个大城市和 m 条道路,每条道路连接这 n 个城市中的某两个城市。任意两个城市之间最多只有一条道路直接相连。这 m 条道路中有一部分为单向通行的道路,一部分为双向通行的道路,双向通行的道路在统计条数时也计为 1 条。 C 国幅员辽阔,各地的 阅读全文
posted @ 2012-07-28 17:04 jiai 阅读(339) 评论(0) 推荐(0)
摘要:最短路径问题Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4537Accepted Submission(s): 1356Problem Description给你n个点,m条无向边,每条边都有长度d和花费p,给你起点s终点t,要求输出起点到终点的最短距离及其花费,如果最短距离有多条路线,则输出花费最少的。Input输入n,m,点的编号是1~n,然后是m行,每行4个数 a,b,d,p,表示a和b之间有一条边,且其长度为d,花费为p。最后一行是 阅读全文
posted @ 2012-07-27 21:56 jiai 阅读(142) 评论(0) 推荐(0)
摘要:WormholesTime Limit:2000MSMemory Limit:65536KTotal Submissions:20003Accepted:7088DescriptionWhile exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that delivers you to its destination at a time that is BEFORE 阅读全文
posted @ 2012-07-27 21:17 jiai 阅读(145) 评论(0) 推荐(0)
摘要:Invitation CardsTime Limit:8000MSMemory Limit:262144KTotal Submissions:14080Accepted:4562DescriptionIn the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are aware of this fact. They want to propagate theater and, most of all, Antique Comedies. They 阅读全文
posted @ 2012-07-27 20:05 jiai 阅读(216) 评论(0) 推荐(0)
摘要:Board GamesTime Limit:5 Seconds Memory Limit:32768 KBYou have been hired by the quality control division of a world famous board game company. Their creative and design division comes up, on a daily basis, with great ideas for board games, but sometimes the scoring of the proposed games does not mat 阅读全文
posted @ 2012-07-27 15:55 jiai 阅读(183) 评论(0) 推荐(0)
摘要:Til the Cows Come HomeTime Limit:1000MSMemory Limit:65536KTotal Submissions:20964Accepted:6985DescriptionBessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie needs her beauty sleep, so she wants to 阅读全文
posted @ 2012-07-27 14:19 jiai 阅读(199) 评论(0) 推荐(0)
摘要:最短路Time Limit: 5000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 13761Accepted Submission(s): 5856Problem Description在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最短的从商店到赛场的路线,你可以帮助他们吗?Input输入包括多组数据。每组数据第一行是两个整数N、M(N<=100,M 阅读全文
posted @ 2012-07-27 10:53 jiai 阅读(174) 评论(0) 推荐(0)
摘要:OJ Problem Set - 1610Count the ColorsTime Limit:2 Seconds Memory Limit:65536 KBPainting some colored segments on a line, some previously painted segments may be covered by some the subsequent ones.Your task is counting the segments of different colors you can see at last.InputThe first line of each 阅读全文
posted @ 2012-07-26 22:11 jiai 阅读(167) 评论(0) 推荐(0)
摘要:Count ColorTime Limit:1000MSMemory Limit:65536KTotal Submissions:26845Accepted:8023DescriptionChosen Problem Solving and Program design as an optional course, you are required to solve all kinds of problems. Here, we get a new problem.There is a very long board with length L centimeter, L is a posit 阅读全文
posted @ 2012-07-26 20:10 jiai 阅读(154) 评论(0) 推荐(0)
摘要:Just a HookTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8647Accepted Submission(s): 4195Problem DescriptionIn the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecut 阅读全文
posted @ 2012-07-25 18:02 jiai 阅读(247) 评论(0) 推荐(0)
摘要:I Hate ItProblem Description很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。Input本题目包含多组测试,请处理到文件结束。在每个测试的第一行,有两个正整数 N 和 M ( 0<N<=200000,0<M<5000 ),分别代表学生的数目和操作的数目。学生ID编号分别从1编到N。第二行包含N个整数,代表这N个学生的初始成绩,其中第i个数代表ID为i的学生的成绩。接下来有 阅读全文
posted @ 2012-07-25 15:32 jiai 阅读(330) 评论(0) 推荐(0)
摘要:Balanced LineupTime Limit:5000MSMemory Limit:65536KTotal Submissions:23316Accepted:10844Case Time Limit:2000MSDescriptionFor the daily milking, Farmer John'sNcows (1 ≤N≤ 50,000) always line up in the same order. One day Farmer John decides to organize a game of Ultimate Frisbee with some of the 阅读全文
posted @ 2012-07-25 14:33 jiai 阅读(186) 评论(0) 推荐(0)
摘要:Lost CowsTime Limit:1000MSMemory Limit:65536KTotal Submissions:7310Accepted:4658DescriptionN (2 <= N <= 8,000) cows have unique brands in the range 1..N. In a spectacular display of poor judgment, they visited the neighborhood 'watering hole' and drank a few too many beers before dinne 阅读全文
posted @ 2012-07-25 11:16 jiai 阅读(337) 评论(0) 推荐(0)
摘要:A Simple Problem with IntegersTime Limit:5000MSMemory Limit:131072KTotal Submissions:32903Accepted:9360Case Time Limit:2000MSDescriptionYou haveNintegers,A1,A2, ... ,AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a given interva 阅读全文
posted @ 2012-07-25 10:20 jiai 阅读(212) 评论(0) 推荐(0)
摘要:CipherDescriptionBob and Alice started to use a brand-new encoding scheme. Surprisingly it is not a Public Key Cryptosystem, but their encoding and decoding is based on secret keys. They chose the secret key at their last meeting in Philadelphia on February 16th, 1996. They chose as a secret key a.. 阅读全文
posted @ 2012-07-24 17:49 jiai 阅读(178) 评论(0) 推荐(0)
摘要:A Famous GridProblem DescriptionMr. B has recently discovered the grid named "spiral grid".Construct the grid like the following figure. (The grid is actually infinite. The figure is only a small part of it.)Considering traveling in it, you are free to any cell containing a composite numbe 阅读全文
posted @ 2012-07-24 17:40 jiai 阅读(217) 评论(0) 推荐(0)
摘要:A Famous Stone CollectorProblem DescriptionMr. B loves to play with colorful stones. There are n colors of stones in his collection. Two stones with the same color are indistinguishable. Mr. B would like toselect some stones and arrange them in line to form a beautiful pattern. After several arrange 阅读全文
posted @ 2012-07-24 17:37 jiai 阅读(236) 评论(0) 推荐(0)
摘要:A Famous CityProblem DescriptionAfter Mr. B arrived in Warsaw, he was shocked by the skyscrapers and took several photos. But now when he looks at these photos, he finds in surprise that he isn't able to point out even the number of buildings in it. So he decides to work it out as follows:- divi 阅读全文
posted @ 2012-07-24 17:33 jiai 阅读(169) 评论(0) 推荐(0)
摘要:周正虎的难题Problem Description自从周正虎被告知山上并没有老虎后就成为了当地一名伐木工人。这一次他需要砍下M米的木材,当然,自从有了新的伐木工具之后,这对他来说简直就是一件轻而易举的事情。周正虎的伐木工具的使用说明书上这样写道:机器需要设定一个高度参数H(米),然后机器就会升高到H(米),砍下所有高于H(米)的树。对于高度没有达到H(米)的树,我们认为它是幸运的,在这次砍伐中它将免受威胁。例如:现有树的高度为 20, 15, 10, 17 将机器设置为15,那么我们将砍伐到第一和第四棵树,得到的木材长度为(20-15) + (17-15) = 7。周正虎是一个爱好环境的人,所 阅读全文
posted @ 2012-07-24 17:13 jiai 阅读(233) 评论(0) 推荐(0)
摘要:BetProblem DescriptionMirko doesn’t like Latin homeworks so he made a bet with Slavko. Loser will be writing homeworks for both of them the entire month. Mirko wants to win so he designed this problem they could have something to bet on.At his desk he found a cube, with numbers 1 to 6 on its faces. 阅读全文
posted @ 2012-07-24 17:03 jiai 阅读(245) 评论(0) 推荐(0)
摘要:DNA-AND-DNAProblem Description生物学家们发现了一个奇怪的DNA分子,可以将它们看作一个由集合{A,B} 中的元素组成的N个字符的序列。由于一系列的突变使得DNA链只包含A。生物学家发现这很奇怪,所以他们开始研究更详细的基因突变。他们发现了两种类型的基因突变。一种类型是改变单个字符的序列(A→B或B→A)。第二类改变了整个序列的前缀,从1到K(1和N之间)。计算数量尽可能少的突变,可以是起始分子转化到它的最终状态(只包含A字符)。突变可以在任何顺序发生。Input输入有多组数据。输入的第一行包含一个正整数N(1≤N≤1000 000),表示分子的长度。输入第二行包含 阅读全文
posted @ 2012-07-24 16:56 jiai 阅读(201) 评论(0) 推荐(0)
摘要:The window of the dazzlingProblem DescriptionNow that spring is here and the sun is shining bright, people are starting to lower their blinds. Stefica is an elderly woman who likes to keep track of what other people in the neighbourhood are doing and then talk about it behind their backs. This year, 阅读全文
posted @ 2012-07-24 16:45 jiai 阅读(166) 评论(0) 推荐(0)
摘要:Sum of numberProblem DescriptionInputThe input consists of multiple test cases.The first line of input contains an integer N (3 ≤ N ≤ 100), the number of cards, and M (10 ≤ M ≤ 300 000), the number that we must not exceed.The following line contains numbers written on Mirko‘s cards: N distinct space 阅读全文
posted @ 2012-07-24 16:33 jiai 阅读(171) 评论(0) 推荐(0)
摘要:数字游戏续Problem Description自从小艾上次在和小牛的游戏中取得了信心之后,这次他又想到了一个问题,他要去计算两个数A和B的最大公约数。由于这两个数非常的大,于是小牛把数字A拆成了N个数,这N个数相乘的结果是A,把B拆成了M个数,同样这M个数的乘积等于B,小艾迫不及待地想去计算出这两个数的最大公约数,这次你能帮帮他吗?如果结果超过了9位数,输出最后的9位数。Input输入有多组数据。第一行包含一个正整数N ( 1 <= N <= 1000 )。第二行包含N个以空格隔开的小于 1 000 000 000的正整数,它们的乘积是A。第三行包含一个正整数M ( 1 < 阅读全文
posted @ 2012-07-24 16:15 jiai 阅读(320) 评论(0) 推荐(0)