Postal VansACM South Pacific Region -- 2003Tiring of their idyllic fields, the cows have moved to a new suburb. The suburb is a rectangular grid of streets with a post office at its Northwest corner. It has four avenues running East-West and N (1
線段樹+約瑟夫+反素數。用線段數跟新隊伍中的人數。每次查詢將要出隊的人在當前隊伍中的位置。在通過將要移動的位置,找出下一個位置。通過這一題知道了反素數。。。。ORZ 膜拜眾神犇Who Gets the Most Candies?Time Limit: 5000MS Memory Limit: 131072KTotal Submissions: 6075 Accepted: 1752Case Time Limit: 2000MSDescriptionN children are
拓撲排序, 判斷不存在迴路(即x視窗覆蓋了y視窗,但同時又y視窗覆蓋了x視窗)。Window PainsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 1159 Accepted: 583DescriptionBoudreaux likes to multitask, especially when it comes to using his computer. Never satisfied with just
該題考察,kruscal所求的產生樹,最長邊是盡量小的,該點與prim不同NetworkTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 10476 Accepted: 3945 Special JudgeDescriptionAndrew is working as system administrator and is planning to establish a new network in his company.
Spell checkerTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 16675 Accepted: 6087DescriptionYou, as a member of a development team for a new spell checking program, are to write a module that will check the correctness of given words using
Problem 1977 Pandora adventureAccept: 244 Submit: 813Time Limit: 1000 mSec Memory Limit : 32768 KB Problem DescriptionThe pollution of the earth is so serious that people can not survive any more. Fortunately, people have found a new planet
TroubleTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3773 Accepted Submission(s): 1182Problem DescriptionHassan is in trouble. His mathematics teacher has given him a very difficult problem
A Rectangular BarnMircea Pasoi -- 2003Ever the capitalist, Farmer John wants to extend his milking business by purchasing more cows. He needs space to build a new barn for the cows.FJ purchased a rectangular field with R (1 ≤ R ≤ 3,000) rows
最短路的變形,相當於求一個最大路徑。用bellman-ford可以解決ArbitrageTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 10848 Accepted: 4574DescriptionArbitrage is the use of discrepancies in currency exchange rates to transform one unit of a currency into more than
F. Touristtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputTourist walks along the X axis. He can choose either of two directions and any speed not exceeding V. He can also stand without moving
Problem Statement You are playing a solitaire game called Left-Right Digits Game. This game uses a deck of N cards. Each card has a single digit written on it. These digits are given as characters in the string digits. More precisely, the i-th
1422 - Halloween CostumesPDF (English)StatisticsForumTime Limit: 2 second(s)Memory Limit: 32 MBGappu has a very busy weekend ahead of him. Because, next weekend is Halloween, and he is planning to attend as many parties as he can. Since it's
拓撲排序,判斷有無迴路Legal or NotTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2171 Accepted Submission(s): 957Problem DescriptionACM-DIY is a large QQ group where many excellent acmers get together.
MST,先求出產生樹中的所有邊,從大到小排序,再輸出第s條邊即可。這裡我用了優先隊列。Arctic NetworkTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 5882 Accepted: 2035DescriptionThe Department of National Defence (DND) wishes to connect several northern outposts by a wireless