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 |
---|---|---|---|---|---|---|
1066 | Codeforces Round 515 (Div. 3) | FINISHED | False | 7200 | 198170723 | Oct. 12, 2018, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 2093 ) | F | Yet another 2D Walking | PROGRAMMING | dp | 2300 |
B"Maksim walks on a Cartesian plane. Initially, he stands at the point (0, 0) and in one move he can go to any of four adjacent points (left, right, up, down). For example, if Maksim is currently at the point (0, 0) , he can go to any of the following points in one move: There are also n distinct key points at this plane. The i -th point is p_i = (x_i, y_i) . It is guaranteed that 0 <= x_i and 0 <= y_i and there is no key point (0, 0) . Let the first level points be such points that max(x_i, y_i) = 1 , the second level points be such points that max(x_i, y_i) = 2 and so on. Maksim wants to visit all the key points. But he shouldn't visit points of level i + 1 if he does not visit all the points of level i . He starts visiting the points from the minimum level of point from the given set. The distance between two points (x_1, y_1) and (x_2, y_2) is |x_1 - x_2| + |y_1 - y_2| where |v| is the absolute value of v . Maksim wants to visit all the key points in such a way that the total distance he walks will be minimum possible. Your task is to find this distance. If you are Python programmer, consider using PyPy instead of Python when you submit your code. The first line of the input contains one integer n ( 1 <= n <= 2 cdot 10^5 ) -- the number of key points. Each of the next n lines contains two integers x_i , y_i ( 0 <= x_i, y_i <= 10^9 ) -- x -coordinate of the key point p_i and y -coordinate of the key point p_i . It is guaranteed that all the points are distinct and the point (0, 0) is not in this set. Print one integer -- the minimum possible total distance Maksim has to travel if he needs to visit all key points in a way described above. The picture corresponding to the first example: There is one of the possible answers of length 15 . The picture corresponding to the second example: The"... |
62419 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
46294367 | knight-erraunt | F | Nov. 27, 2018, 11:35 p.m. | OK | Clang++17 Diagnostics | TESTS | 28 | 2558 | 27238400 | 2300 | |
44223826 | ruban | F | Oct. 12, 2018, 6:27 p.m. | OK | Delphi | TESTS | 28 | 202 | 184627200 | 2300 | |
44278653 | Denor | F | Oct. 14, 2018, 1:43 a.m. | OK | Delphi | TESTS | 28 | 249 | 17715200 | 2300 | |
44223807 | ruban | F | Oct. 12, 2018, 6:27 p.m. | OK | FPC | TESTS | 28 | 202 | 184320000 | 2300 | |
47448152 | interestingLSY 2002816 | F | Dec. 24, 2018, 7:47 a.m. | OK | GNU C++11 | TESTS | 28 | 61 | 9011200 | 2300 | |
44751231 | ReaLNero1 | F | Oct. 23, 2018, 8:03 p.m. | OK | GNU C++11 | TESTS | 28 | 62 | 7987200 | 2300 | |
44427636 | p_b_p_b | F | Oct. 17, 2018, 5:42 a.m. | OK | GNU C++11 | TESTS | 28 | 62 | 7987200 | 2300 | |
44427614 | luogu_bot1 | F | Oct. 17, 2018, 5:41 a.m. | OK | GNU C++11 | TESTS | 28 | 62 | 7987200 | 2300 | |
58065262 | Frame233 | F | July 31, 2019, 8:43 a.m. | OK | GNU C++11 | TESTS | 28 | 62 | 8806400 | 2300 | |
58064973 | Frame233 | F | July 31, 2019, 8:39 a.m. | OK | GNU C++11 | TESTS | 28 | 62 | 8806400 | 2300 | |
47519509 | stal_xy23z7b8 | F | Dec. 26, 2018, 12:08 p.m. | OK | GNU C++11 | TESTS | 28 | 62 | 8806400 | 2300 | |
45125435 | luogu_bot4 | F | Oct. 31, 2018, 7:43 a.m. | OK | GNU C++11 | TESTS | 28 | 62 | 8908800 | 2300 | |
47448138 | HatsuneMikuo | F | Dec. 24, 2018, 7:47 a.m. | OK | GNU C++11 | TESTS | 28 | 62 | 9011200 | 2300 | |
44741427 | zhenGG | F | Oct. 23, 2018, 2:51 p.m. | OK | GNU C++11 | TESTS | 28 | 62 | 9625600 | 2300 | |
53696901 | davidberard | F | May 3, 2019, 8:17 a.m. | OK | GNU C++14 | TESTS | 28 | 62 | 6553600 | 2300 | |
47862915 | luogu_bot4 | F | Jan. 3, 2019, 7:35 a.m. | OK | GNU C++14 | TESTS | 28 | 62 | 10137600 | 2300 | |
50792998 | Kevin00 | F | March 4, 2019, 4:45 p.m. | OK | GNU C++14 | TESTS | 28 | 77 | 15667200 | 2300 | |
51541067 | luogu_bot2 | F | March 19, 2019, 6:20 p.m. | OK | GNU C++14 | TESTS | 28 | 78 | 15667200 | 2300 | |
44607171 | white_156 | F | Oct. 20, 2018, 5:30 p.m. | OK | GNU C++14 | TESTS | 28 | 108 | 5632000 | 2300 | |
44392337 | AZ01 | F | Oct. 16, 2018, 9:17 a.m. | OK | GNU C++14 | TESTS | 28 | 109 | 1638400 | 2300 | |
44246615 | MeePwn | F | Oct. 13, 2018, 8:56 a.m. | OK | GNU C++14 | TESTS | 28 | 109 | 1638400 | 2300 | |
47664364 | ntoni_boss | F | Dec. 28, 2018, 9:54 p.m. | OK | GNU C++14 | TESTS | 28 | 124 | 4812800 | 2300 | |
44242937 | xiaowuga | F | Oct. 13, 2018, 7:38 a.m. | OK | GNU C++14 | TESTS | 28 | 124 | 5324800 | 2300 | |
44607212 | vjudge3 | F | Oct. 20, 2018, 5:31 p.m. | OK | GNU C++14 | TESTS | 28 | 124 | 5632000 | 2300 | |
45506943 | a1ert | F | Nov. 10, 2018, 11:05 a.m. | OK | GNU C++17 | TESTS | 28 | 109 | 7475200 | 2300 | |
44840792 | vjudge3 | F | Oct. 25, 2018, 12:42 p.m. | OK | GNU C++17 | TESTS | 28 | 109 | 16588800 | 2300 | |
44232040 | endereye | F | Oct. 13, 2018, 1:16 a.m. | OK | GNU C++17 | TESTS | 28 | 124 | 1536000 | 2300 | |
48213829 | eddy1021 | F | Jan. 11, 2019, 1:33 p.m. | OK | GNU C++17 | TESTS | 28 | 124 | 1843200 | 2300 | |
44447441 | LJL36 | F | Oct. 17, 2018, 2:28 p.m. | OK | GNU C++17 | TESTS | 28 | 124 | 1843200 | 2300 | |
55486842 | chongryong | F | June 12, 2019, 8:16 a.m. | OK | GNU C++17 | TESTS | 28 | 124 | 3993600 | 2300 | |
44763202 | TrivialMan | F | Oct. 24, 2018, 8:21 a.m. | OK | GNU C++17 | TESTS | 28 | 124 | 5017600 | 2300 | |
44236731 | congmingyige | F | Oct. 13, 2018, 5:10 a.m. | OK | GNU C++17 | TESTS | 28 | 124 | 5017600 | 2300 | |
44619212 | Dream_d | F | Oct. 21, 2018, 5:06 a.m. | OK | GNU C++17 | TESTS | 28 | 124 | 5632000 | 2300 | |
44736875 | bktl1love | F | Oct. 23, 2018, 1:09 p.m. | OK | GNU C++17 | TESTS | 28 | 124 | 5836800 | 2300 | |
67124776 | bluesky111 | F | Dec. 17, 2019, 7:33 p.m. | OK | Java 8 | TESTS | 28 | 280 | 14233600 | 2300 | |
44277150 | 4mda4mda | F | Oct. 13, 2018, 11:10 p.m. | OK | Java 8 | TESTS | 28 | 311 | 0 | 2300 | |
44277087 | 4mda4mda | F | Oct. 13, 2018, 11:04 p.m. | OK | Java 8 | TESTS | 28 | 311 | 0 | 2300 | |
44992161 | cgondek | F | Oct. 28, 2018, 1:28 p.m. | OK | Java 8 | TESTS | 28 | 327 | 4198400 | 2300 | |
44280235 | StayAwayFromBitches | F | Oct. 14, 2018, 3:41 a.m. | OK | Java 8 | TESTS | 28 | 342 | 19763200 | 2300 | |
48020587 | SpargelTarzan | F | Jan. 6, 2019, 5:14 a.m. | OK | Java 8 | TESTS | 28 | 389 | 27852800 | 2300 | |
44540926 | Srinivasa_Ramanujan | F | Oct. 19, 2018, 11:28 a.m. | OK | Java 8 | TESTS | 28 | 389 | 38604800 | 2300 | |
65879918 | Agnimandur | F | Nov. 27, 2019, 6:32 p.m. | OK | Java 8 | TESTS | 28 | 421 | 16486400 | 2300 | |
44276131 | flyman3046 | F | Oct. 13, 2018, 9:48 p.m. | OK | Java 8 | TESTS | 28 | 452 | 40857600 | 2300 | |
44564440 | unicorn20141 | F | Oct. 19, 2018, 9:40 p.m. | OK | Java 8 | TESTS | 28 | 514 | 30515200 | 2300 | |
44837489 | greenkirill | F | Oct. 25, 2018, 11:31 a.m. | OK | Mono C# | TESTS | 28 | 374 | 28569600 | 2300 | |
44258882 | azukun | F | Oct. 13, 2018, 1:34 p.m. | OK | Mono C# | TESTS | 28 | 389 | 41472000 | 2300 | |
44960445 | witchu | F | Oct. 27, 2018, 4:11 p.m. | OK | Mono C# | TESTS | 28 | 405 | 36044800 | 2300 | |
68845132 | mban259 | F | Jan. 15, 2020, 7:09 a.m. | OK | Mono C# | TESTS | 28 | 405 | 48537600 | 2300 | |
44375364 | omikad | F | Oct. 15, 2018, 8:59 p.m. | OK | Mono C# | TESTS | 28 | 763 | 47001600 | 2300 | |
45193396 | vjudge2 | F | Nov. 2, 2018, 5 a.m. | OK | MS C++ | TESTS | 28 | 93 | 7270400 | 2300 | |
44469153 | shengtu | F | Oct. 18, 2018, 5:07 a.m. | OK | MS C++ | TESTS | 28 | 109 | 2457600 | 2300 | |
45193398 | vjudge3 | F | Nov. 2, 2018, 5 a.m. | OK | MS C++ | TESTS | 28 | 109 | 7270400 | 2300 | |
44717797 | vjudge1 | F | Oct. 22, 2018, 11:56 p.m. | OK | MS C++ | TESTS | 28 | 109 | 10444800 | 2300 | |
44227449 | youx | F | Oct. 12, 2018, 8:26 p.m. | OK | MS C++ | TESTS | 28 | 139 | 9625600 | 2300 | |
44697870 | vjudge2 | F | Oct. 22, 2018, 1:39 p.m. | OK | MS C++ | TESTS | 28 | 155 | 12902400 | 2300 | |
44720270 | vjudge2 | F | Oct. 23, 2018, 4:30 a.m. | OK | MS C++ | TESTS | 28 | 186 | 84992000 | 2300 | |
44600595 | vjudge4 | F | Oct. 20, 2018, 2:12 p.m. | OK | MS C++ | TESTS | 28 | 358 | 12800000 | 2300 | |
46957907 | py3 | F | Dec. 13, 2018, 5:56 a.m. | OK | MS C++ | TESTS | 28 | 373 | 2457600 | 2300 | |
54244057 | kz20182726kz | F | May 16, 2019, 2:08 p.m. | OK | MS C++ | TESTS | 28 | 389 | 7987200 | 2300 | |
58368010 | yorky | F | Aug. 6, 2019, 5:17 a.m. | OK | MS C++ 2017 | TESTS | 28 | 467 | 19456000 | 2300 | |
44722158 | YESMAths | F | Oct. 23, 2018, 5:56 a.m. | OK | PyPy 2 | TESTS | 28 | 1122 | 89292800 | 2300 | |
49657841 | zhaoy1ping | F | Feb. 9, 2019, 10:53 a.m. | OK | PyPy 3 | TESTS | 28 | 841 | 43212800 | 2300 | |
44427987 | qb2008 | F | Oct. 17, 2018, 5:56 a.m. | OK | PyPy 3 | TESTS | 28 | 1060 | 41369600 | 2300 | |
44277925 | Praxis | F | Oct. 14, 2018, 12:25 a.m. | OK | PyPy 3 | TESTS | 28 | 2058 | 67686400 | 2300 | |
44277933 | Stephan | F | Oct. 14, 2018, 12:26 a.m. | OK | PyPy 3 | TESTS | 28 | 2058 | 67686400 | 2300 | |
44480410 | tsukuyomi | F | Oct. 18, 2018, 9:59 a.m. | OK | PyPy 3 | TESTS | 28 | 2308 | 61952000 | 2300 | |
44255654 | tranphuminhbkhn | F | Oct. 13, 2018, 12:14 p.m. | OK | PyPy 3 | TESTS | 28 | 2323 | 49049600 | 2300 | |
44256007 | tranphuminhbkhn | F | Oct. 13, 2018, 12:21 p.m. | OK | PyPy 3 | TESTS | 28 | 2370 | 48640000 | 2300 | |
45651744 | kinte | F | Nov. 13, 2018, 2:10 a.m. | OK | PyPy 3 | TESTS | 28 | 2464 | 24883200 | 2300 | |
44407486 | _IsItRated_ | F | Oct. 16, 2018, 3:25 p.m. | OK | PyPy 3 | TESTS | 28 | 2542 | 37580800 | 2300 | |
44222229 | La-Mariposa | F | Oct. 12, 2018, 5:44 p.m. | OK | PyPy 3 | TESTS | 28 | 2542 | 37580800 | 2300 | |
46040155 | annoreen | F | Nov. 21, 2018, 7:03 p.m. | OK | Python 2 | TESTS | 28 | 1512 | 18636800 | 2300 | |
44980394 | alonedog | F | Oct. 28, 2018, 8:20 a.m. | OK | Python 2 | TESTS | 28 | 1918 | 64409600 | 2300 | |
44224374 | r57shell | F | Oct. 12, 2018, 6:42 p.m. | OK | Python 3 | TESTS | 28 | 1715 | 17510400 | 2300 | |
44224728 | whatshisbucket | F | Oct. 12, 2018, 6:53 p.m. | OK | Python 3 | TESTS | 28 | 1793 | 35532800 | 2300 | |
44224231 | r57shell | F | Oct. 12, 2018, 6:38 p.m. | OK | Python 3 | TESTS | 28 | 1840 | 30003200 | 2300 | |
46385104 | knight-erraunt | F | Nov. 29, 2018, 9:47 p.m. | OK | Python 3 | TESTS | 28 | 2432 | 50176000 | 2300 | |
51850952 | vjudge5 | F | March 26, 2019, 7:55 a.m. | OK | Ruby | TESTS | 28 | 2870 | 114892800 | 2300 | |
44220029 | yakamoto | F | Oct. 12, 2018, 4:59 p.m. | OK | Scala | TESTS | 28 | 982 | 28160000 | 2300 |
Back to search problems