随笔分类 -  ACM题解

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

Counting Pair
摘要:Counting PairTime Limit:1000 msMemory Limit:65535 kBSolved:112Tried:1209SubmitStatusBest SolutionBackDescriptionBob hosts a party and invites N boys and M girls. He gives every boy here a unique number Ni(1 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #inclu... 阅读全文

posted @ 2013-07-28 09:48 铁树银花 阅读(327) 评论(0) 推荐(0) 编辑

King's Sanctuary(简单几何)
摘要:King's SanctuaryTime Limit:1000 msMemory Limit:65535 kBSolved:111Tried:840SubmitStatusBest SolutionBackDescriptionThe king found his adherents were building four sanctuaries for him. He is interested about the positions of the sanctuaries and wants to know whether they would form a parallelogram 阅读全文

posted @ 2013-07-28 09:45 铁树银花 阅读(332) 评论(0) 推荐(0) 编辑

System Administrator(构造,图论)
摘要:System Administratortime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputBob got a job as a system administrator in X corporation. His first task was to connectnservers with the help ofmtwo-way direct connection so that it becomes possible to transmit 阅读全文

posted @ 2013-07-26 22:38 铁树银花 阅读(452) 评论(0) 推荐(0) 编辑

Bargaining Table
摘要:Bargaining Tabletime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputBob wants to put a new bargaining table in his office. To do so he measured the office room thoroughly and drew its plan: Bob's office room is a rectangular roomn × mmeters. 阅读全文

posted @ 2013-07-26 17:09 铁树银花 阅读(913) 评论(0) 推荐(0) 编辑

Parencodings(模拟)
摘要:ZOJ Problem Set - 1016ParencodingsTime Limit:2 Seconds Memory Limit:65536 KBLet S = s1 s2 ... s2n be a well-formed string of parentheses. S can be encoded in two different ways:By an integer sequence P = p1 p2 ... pn where pi is the number of left parentheses before the ith right parenthesis in S (P 阅读全文

posted @ 2013-07-25 20:56 铁树银花 阅读(352) 评论(0) 推荐(0) 编辑

Do the Untwist(模拟)
摘要:ZOJ Problem Set - 1006Do the UntwistTime Limit:2 Seconds Memory Limit:65536 KBCryptographydeals with methods of secret communication that transform a message (theplaintext) into a disguised form (theciphertext) so that no one seeing the ciphertext will be able to figure out the plaintext except the 阅读全文

posted @ 2013-07-25 17:18 铁树银花 阅读(904) 评论(0) 推荐(0) 编辑

Jugs(回溯法)
摘要:ZOJ Problem Set - 1005JugsTime Limit:2 Seconds Memory Limit:65536 KB Special JudgeIn the movie "Die Hard 3", Bruce Willis and Samuel L. Jackson were confronted with the following puzzle. They were given a 3-gallon jug and a 5-gallon jug and were asked to fill the 5-gallon jug with exactly 阅读全文

posted @ 2013-07-25 01:05 铁树银花 阅读(511) 评论(0) 推荐(0) 编辑

Anagrams by Stack(深度优先搜索)
摘要:ZOJ Problem Set - 1004Anagrams by StackTime Limit:2 Seconds Memory Limit:65536 KBHow can anagrams result from sequences of stack operations? There are two sequences of stack operators which can convert TROT to TORT:[i i i i o o o oi o i i o o i o]whereistands for Push andostands for Pop. Your progra 阅读全文

posted @ 2013-07-24 00:42 铁树银花 阅读(534) 评论(0) 推荐(0) 编辑

Fire Net(深度优先搜索)
摘要:ZOJ Problem Set - 1002Fire NetTime Limit:2 Seconds Memory Limit:65536 KBSuppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each representing a street or a piece of wall.A blockhouse is a small castle that has four openings through w 阅读全文

posted @ 2013-07-23 20:52 铁树银花 阅读(345) 评论(0) 推荐(0) 编辑

Integer Numbers
摘要:ZOJ Problem Set - 3365Integer NumbersTime Limit:1 Second Memory Limit:32768 KB Special JudgeThe boy likes numbers. He has a sheet of paper. He have written a sequence of consecutive integer numbers on the sheet. The boy likes them.But then the girl came. The girl is cruel. She changed some of the nu 阅读全文

posted @ 2013-07-23 18:04 铁树银花 阅读(390) 评论(0) 推荐(0) 编辑

Codeforces Beta Round #34 (Div. 2) E. Collisions
摘要:E. Collisionstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOn a number line there arenballs. At time moment0for each ball the following data is known: its coordinatexi, speedvi(possibly, negative) and weightmi. The radius of the balls can be ig 阅读全文

posted @ 2013-07-23 13:22 铁树银花 阅读(512) 评论(0) 推荐(0) 编辑

Anniversary party(树形dp入门)
摘要:Anniversary partyTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3043Accepted Submission(s): 1374Problem DescriptionThere is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierarchical stru 阅读全文

posted @ 2013-07-21 21:38 铁树银花 阅读(1673) 评论(0) 推荐(0) 编辑

Grass is Green
摘要:Root3719 - Grass is GreenTime limit: 3.000 secondsThis year exactlynpeople bought land in Squareville_including you. When someone buys land, then the first thing they do is to plant grass on the land; everyone wants to make sure that their grass is greener than the neighbour's. Depending on the 阅读全文

posted @ 2013-07-21 14:16 铁树银花 阅读(273) 评论(0) 推荐(0) 编辑

Prufer Code
摘要:1069. Prufer CodeTime limit: 0.25 secondMemory limit: 8 MBA tree (i.e. a connected graph without cycles) with vertices is given (N≥2). Vertices of the tree are numbered by the integers 1,…,N. A Prufer code for the tree is built as follows: a leaf (a vertex that is incident to the only edge) with a m 阅读全文

posted @ 2013-07-20 17:33 铁树银花 阅读(667) 评论(0) 推荐(0) 编辑

Flying to the Mars
摘要:D -Flying to the MarsTime Limit:1000MSMemory Limit:32768KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeHDU 1800DescriptionIn the year 8888, the Earth is ruled by the PPF Empire . As the population growing , PPF needs to find more land for the newborns . Finally , PPF decides to attack Kscino 阅读全文

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

Codeforces Round #191 (Div. 2) B. Hungry Sequence(素数筛选法)
摘要:. Hungry Sequencetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIahub and Iahubina went to a date at a luxury restaurant. Everything went fine until paying for the food. Instead of money, the waiter wants Iahub to write a Hungry sequence consisti 阅读全文

posted @ 2013-07-14 21:34 铁树银花 阅读(389) 评论(0) 推荐(0) 编辑

Codeforces Round #191 (Div. 2) A. Flipping Game(简单)
摘要:A. Flipping Gametime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIahub got bored, so he invented a game to be played on paper.He writes n integers a1, a2, ..., an. Each of those integers can be either 0 or 1. He's allowed to do exactly one move 阅读全文

posted @ 2013-07-14 20:57 铁树银花 阅读(481) 评论(0) 推荐(0) 编辑

Codeforces Round #180 (Div. 2) B. Sail(简单)
摘要:B. Sailtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe polar bears are going fishing. They plan to sail from(sx, sy)to(ex, ey). However, the boat can only sail by wind. At each second, the wind blows in one of these directions: east, south, we 阅读全文

posted @ 2013-05-25 17:54 铁树银花 阅读(275) 评论(0) 推荐(0) 编辑

Codeforces Round #180 (Div. 2) A. Snow Footprints(简单)
摘要:A. Snow Footprintstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere is a straight snowy road, divided intonblocks. The blocks are numbered from 1 tonfrom left to right. If one moves from thei-th block to the(i + 1)-th block, he will leave a ri 阅读全文

posted @ 2013-05-18 15:09 铁树银花 阅读(339) 评论(0) 推荐(0) 编辑

A Simple Problem with Integers(线段树区间更新模板题)
摘要:A Simple Problem with IntegersTime Limit:5000MSMemory Limit:131072KB64bit IO Format:%I64d & %I64uSubmitStatusDescriptionYou 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 interval. The other 阅读全文

posted @ 2013-05-11 09:43 铁树银花 阅读(250) 评论(0) 推荐(0) 编辑

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

导航