摘要:POJ1694 An Old Stone GameTime Limit:1000MSMemory Limit:10000KTotal Submissions:2579Accepted:1137DescriptionThere is an old stone game, played on an arbitrary general tree T. The goal is to put one stone on the root of T observing the following rules:At the beginning of the game, the player picks K s
阅读全文
摘要:POJ1192最优连通子集Time Limit:1000MSMemory Limit:10000KTotal Submissions:1620Accepted:835Description众所周知,我们可以通过直角坐标系把平面上的任何一个点P用一个有序数对(x, y)来唯一表示,如果x, y都是整数,我们就把点P称为整点,否则点P称为非整点。我们把平面上所有整点构成的集合记为W。定义1 两个整点P1(x1, y1), P2(x2, y2),若|x1-x2| + |y1-y2| = 1,则称P1, P2相邻,记作P1~P2,否则称P1, P2不相邻。定义 2 设点集S是W的一个有限子集,即S..
阅读全文
摘要:POJ1770 Special ExperimentTime Limit:1000MSMemory Limit:30000KTotal Submissions:1325Accepted:429DescriptionAs we know, an atom can be in different energy states (or "energy levels"). Usually, when it transits from a higher energy state to a lower one, it will emit a photon, whose energy is
阅读全文
摘要:POJ3659 Cell Phone NetworkTime Limit:1000MSMemory Limit:65536KTotal Submissions:3782Accepted:1305DescriptionFarmer John has decided to give each of his cows a cell phone in hopes to encourage their social interaction. This, however, requires him to set up cell phone towers on hisN(1 ≤N≤ 10,000) past
阅读全文
摘要:POJ3513Let's Go to the MoviesTime Limit:1000MSMemory Limit:65536KTotal Submissions:1736Accepted:429DescriptionA favorite pastime for big families in Acmestan is going to the movies. It is quite common to see a number of these multi-generation families going together to watch a movie. Movie theat
阅读全文
摘要:POJ1155 TELETime Limit:1000MSMemory Limit:65536KTotal Submissions:1872Accepted:865DescriptionA TV-network plans to broadcast an important football match. Their network of transmitters and users can be represented as a tree. The root of the tree is a transmitter that emits the football match, the lea
阅读全文
摘要:POJ1935 JourneyTime Limit:1000MSMemory Limit:30000KTotal Submissions:1239Accepted:445DescriptionThere are n cities in Byteland (numbered from 1 to n), connected by bidirectional roads. The king of Byteland is not very generous, so there are only n-1 roads, but they connect the cities in such a way t
阅读全文
摘要:HDU4008 Parent and sonTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 1035Accepted Submission(s): 249Problem DescriptionGive you a tree with N vertices and N‐ 1 edges, and then ask you Q queries on “which vertex is Y's son that has the smallest
阅读全文
摘要:HDU1269 迷宫城堡Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2092Accepted Submission(s): 886Problem Description为了训练小希的方向感,Gardon建立了一座大城堡,里面有N个房间(N<=10000)和M条通道(M<=100000),每个通道都是单向的,就是说若称某通道连通了A房间和B房间,只说明可以通过这个通道由A房间到达B房间,但并不说明通过它可以由B房间到达A房间。Ga
阅读全文
摘要:POJ2942 Knights of the Round TableTime Limit:7000MSMemory Limit:65536KTotal Submissions:4968Accepted:1543DescriptionBeing a knight is a very attractive career: searching for the Holy Grail, saving damsels in distress, and drinking with the other knights are fun things to do. Therefore, it is not ver
阅读全文
摘要:POJ1523 SPFTime Limit:1000MSMemory Limit:10000KTotal Submissions:2869Accepted:1284DescriptionConsider the two networks shown below. Assuming that data moves around these networks only between directly connected nodes on a peer-to-peer basis, a failure of a single node, 3, in the network on the left
阅读全文
摘要:HDU4005 The warTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 775 Accepted Submission(s): 128Problem DescriptionIn the war, the intelligence about the enemy is very important. Now, our troop has mastered the situation of the enemy's war zones
阅读全文
摘要:POJ1236 Network of SchoolsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 5649 Accepted: 2236DescriptionA number of schools are connected to a computer network. Agreements have been developed among those schools: each school maintains a list of schools to which it distributes software (t..
阅读全文
摘要:POJ2186 Popular CowsTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 14474 Accepted: 5747DescriptionEvery cow's dream is to become the most popular cow in the herd. In a herd of N (1 <= N <= 10,000) cows, you are given up to M (1 <= M <= 50,000) ordered pairs of the form (A,
阅读全文
摘要:POJ1094 Sorting It All OutTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 18073 Accepted: 6145DescriptionAn ascending sorted sequence of distinct values is one in which some form of a less-than operator is used to order the elements from smallest to largest. For example, the sorted seque..
阅读全文
摘要:弱校ACM奋斗史题解:还记得2年前的一个晚上,我和一个女孩一起写完了这篇文章。写完后,她哭了,我笑了。然后,她走了,我哭了。2年后,我又找到她,这次,我没有让她走掉,她成了我的新娘。不知道什么时候,开始知道ACM;也不知道什么时候,开始喜欢上ACM。但是,我知道,我喜欢上了,而且不会后悔。我是大一的时候进的学校ACM队,那个时候,一切都是冰冷的,华东理工大学,在别人的眼里,只是每次给别人垫底的学校,次次如此。但是,我们不甘心,我们从不甘心,当我们主力队员中的一个,一个月拼命集训,瘦了很多的时候,突然,我有一种哭的冲动。我问他,为什么?他告诉我:我喜欢ACM。也许是个傻傻的理由,但是就是这句话让
阅读全文
摘要:HDU4004 The Frog's GamesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 941 Accepted Submission(s): 508Problem DescriptionThe annual Games in frogs' kingdom started again. The most famous game is the Ironfrog Triathlon. One test in the Iro
阅读全文
摘要:HDU4003 Find Metal MineralTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 759 Accepted Submission(s): 298Problem DescriptionHumans have discovered a kind of new metal mineral on Mars which are distributed in point‐like with paths connecting each..
阅读全文
摘要:HDU4001 To Miss Our Children TimeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 1879 Accepted Submission(s): 514Problem DescriptionDo you remember our children time? When we are children, we are interesting in almost everything around ourselves..
阅读全文
摘要:HDU4028The time of a dayTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 143 Accepted Submission(s): 35Problem DescriptionThere are no days and nights on byte island, so the residents here can hardly determine the length of a single day. Fortunat..
阅读全文
摘要:POJ1125 Stockbroker GrapevineTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 17847 Accepted: 9624DescriptionStockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading disinformation amongst the stockbrokers to give your employer the tactical..
阅读全文