Balanced LineupTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 19690 Accepted: 9084Case Time Limit: 2000MSDescriptionFor the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides
438. The Glorious Karlutka River =)Time limit per test: 1 second(s)Memory limit: 262144 kilobytesinput: standardoutput: standardA group of M tourists are walking along the Karlutka river. They want to cross the river, but they couldn't find a bridge.
Matrix3My Tags (Edit) Source : bin3 Time limit : 5 sec Memory limit : 64 MSubmitted : 302, Accepted : 74Zhouguyue is a "驢友" and nowadays he likes traveling on an N * N matrix with a non-negative number in each grid, and each grid has a height.
Knights of the Round TableTime Limit: 7000MS Memory Limit: 65536KTotal Submissions: 4896 Accepted: 1521DescriptionBeing a knight is a very attractive career: searching for the Holy Grail, saving damsels in distress, and drinking with the other
Frequent valuesTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 8555 Accepted: 3081DescriptionYou are given a sequence of n integers a1 , a2 , ... , an in non-decreasing order. In addition to that, you are given several queries consisting
SudokuTime Limit: 10 Seconds Memory Limit: 32768 KBA Sudoku grid is a 16x16 grid of cells grouped in sixteen 4x4 squares, where some cells are filled with letters from A to P (the first 16 capital letters of the English alphabet), as shown in
A Magic LampTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 451 Accepted Submission(s): 147Problem DescriptionKiki likes traveling. One day she finds a magic lamp, unfortunately the genie in
The merchantTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 1520 Accepted: 434DescriptionThere are N cities in a country, and there is one and only one simple path between each pair of cities. A merchant has chosen some paths and wants to
Osaisen Choudai!Time Limit: 3 Seconds Memory Limit: 65536 KBA saisenbako (賽銭箱, offertory, or religious collection box) is situated in front of the hall of Hakurei Shrine. Hakurei Reimu (博麗霊夢), the miko of Hakurei Shrine, may ask the friends who
IntervieweTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2301 Accepted Submission(s): 516Problem DescriptionYaoYao has a company and he wants to employ m people recently. Since his company
176. Flow constructiontime limit per test: 1 sec.memory limit per test: 4096 KBinput: standardoutput: standardYou have given the net consisting of nodes and pipes; pipes connect the nodes. Some substance can flow by pipes, and flow speed in any pipe
Matrix SearchingTime Limit: 10 Seconds Memory Limit: 32768 KBGiven an n*n matrix A, whose entries Ai,j are integer numbers ( 1 <= i <= n, 1 <= j <= n ). An operation FIND the minimun number in a given ssub-matrix.InputThe first line
Connections between citiesTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1107 Accepted Submission(s): 376Problem DescriptionAfter World War X, a lot of cities have been seriously damaged,
Stars in Your WindowTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 7013 Accepted: 1871DescriptionFleeting time does not blur my memory of you. Can it really be 4 years since I first saw you? I still remember, vividly, on the beautiful
CornfieldsTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 3842 Accepted: 1823DescriptionFJ has decided to grow his own corn hybrid in order to help the cows make the best possible milk. To that end, he's looking to build the cornfield on
Mondriaan's DreamTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 5930 Accepted: 3414DescriptionSquares and rectangles fascinated the famous Dutch painter Piet Mondriaan. One night, after producing the drawings in his 'toilet series' (where
NetworkTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 2496 Accepted: 726DescriptionYixght is a manager of the company called SzqNetwork(SN). Now she's very worried because she has just received a bad news which denotes that DxtNetwork(DN),
Design the cityTime Limit: 1 Second Memory Limit: 32768 KBCerror is the mayor of city HangZhou. As you may know, the traffic system of this city is so terrible, that there are traffic jams everywhere. Now, Cerror finds out that the main reason