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 |
---|---|---|---|---|---|---|
1422 | Codeforces Round 675 (Div. 2) | FINISHED | False | 7200 | 135352463 | Oct. 4, 2020, 4:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 2873 ) | D | Returning Home | PROGRAMMING | data structures graphs implementation shortest paths sortings |
B"Yura has been walking for some time already and is planning to return home. He needs to get home as fast as possible. To do this, Yura can use the instant-movement locations around the city. Let's represent the city as an area of n x n square blocks. Yura needs to move from the block with coordinates (s_x,s_y) to the block with coordinates (f_x,f_y) . In one minute Yura can move to any neighboring by side block; in other words, he can move in four directions. Also, there are m instant-movement locations in the city. Their coordinates are known to you and Yura. Yura can move to an instant-movement location in no time if he is located in a block with the same coordinate x or with the same coordinate y as the location. Help Yura to find the smallest time needed to get home. The first line contains two integers n and m -- the size of the city and the number of instant-movement locations ( 1 <= n <= 10^9 , 0 <= m <= 10^5 ). The next line contains four integers s_x s_y f_x f_y -- the coordinates of Yura's initial position and the coordinates of his home ( 1 <= s_x, s_y, f_x, f_y <= n ). Each of the next m lines contains two integers x_i y_i -- coordinates of the i -th instant-movement location ( 1 <= x_i, y_i <= n ). In the only line print the minimum time required to get home. In the first example Yura needs to reach (5, 5) from (1, 1) . He can do that in 5 minutes by first using the second instant-movement location (because its y coordinate is equal to Yura's y coordinate), and then walking (4, 1) to (4, 2) to (4, 3) to (5, 3) to (5, 4) to (5, 5) . "... |
Codeforces Round #675 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
94709145 | gxlois | D | Oct. 4, 2020, 6:02 p.m. | OK | D | TESTS | 69 | 514 | 56934400 | ||
94715596 | Gassa | D | Oct. 4, 2020, 7:07 p.m. | OK | D | TESTS | 69 | 997 | 39526400 | ||
94708018 | pengin_2000 | D | Oct. 4, 2020, 5:58 p.m. | OK | GNU C11 | TESTS | 69 | 343 | 13619200 | ||
94732302 | wjh15101051 | D | Oct. 5, 2020, 3:32 a.m. | OK | GNU C++11 | TESTS | 69 | 124 | 18432000 | ||
94729804 | He_Ren | D | Oct. 5, 2020, 2:31 a.m. | OK | GNU C++11 | TESTS | 69 | 140 | 13516800 | ||
94740114 | YJJ_Konnyaku | D | Oct. 5, 2020, 6:03 a.m. | OK | GNU C++11 | TESTS | 69 | 140 | 16896000 | ||
94738091 | Young.EQ | D | Oct. 5, 2020, 5:29 a.m. | OK | GNU C++11 | TESTS | 69 | 140 | 17100800 | ||
94709142 | yao11617 | D | Oct. 4, 2020, 6:02 p.m. | OK | GNU C++11 | TESTS | 69 | 155 | 14643200 | ||
94721275 | Grace2005 | D | Oct. 4, 2020, 9:09 p.m. | OK | GNU C++11 | TESTS | 69 | 155 | 24883200 | ||
94707156 | aa___ | D | Oct. 4, 2020, 5:55 p.m. | OK | GNU C++11 | TESTS | 69 | 156 | 24678400 | ||
94738228 | ORZZZQTXDY | D | Oct. 5, 2020, 5:31 a.m. | OK | GNU C++11 | TESTS | 69 | 156 | 27955200 | ||
94707355 | myx12345 | D | Oct. 4, 2020, 5:55 p.m. | OK | GNU C++11 | TESTS | 69 | 156 | 88268800 | ||
94718280 | johnson10024 | D | Oct. 4, 2020, 7:53 p.m. | OK | GNU C++11 | TESTS | 69 | 171 | 17305600 | ||
94730293 | CupCapCup | D | Oct. 5, 2020, 2:45 a.m. | OK | GNU C++14 | TESTS | 69 | 140 | 17612800 | ||
94726313 | In_Max | D | Oct. 5, 2020, 12:37 a.m. | OK | GNU C++14 | TESTS | 69 | 140 | 17612800 | ||
94700631 | chpipis | D | Oct. 4, 2020, 5:30 p.m. | OK | GNU C++14 | TESTS | 69 | 156 | 9932800 | ||
94702227 | JustInCase | D | Oct. 4, 2020, 5:36 p.m. | OK | GNU C++14 | TESTS | 69 | 186 | 10444800 | ||
94702689 | stevenkplus | D | Oct. 4, 2020, 5:38 p.m. | OK | GNU C++14 | TESTS | 69 | 187 | 13414400 | ||
94729140 | Elo | D | Oct. 5, 2020, 2:15 a.m. | OK | GNU C++14 | TESTS | 69 | 187 | 16998400 | ||
94729125 | citsimitpo | D | Oct. 5, 2020, 2:14 a.m. | OK | GNU C++14 | TESTS | 69 | 187 | 18432000 | ||
94730845 | _kyn | D | Oct. 5, 2020, 2:58 a.m. | OK | GNU C++14 | TESTS | 69 | 202 | 9318400 | ||
94727054 | unk2001 | D | Oct. 5, 2020, 1:07 a.m. | OK | GNU C++14 | TESTS | 69 | 202 | 13414400 | ||
94727044 | tragiangvu | D | Oct. 5, 2020, 1:07 a.m. | OK | GNU C++14 | TESTS | 69 | 202 | 13414400 | ||
94729683 | quickers | D | Oct. 5, 2020, 2:28 a.m. | OK | GNU C++17 | TESTS | 69 | 140 | 18022400 | ||
94711599 | BigBag | D | Oct. 4, 2020, 6:26 p.m. | OK | GNU C++17 | TESTS | 69 | 156 | 5632000 | ||
94699956 | asd111 | D | Oct. 4, 2020, 5:28 p.m. | OK | GNU C++17 | TESTS | 69 | 171 | 12083200 | ||
94735738 | sauravsihag | D | Oct. 5, 2020, 4:45 a.m. | OK | GNU C++17 | TESTS | 69 | 171 | 13414400 | ||
94724192 | It_Wasnt_Me | D | Oct. 4, 2020, 10:50 p.m. | OK | GNU C++17 | TESTS | 69 | 171 | 19046400 | ||
94723884 | 3funnn | D | Oct. 4, 2020, 10:37 p.m. | OK | GNU C++17 | TESTS | 69 | 186 | 16793600 | ||
94711939 | xb0nS | D | Oct. 4, 2020, 6:29 p.m. | OK | GNU C++17 | TESTS | 69 | 186 | 17920000 | ||
94721677 | UNOwen98 | D | Oct. 4, 2020, 9:22 p.m. | OK | GNU C++17 | TESTS | 69 | 186 | 20582400 | ||
94720469 | meowmeow321 | D | Oct. 4, 2020, 8:46 p.m. | OK | GNU C++17 | TESTS | 69 | 187 | 10240000 | ||
94724598 | heno239 | D | Oct. 4, 2020, 11:10 p.m. | OK | GNU C++17 | TESTS | 69 | 187 | 10752000 | ||
94713942 | wistful23 | D | Oct. 4, 2020, 6:46 p.m. | OK | GNU C++17 (64) | TESTS | 69 | 77 | 4915200 | ||
94726510 | AnandOza | D | Oct. 5, 2020, 12:47 a.m. | OK | GNU C++17 (64) | TESTS | 69 | 124 | 14438400 | ||
94738555 | rafaelgo2 | D | Oct. 5, 2020, 5:37 a.m. | OK | GNU C++17 (64) | TESTS | 69 | 140 | 11468800 | ||
94706515 | the_hyp0cr1t3 | D | Oct. 4, 2020, 5:52 p.m. | OK | GNU C++17 (64) | TESTS | 69 | 140 | 13824000 | ||
94725625 | AnandOza | D | Oct. 5, 2020, 12:06 a.m. | OK | GNU C++17 (64) | TESTS | 69 | 140 | 14643200 | ||
94728596 | Thallium_is_Vegetable | D | Oct. 5, 2020, 1:57 a.m. | OK | GNU C++17 (64) | TESTS | 69 | 140 | 18944000 | ||
94737502 | Cinque | D | Oct. 5, 2020, 5:19 a.m. | OK | GNU C++17 (64) | TESTS | 69 | 155 | 13414400 | ||
94721344 | Golden | D | Oct. 4, 2020, 9:11 p.m. | OK | GNU C++17 (64) | TESTS | 69 | 155 | 18841600 | ||
94727580 | AnandOza | D | Oct. 5, 2020, 1:25 a.m. | OK | GNU C++17 (64) | TESTS | 69 | 155 | 21913600 | ||
94723509 | ecnerwala | D | Oct. 4, 2020, 10:22 p.m. | OK | GNU C++17 (64) | TESTS | 69 | 155 | 28467200 | ||
94720618 | I_love_sqrtdecompton | D | Oct. 4, 2020, 8:50 p.m. | OK | Java 11 | TESTS | 69 | 701 | 41472000 | ||
94717983 | slinSSS | D | Oct. 4, 2020, 7:48 p.m. | OK | Java 11 | TESTS | 69 | 857 | 41574400 | ||
94715487 | Jevin | D | Oct. 4, 2020, 7:06 p.m. | OK | Java 11 | TESTS | 69 | 935 | 62054400 | ||
94720200 | mphillotry | D | Oct. 4, 2020, 8:40 p.m. | OK | Java 11 | TESTS | 69 | 966 | 15872000 | ||
94710876 | m.haghpanah | D | Oct. 4, 2020, 6:23 p.m. | OK | Java 11 | TESTS | 69 | 997 | 36761600 | ||
94727222 | skittles1412 | D | Oct. 5, 2020, 1:13 a.m. | OK | Java 11 | TESTS | 69 | 1013 | 64307200 | ||
94721866 | Taran_1407 | D | Oct. 4, 2020, 9:27 p.m. | OK | Java 8 | TESTS | 69 | 592 | 39833600 | ||
94705258 | idk321 | D | Oct. 4, 2020, 5:48 p.m. | OK | Java 8 | TESTS | 69 | 623 | 32768000 | ||
94731043 | qlf9 | D | Oct. 5, 2020, 3:03 a.m. | OK | Java 8 | TESTS | 69 | 811 | 17510400 | ||
94720537 | flyman3046 | D | Oct. 4, 2020, 8:48 p.m. | OK | Java 8 | TESTS | 69 | 811 | 64819200 | ||
94715910 | O_E | D | Oct. 4, 2020, 7:12 p.m. | OK | Java 8 | TESTS | 69 | 857 | 40243200 | ||
94718468 | polyakoff | D | Oct. 4, 2020, 7:57 p.m. | OK | Java 8 | TESTS | 69 | 873 | 62054400 | ||
94707222 | a.wang | D | Oct. 4, 2020, 5:55 p.m. | OK | Java 8 | TESTS | 69 | 982 | 69529600 | ||
94723205 | derrick20 | D | Oct. 4, 2020, 10:10 p.m. | OK | Java 8 | TESTS | 69 | 1076 | 5939200 | ||
94715660 | O_E | D | Oct. 4, 2020, 7:08 p.m. | OK | Java 8 | TESTS | 69 | 1107 | 45363200 | ||
94706983 | Hemose | D | Oct. 4, 2020, 5:54 p.m. | OK | Java 8 | TESTS | 69 | 1107 | 61132800 | ||
94710929 | simenl | D | Oct. 4, 2020, 6:23 p.m. | OK | Kotlin | TESTS | 69 | 1310 | 67584000 | ||
94711371 | r57shell | D | Oct. 4, 2020, 6:25 p.m. | OK | MS C++ | TESTS | 69 | 1091 | 22835200 | ||
94711227 | r57shell | D | Oct. 4, 2020, 6:24 p.m. | OK | MS C++ | TESTS | 69 | 1201 | 26419200 | ||
94736378 | little_lion | D | Oct. 5, 2020, 4:58 a.m. | OK | MS C++ 2017 | TESTS | 69 | 280 | 17305600 | ||
94718329 | Gravekper | D | Oct. 4, 2020, 7:55 p.m. | OK | MS C++ 2017 | TESTS | 69 | 312 | 15769600 | ||
94703334 | mban259 | D | Oct. 4, 2020, 5:40 p.m. | OK | .NET Core C# | TESTS | 69 | 623 | 60006400 | ||
94732252 | ngoc.ks | D | Oct. 5, 2020, 3:30 a.m. | OK | Node.js | TESTS | 69 | 748 | 54784000 | ||
94732920 | ngoc.ks | D | Oct. 5, 2020, 3:46 a.m. | OK | Node.js | TESTS | 69 | 811 | 53350400 | ||
94731679 | ngoc.ks | D | Oct. 5, 2020, 3:17 a.m. | OK | Node.js | TESTS | 69 | 904 | 55193600 | ||
94732396 | ngoc.ks | D | Oct. 5, 2020, 3:34 a.m. | OK | Node.js | TESTS | 69 | 920 | 54476800 | ||
94729801 | ngoc.ks | D | Oct. 5, 2020, 2:31 a.m. | OK | Node.js | TESTS | 69 | 1169 | 49152000 | ||
94729415 | ngoc.ks | D | Oct. 5, 2020, 2:21 a.m. | OK | Node.js | TESTS | 69 | 1200 | 51916800 | ||
94730337 | ngoc.ks | D | Oct. 5, 2020, 2:46 a.m. | OK | Node.js | TESTS | 69 | 1356 | 65740800 | ||
94730360 | ngoc.ks | D | Oct. 5, 2020, 2:46 a.m. | OK | Node.js | TESTS | 69 | 1419 | 65945600 | ||
94699901 | pajenegod | D | Oct. 4, 2020, 5:28 p.m. | OK | PyPy 2 | TESTS | 69 | 748 | 38809600 | ||
94712191 | mkawa2 | D | Oct. 4, 2020, 6:30 p.m. | OK | PyPy 3 | TESTS | 69 | 1169 | 67174400 | ||
94724947 | thnkndblv | D | Oct. 4, 2020, 11:30 p.m. | OK | PyPy 3 | TESTS | 69 | 1201 | 50278400 | ||
94724843 | thnkndblv | D | Oct. 4, 2020, 11:24 p.m. | OK | PyPy 3 | TESTS | 69 | 1278 | 51302400 | ||
94724872 | thnkndblv | D | Oct. 4, 2020, 11:26 p.m. | OK | PyPy 3 | TESTS | 69 | 1325 | 54272000 | ||
94727574 | asdsasd | D | Oct. 5, 2020, 1:24 a.m. | OK | PyPy 3 | TESTS | 69 | 1387 | 51814400 | ||
94724889 | thnkndblv | D | Oct. 4, 2020, 11:26 p.m. | OK | PyPy 3 | TESTS | 69 | 1388 | 51097600 | ||
94717812 | sh1194 | D | Oct. 4, 2020, 7:44 p.m. | OK | PyPy 3 | TESTS | 69 | 1404 | 55193600 | ||
94717695 | nehan_der_thal | D | Oct. 4, 2020, 7:42 p.m. | OK | PyPy 3 | TESTS | 69 | 1435 | 58265600 | ||
94717645 | nehan_der_thal | D | Oct. 4, 2020, 7:41 p.m. | OK | PyPy 3 | TESTS | 69 | 1450 | 57241600 | ||
94719786 | titia | D | Oct. 4, 2020, 8:29 p.m. | OK | PyPy 3 | TESTS | 69 | 1481 | 36864000 | ||
94734397 | wolpiskerter | D | Oct. 5, 2020, 4:17 a.m. | OK | Python 3 | TESTS | 69 | 1699 | 71475200 | ||
94718195 | kclee2172 | D | Oct. 4, 2020, 7:52 p.m. | OK | Python 3 | TESTS | 69 | 1980 | 35635200 | ||
94718341 | kclee2172 | D | Oct. 4, 2020, 7:55 p.m. | OK | Python 3 | TESTS | 69 | 1981 | 36147200 | ||
94711728 | cotton100pc | D | Oct. 4, 2020, 6:27 p.m. | OK | Rust | TESTS | 69 | 155 | 17510400 |
Back to search problems