随笔分类 -  ACM题解

1 2 3 4 5 ··· 8 下一页

TL(简单)
摘要:TLtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputValera wanted to prepare a Codesecrof round. He's already got one problem and he wants to set a time limit (TL) on it.Valera has writtenncorrect solutions. For each correct solution, he knows 阅读全文

posted @ 2013-10-02 18:28 铁树银花 阅读(949) 评论(0) 推荐(0) 编辑

Guardian of Decency(二分图)
摘要:Guardian of DecencyTime Limit:3000MSMemory Limit:0KB64bit IO Format:%lld & %lluSubmitStatusPracticeUVALive 3415DescriptionProblem H - Guardian of DecencyTime limit: 15 secondsFrank N. Stein is a very conservative high-school teacher. He wants to take some of his students on an excursion, but he 阅读全文

posted @ 2013-09-20 13:10 铁树银花 阅读(550) 评论(0) 推荐(0) 编辑

Simple Molecules(简单)
摘要:Simple Moleculestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMad scientist Mike is busy carrying out experiments in chemistry. Today he will attempt to join three atoms into one molecule.A molecule consists of atoms, with some pairs of atoms co 阅读全文

posted @ 2013-09-19 14:09 铁树银花 阅读(556) 评论(0) 推荐(0) 编辑

Heavy Transportation(最短路 + dp)
摘要:Heavy TransportationTime Limit:3000MSMemory Limit:30000KB64bit IO Format:%I64d & %I64uSubmitStatusPracticePOJ 1797DescriptionBackgroundHugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man who tells him whether there really is a 阅读全文

posted @ 2013-09-13 00:46 铁树银花 阅读(878) 评论(0) 推荐(0) 编辑

Silver Cow Party(最短路,好题)
摘要:Silver Cow PartyTime Limit:2000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uSubmitStatusPracticePOJ 3268DescriptionOne cow from each ofNfarms (1 ≤N≤ 1000) conveniently numbered 1..Nis going to attend the big cow party to be held at farm #X(1 ≤X≤N). A total ofM(1 ≤M≤ 100,000) unidirectional 阅读全文

posted @ 2013-09-09 22:08 铁树银花 阅读(3118) 评论(0) 推荐(0) 编辑

Xenia and Divisors
摘要:Xenia and Divisorstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputXenia the mathematician has a sequence consisting ofn(nis divisible by 3) positive integers, each of them is at most 7. She wants to split the sequence into groups of three so that 阅读全文

posted @ 2013-09-08 00:15 铁树银花 阅读(488) 评论(0) 推荐(0) 编辑

Frogger(floyd变形)
摘要:FroggerTime Limit:1000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uSubmitStatusPracticePOJ 2253DescriptionFreddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but since the water is dirty and full 阅读全文

posted @ 2013-09-06 09:35 铁树银花 阅读(334) 评论(0) 推荐(0) 编辑

Til the Cows Come Home(最短路)
摘要:Til the Cows Come HomeTime Limit:1000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uSubmitStatusPracticePOJ 2387DescriptionBessie 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 beau 阅读全文

posted @ 2013-09-03 19:45 铁树银花 阅读(2531) 评论(0) 推荐(0) 编辑

Xenia and Bit Operations(线段树单点更新)
摘要:Xenia and Bit Operationstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputXenia the beginner programmer has a sequencea, consisting of2nnon-negative integers:a1, a2, ..., a2n. Xenia is currently studying bit operations. To better understand how the 阅读全文

posted @ 2013-08-29 01:13 铁树银花 阅读(404) 评论(0) 推荐(0) 编辑

Fire!(BFS)
摘要:Fire!Time Limit:1000MSMemory Limit:0KB64bit IO Format:%lld & %lluSubmitStatusDescriptionProblem B: Fire!Joe works in a maze. Unfortunately, portions of the maze have caught on fire, and the owner of the maze neglected to create a fire escape plan. Help Joe escape the maze.Given Joe's locatio 阅读全文

posted @ 2013-08-28 12:22 铁树银花 阅读(543) 评论(0) 推荐(0) 编辑

Quiz(贪心,快速幂乘)
摘要:C. Quiztime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputManao is taking part in a quiz. The quiz consists ofnconsecutive questions. A correct answer gives one point to the player. The game also has a counter of consecutive correct answers. When the 阅读全文

posted @ 2013-08-26 21:00 铁树银花 阅读(530) 评论(0) 推荐(0) 编辑

Routine Problem(数学)
摘要:Routine Problemtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputManao has a monitor. The screen of the monitor has horizontal to vertical length ratioa:b. Now he is going to watch a movie. The movie's frame has horizontal to vertical length rat 阅读全文

posted @ 2013-08-24 23:59 铁树银花 阅读(477) 评论(0) 推荐(0) 编辑

2^x mod n = 1(欧拉定理,欧拉函数,快速幂乘)
摘要:2^x mod n = 1Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9231Accepted Submission(s): 2837Problem DescriptionGive a number n, find the minimum x(x>0) that satisfies 2^x mod n = 1.InputOne positive integer on each line, the value of n.OutputIf 阅读全文

posted @ 2013-08-23 11:22 铁树银花 阅读(3537) 评论(0) 推荐(1) 编辑

Malek Dance Club(递推)
摘要:Malek Dance Clubtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAs a tradition, every year before IOI all the members of Natalia Fan Club are invited to Malek Dance Club to have a fun night together. Malek Dance Club has2nmembers and coincidentall 阅读全文

posted @ 2013-08-09 19:30 铁树银花 阅读(537) 评论(0) 推荐(0) 编辑

Color Me Less
摘要:Color Me LessTime Limit:2 Seconds Memory Limit:65536 KBProblemA color reduction is a mapping from a set of discrete colors to a smaller one. The solution to this problem requires that you perform just such a mapping in a standard twenty-four bit RGB color space. The input consists of a target set of 阅读全文

posted @ 2013-08-08 21:19 铁树银花 阅读(661) 评论(0) 推荐(0) 编辑

Traffic Lights
摘要:Traffic Lightstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA car moves from point A to point B at speedvmeters per second. The action takes place on the X-axis. At the distancedmeters from A there are traffic lights. Starting from time 0, for 阅读全文

posted @ 2013-08-08 20:31 铁树银花 阅读(614) 评论(0) 推荐(0) 编辑

Ping-Pong (Easy Version)(DFS)
摘要:B. Ping-Pong (Easy Version)time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn this problem at each moment you have a set of intervals. You can move from interval(a, b)from our set to interval(c, d)from our set if and only ifc 2 #include 3 #incl.. 阅读全文

posted @ 2013-08-07 20:15 铁树银花 阅读(483) 评论(0) 推荐(0) 编辑

Ciel and Robot
摘要:C. Ciel and Robottime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputFox Ciel has a robot on a 2D plane. Initially it is located in (0, 0). Fox Ciel code a command to it. The command was represented by strings. Each character ofsis one move operation. 阅读全文

posted @ 2013-08-07 01:12 铁树银花 阅读(674) 评论(0) 推荐(0) 编辑

Code the Tree(图论,树)
摘要:ZOJ Problem Set - 1097Code the TreeTime Limit:2 Seconds Memory Limit:65536 KBA tree (i.e. a connected graph without cycles) with vertices numbered by the integers1, 2, ..., nis given. The "Prufer" code of such a tree is built as follows: the leaf (a vertex that is incident to only one edge 阅读全文

posted @ 2013-07-31 23:09 铁树银花 阅读(687) 评论(0) 推荐(0) 编辑

Digging(DP)
摘要:ZOJ Problem Set - 3689DiggingTime Limit:2 Seconds Memory Limit:65536 KBWhen it comes to theMaya Civilization, we can quickly remind of a term called the end of the world. It's not difficult to understand why we choose to believe the prophecy (or we just assume it is true to entertain ourselves) 阅读全文

posted @ 2013-07-30 11:49 铁树银花 阅读(308) 评论(0) 推荐(0) 编辑

1 2 3 4 5 ··· 8 下一页

导航