Codeforces Round 188 (Div. 1)

Solutions are presented as using the least memory and the fastest execution time. It also takes the top 10 most recent solutions from each language. If you want to limit to a specific index, click the "Solved" button and go to that problem.

ContestId
Name
Phase
Frozen
Duration (Seconds)
Relative Time
Start Time
317 Codeforces Round 188 (Div. 1) FINISHED False 7200 405181823 June 14, 2013, 3:30 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 172 ) E Princess and Her Shadow PROGRAMMING constructive algorithms shortest paths 3200

Princess Vlada enjoys springing in the meadows and walking in the forest. One day — wonderful, sunny day — during her walk Princess found out with astonishment that her shadow was missing! "Blimey!", — she thought and started her search of the shadow in the forest. Normally the Shadow is too lazy and simply sleeps under the Princess. But at this terrifically hot summer day she got bored of such a dull life, so she decided to play with Vlada. The forest, where our characters entertain themselves, may be represented as a set of integer cells in the plane, where the Shadow and the Princess can move only up, down, left and right by 1 . Some cells (as it happens in decent forests) are occupied by trees. The Shadow and the Princess are not allowed to enter a cell occupied by a tree. Unfortunately, these are the hard times for the forest, so there are very few trees growing here... At first the Princess was walking within the cell ( v x , v y ), while the Shadow hid from the Princess in the cell ( s x , s y ). The Princess, The Shadow and the trees are located in the different cells. The Shadow is playing with the Princess. As soon as the Princess moves by 1 in some direction, the Shadow simultaneously flies by 1 in the same direction, if it is possible (if the cell to fly to is not occupied by some tree); otherwise, the Shadow doesn't move. The Shadow is very shadowy, so our characters do not interfere with each other. We say that the Shadow is caught by the Princess if after some move both of them are located in the same cell. Vlada managed to catch her Shadow! Can you? First line of the input contains the coordinates of the characters v x , v y , s x , s y and the number of trees m ( 0 ≤ m ≤ 400 ). The following m lines contain the coordinates of the trees. All the coordinates are integers between -100 and 100, inclusive. The Princess, The Shadow and the trees are located in the different cells. If it is impossible for the Princess to catch the Shadow, print "

Tutorials

Codeforces Round #188 (разбор)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
3931852 rares.buhai E June 21, 2013, 11:33 a.m. OK GNU C++ TESTS 51 15 307200 3200
3904629 NVAL E June 16, 2013, 9:43 a.m. OK GNU C++ TESTS 51 15 1433600 3200
3901807 NVAL E June 15, 2013, 2:48 p.m. OK GNU C++ TESTS 51 15 1843200 3200
3915872 hza E June 19, 2013, 2:29 a.m. OK GNU C++ TESTS 51 15 2150400 3200
3915863 hza E June 19, 2013, 2:25 a.m. OK GNU C++ TESTS 51 15 2150400 3200
3901787 NVAL E June 15, 2013, 2:43 p.m. OK GNU C++ TESTS 51 15 7577600 3200
4003150 ydc E July 2, 2013, 1:11 p.m. OK GNU C++ TESTS 51 15 9932800 3200
4002368 CaliburianC.C. E July 2, 2013, 8:20 a.m. OK GNU C++ TESTS 51 15 22323200 3200
3932524 seanwu E June 21, 2013, 2:20 p.m. OK GNU C++ TESTS 51 15 64102400 3200
15726256 xumingkuan E Feb. 1, 2016, 7:07 a.m. OK GNU C++ TESTS 51 30 409600 3200
8082619 equation314 E Oct. 5, 2014, 6:25 a.m. OK GNU C++0x TESTS 51 30 2048000 3200
7799106 Los_Angelos_Laycurse E Sept. 15, 2014, 6:53 a.m. OK GNU C++0x TESTS 51 30 3276800 3200
3909393 MinakoKojima E June 17, 2013, 11:31 a.m. OK GNU C++0x TESTS 51 31 82534400 3200
9298038 lz1 E Dec. 29, 2014, 12:46 p.m. OK GNU C++0x TESTS 51 62 2355200 3200
8747652 zhj E Nov. 18, 2014, 3:18 p.m. OK GNU C++0x TESTS 51 92 16384000 3200
8948668 zshi E Dec. 3, 2014, 5:39 a.m. OK GNU C++0x TESTS 51 310 20582400 3200
8289578 jiry_2 E Oct. 18, 2014, 5:26 a.m. OK GNU C++0x TESTS 51 312 1331200 3200
17130968 freebsdx E April 2, 2016, 1:36 p.m. OK GNU C++11 TESTS 51 30 3072000 3200
35859611 ______u______ E March 2, 2018, 9:23 p.m. OK GNU C++11 TESTS 51 30 4096000 3200
35859393 ______n______ E March 2, 2018, 9:18 p.m. OK GNU C++11 TESTS 51 30 4096000 3200
35858935 _____i_____ E March 2, 2018, 9:10 p.m. OK GNU C++11 TESTS 51 30 4096000 3200
35858862 _____k_____ E March 2, 2018, 9:07 p.m. OK GNU C++11 TESTS 51 30 4096000 3200
35855252 ______h______ E March 2, 2018, 7:57 p.m. OK GNU C++11 TESTS 51 30 4096000 3200
35855188 ______k______ E March 2, 2018, 7:56 p.m. OK GNU C++11 TESTS 51 30 4096000 3200
35854603 ______i______ E March 2, 2018, 7:45 p.m. OK GNU C++11 TESTS 51 30 4096000 3200
35847952 ______M______ E March 2, 2018, 4:51 p.m. OK GNU C++11 TESTS 51 30 4096000 3200
11408414 Remilia-Scarlet E June 4, 2015, 2:13 a.m. OK GNU C++11 TESTS 51 30 12697600 3200
23661372 Ali.Pi E Jan. 9, 2017, 7:06 a.m. OK GNU C++14 TESTS 51 30 3993600 3200
31667460 apiadu E Oct. 24, 2017, 3:08 a.m. OK GNU C++14 TESTS 51 468 18227200 3200
20399717 data_h E Sept. 5, 2016, 12:36 p.m. OK GNU C++14 TESTS 51 904 86630400 3200
46361051 Shayan.P E Nov. 29, 2018, 11:10 a.m. OK GNU C++17 TESTS 51 62 614400 3200
69955697 gongsuidashen E Feb. 1, 2020, 10:05 a.m. OK GNU C++17 TESTS 51 92 1536000 3200
3904627 NVAL E June 16, 2013, 9:42 a.m. OK MS C++ TESTS 51 15 1945600 3200
3900710 NVAL E June 15, 2013, 10:47 a.m. OK MS C++ TESTS 51 125 17408000 3200
3900698 NVAL E June 15, 2013, 10:45 a.m. OK MS C++ TESTS 51 171 16179200 3200
3900685 NVAL E June 15, 2013, 10:43 a.m. OK MS C++ TESTS 51 171 35635200 3200
3900655 NVAL E June 15, 2013, 10:37 a.m. OK MS C++ TESTS 51 203 22835200 3200
3900528 NVAL E June 15, 2013, 10:08 a.m. OK MS C++ TESTS 51 203 22835200 3200

remove filters

Back to search problems