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 |
---|---|---|---|---|---|---|
1811 | Codeforces Round 863 (Div. 3) | FINISHED | False | 8100 | 51204299 | April 4, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 20509 ) | B | Conveyor Belts | PROGRAMMING | math |
B'Conveyor matrix m_n is matrix of size n x n , where n is an even number. The matrix consists of concentric ribbons moving clockwise. In other words, the conveyor matrix for n = 2 is simply a matrix 2 x 2 , whose cells form a cycle of length 4 clockwise. For any natural k ge 2 , the matrix m_{2k} is obtained by adding to the matrix m_{2k - 2} an outer layer forming a clockwise cycle. You are standing in a cell with coordinates x_1, y_1 and you want to get into a cell with coordinates x_2, y_2 . A cell has coordinates x, y if it is located at the intersection of the x th row and the y th column. Standing on some cell, every second you will move to the cell next in the direction of movement of the tape on which you are. You can also move to a neighboring cell by spending one unit of energy. Movements happen instantly and you can make an unlimited number of them at any time. Your task is to find the minimum amount of energy that will have to be spent to get from the cell with coordinates x_1, y_1 to the cell with coordinates x_2, y_2 . For example, n=8 initially you are in a cell with coordinates 1,3 and you want to get into a cell with coordinates 6, 4 . You can immediately make 2 movements, once you are in a cell with coordinates 3, 3 , and then after 8 seconds you will be in the right cell. The first line contains an integer t ( 1 <= t <= 2 cdot 10^5 ) -- the number of test cases. The descriptions of the test cases follow. The description of each test case consists of one string containing five integers n , x_1 , y_1 , x_2 and y_2 ( 1 <= x_1, y_1, x_2, y_2 <= n <= 10^9 ) -- matrix size and the coordinates of the start and end cells. It is guaranteed that the number n is even. For each test case, print one integer in a separate line -- the minimum amount of energy that wi'... |
114788 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
200827236 | bluemegane | B | April 5, 2023, 4:01 a.m. | OK | C# 8 | TESTS | 10 | 1341 | 4300800 | ||
200817632 | orz_0000 | B | April 5, 2023, 12:46 a.m. | OK | Clang++20 Diagnostics | TESTS | 10 | 358 | 0 | ||
200789551 | anirbandebnath | B | April 4, 2023, 5:47 p.m. | OK | GNU C11 | TESTS | 7 | 935 | 0 | ||
200820096 | Bernoullitelsla | B | April 5, 2023, 1:45 a.m. | OK | GNU C11 | TESTS | 10 | 982 | 0 | ||
200800827 | astronom1cal | B | April 4, 2023, 7:29 p.m. | OK | GNU C11 | TESTS | 9 | 982 | 0 | ||
200781058 | impawstarlight | B | April 4, 2023, 4:49 p.m. | OK | GNU C11 | TESTS | 7 | 1013 | 0 | ||
200831617 | being_mysterious | B | April 5, 2023, 5:12 a.m. | OK | GNU C11 | TESTS | 10 | 1029 | 0 | ||
200782560 | Vibhav123 | B | April 4, 2023, 4:55 p.m. | OK | GNU C11 | TESTS | 7 | 1044 | 0 | ||
200780284 | parashar22475 | B | April 4, 2023, 4:48 p.m. | OK | GNU C11 | TESTS | 7 | 1044 | 0 | ||
200794679 | iffatul_anon | B | April 4, 2023, 6:40 p.m. | OK | GNU C11 | TESTS | 9 | 1060 | 0 | ||
200799192 | astronom1cal | B | April 4, 2023, 7:09 p.m. | OK | GNU C11 | TESTS | 9 | 1060 | 0 | ||
200824397 | sdfghujhjdf | B | April 5, 2023, 3:10 a.m. | OK | GNU C11 | TESTS | 10 | 1122 | 0 | ||
200834579 | Tom66 | B | April 5, 2023, 5:51 a.m. | OK | GNU C++14 | TESTS | 10 | 93 | 6451200 | ||
200817961 | j_j_h | B | April 5, 2023, 12:54 a.m. | OK | GNU C++14 | TESTS | 10 | 202 | 0 | ||
200828373 | LMcheng | B | April 5, 2023, 4:20 a.m. | OK | GNU C++14 | TESTS | 10 | 202 | 0 | ||
200781698 | bbc_xu | B | April 4, 2023, 4:51 p.m. | OK | GNU C++14 | TESTS | 7 | 202 | 0 | ||
200829924 | LMcheng | B | April 5, 2023, 4:47 a.m. | OK | GNU C++14 | TESTS | 10 | 217 | 0 | ||
200831623 | zyxawa | B | April 5, 2023, 5:12 a.m. | OK | GNU C++14 | TESTS | 10 | 217 | 0 | ||
200827788 | hxzzz | B | April 5, 2023, 4:10 a.m. | OK | GNU C++14 | TESTS | 10 | 218 | 0 | ||
200817978 | j_j_h | B | April 5, 2023, 12:54 a.m. | OK | GNU C++14 | TESTS | 10 | 218 | 0 | ||
200823661 | DuanYue | B | April 5, 2023, 2:57 a.m. | OK | GNU C++14 | TESTS | 10 | 218 | 0 | ||
200827750 | hxzzz | B | April 5, 2023, 4:10 a.m. | OK | GNU C++14 | TESTS | 10 | 233 | 0 | ||
200794707 | iffatul_anon | B | April 4, 2023, 6:41 p.m. | OK | GNU C++17 | TESTS | 9 | 217 | 0 | ||
200818218 | fengrunning | B | April 5, 2023, 1 a.m. | OK | GNU C++17 | TESTS | 10 | 217 | 409600 | ||
200801880 | Gold_Dragon | B | April 4, 2023, 7:42 p.m. | OK | GNU C++17 | TESTS | 9 | 233 | 0 | ||
200814132 | Luciefer_x | B | April 4, 2023, 11:11 p.m. | OK | GNU C++17 | TESTS | 10 | 233 | 0 | ||
200823423 | 5af | B | April 5, 2023, 2:53 a.m. | OK | GNU C++17 | TESTS | 10 | 234 | 0 | ||
200814074 | Luciefer_x | B | April 4, 2023, 11:09 p.m. | OK | GNU C++17 | TESTS | 10 | 234 | 0 | ||
200821212 | chuquwan9964 | B | April 5, 2023, 2:09 a.m. | OK | GNU C++17 | TESTS | 10 | 234 | 0 | ||
200814306 | Luciefer_x | B | April 4, 2023, 11:16 p.m. | OK | GNU C++17 | TESTS | 10 | 249 | 0 | ||
200814572 | Luciefer_x | B | April 4, 2023, 11:23 p.m. | OK | GNU C++17 | TESTS | 10 | 249 | 0 | ||
200814026 | Luciefer_x | B | April 4, 2023, 11:08 p.m. | OK | GNU C++17 | TESTS | 10 | 264 | 0 | ||
200822738 | Njaso | B | April 5, 2023, 2:40 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 187 | 0 | ||
200788909 | yh11 | B | April 4, 2023, 5:41 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 187 | 0 | ||
200810921 | calebmartim | B | April 4, 2023, 9:53 p.m. | OK | GNU C++17 (64) | TESTS | 9 | 202 | 0 | ||
200803300 | sloppy_coder | B | April 4, 2023, 8:01 p.m. | OK | GNU C++17 (64) | TESTS | 9 | 202 | 0 | ||
200802143 | HitmanX97 | B | April 4, 2023, 7:46 p.m. | OK | GNU C++17 (64) | TESTS | 9 | 202 | 0 | ||
200831260 | OTTFF | B | April 5, 2023, 5:07 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 202 | 0 | ||
200804864 | MarcosK | B | April 4, 2023, 8:21 p.m. | OK | GNU C++17 (64) | TESTS | 9 | 202 | 0 | ||
200834927 | 1KgChawal | B | April 5, 2023, 5:55 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 202 | 0 | ||
200831763 | Hend-Sayed | B | April 5, 2023, 5:14 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 202 | 0 | ||
200823948 | paintstar | B | April 5, 2023, 3:02 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 202 | 0 | ||
200783024 | Neryo | B | April 4, 2023, 4:58 p.m. | OK | GNU C++20 (64) | TESTS | 7 | 124 | 16076800 | ||
200800394 | JohanXLiebert | B | April 4, 2023, 7:23 p.m. | OK | GNU C++20 (64) | TESTS | 9 | 139 | 0 | ||
200833234 | khanhtai | B | April 5, 2023, 5:33 a.m. | OK | GNU C++20 (64) | TESTS | 10 | 139 | 0 | ||
200831725 | AsindE | B | April 5, 2023, 5:13 a.m. | OK | GNU C++20 (64) | TESTS | 10 | 139 | 0 | ||
200827086 | m.foysal | B | April 5, 2023, 3:59 a.m. | OK | GNU C++20 (64) | TESTS | 10 | 139 | 0 | ||
200812709 | pkroll | B | April 4, 2023, 10:35 p.m. | OK | GNU C++20 (64) | TESTS | 9 | 139 | 0 | ||
200789233 | smolguy | B | April 4, 2023, 5:44 p.m. | OK | GNU C++20 (64) | TESTS | 7 | 139 | 0 | ||
200787563 | Hari03 | B | April 4, 2023, 5:29 p.m. | OK | GNU C++20 (64) | TESTS | 7 | 139 | 0 | ||
200784854 | yousehussien998 | B | April 4, 2023, 5:09 p.m. | OK | GNU C++20 (64) | TESTS | 7 | 139 | 0 | ||
200823377 | littlecocomos | B | April 5, 2023, 2:52 a.m. | OK | GNU C++20 (64) | TESTS | 10 | 139 | 1638400 | ||
200824465 | longsl | B | April 5, 2023, 3:11 a.m. | OK | Go | TESTS | 10 | 498 | 4915200 | ||
200801759 | wat2 | B | April 4, 2023, 7:40 p.m. | OK | Java 11 | TESTS | 9 | 404 | 0 | ||
200788583 | vijender_8601 | B | April 4, 2023, 5:38 p.m. | OK | Java 11 | TESTS | 7 | 405 | 0 | ||
200779396 | madarin_utk | B | April 4, 2023, 4:47 p.m. | OK | Java 11 | TESTS | 7 | 545 | 0 | ||
200787448 | Ayyylmao | B | April 4, 2023, 5:28 p.m. | OK | Java 11 | TESTS | 7 | 717 | 0 | ||
200793690 | ilasiawo | B | April 4, 2023, 6:29 p.m. | OK | Java 11 | TESTS | 9 | 1372 | 0 | ||
200805508 | RatkoSebez | B | April 4, 2023, 8:30 p.m. | OK | Java 11 | TESTS | 9 | 1653 | 0 | ||
200779773 | karthiks2611 | B | April 4, 2023, 4:47 p.m. | OK | Java 11 | TESTS | 7 | 1700 | 0 | ||
200778878 | Rohit_Aayushmaan | B | April 4, 2023, 4:46 p.m. | OK | Java 11 | TESTS | 7 | 1747 | 0 | ||
200827280 | Horridbeast | B | April 5, 2023, 4:02 a.m. | OK | Java 11 | TESTS | 10 | 2636 | 0 | ||
200789360 | PlayDate | B | April 4, 2023, 5:45 p.m. | OK | Java 11 | TESTS | 7 | 2714 | 0 | ||
200815841 | frzcodes12 | B | April 4, 2023, 11:58 p.m. | OK | Java 17 | TESTS | 10 | 436 | 409600 | ||
200802608 | Suraj1607 | B | April 4, 2023, 7:52 p.m. | OK | Java 17 | TESTS | 9 | 451 | 614400 | ||
200792036 | adityasen167 | B | April 4, 2023, 6:12 p.m. | OK | Java 17 | TESTS | 7 | 467 | 512000 | ||
200782284 | Pranav3926 | B | April 4, 2023, 4:54 p.m. | OK | Java 17 | TESTS | 7 | 514 | 716800 | ||
200786433 | aishwarykesarwani | B | April 4, 2023, 5:20 p.m. | OK | Java 17 | TESTS | 7 | 998 | 102400 | ||
200781482 | Scamy | B | April 4, 2023, 4:51 p.m. | OK | Java 17 | TESTS | 7 | 1029 | 0 | ||
200782835 | anand_mishra_ | B | April 4, 2023, 4:57 p.m. | OK | Java 17 | TESTS | 7 | 1060 | 512000 | ||
200783955 | Aaryendra | B | April 4, 2023, 5:03 p.m. | OK | Java 17 | TESTS | 7 | 1122 | 819200 | ||
200829189 | rmakash999 | B | April 5, 2023, 4:35 a.m. | OK | Java 17 | TESTS | 10 | 2230 | 1331200 | ||
200834607 | Farhan0710 | B | April 5, 2023, 5:51 a.m. | OK | Java 17 | TESTS | 10 | 2246 | 819200 | ||
200815775 | frzcodes12 | B | April 4, 2023, 11:56 p.m. | OK | Java 8 | TESTS | 10 | 295 | 0 | ||
200793936 | elephanto | B | April 4, 2023, 6:32 p.m. | OK | Java 8 | TESTS | 9 | 296 | 0 | ||
200831248 | T_PAVAN_NAGARAJU | B | April 5, 2023, 5:06 a.m. | OK | Java 8 | TESTS | 10 | 311 | 0 | ||
200782223 | formidablechief_27 | B | April 4, 2023, 4:54 p.m. | OK | Java 8 | TESTS | 7 | 342 | 0 | ||
200799436 | FamAShihata | B | April 4, 2023, 7:11 p.m. | OK | Java 8 | TESTS | 9 | 343 | 0 | ||
200792011 | Safawt | B | April 4, 2023, 6:12 p.m. | OK | Java 8 | TESTS | 7 | 358 | 0 | ||
200794373 | frzcodes12 | B | April 4, 2023, 6:37 p.m. | OK | Java 8 | TESTS | 9 | 1310 | 0 | ||
200788322 | riyadas.200208 | B | April 4, 2023, 5:36 p.m. | OK | Java 8 | TESTS | 7 | 1512 | 0 | ||
200779260 | gautam_st | B | April 4, 2023, 4:46 p.m. | OK | Java 8 | TESTS | 7 | 1591 | 0 | ||
200821138 | cyclingle | B | April 5, 2023, 2:07 a.m. | OK | Java 8 | TESTS | 10 | 2496 | 0 | ||
200785393 | tatianyi | B | April 4, 2023, 5:12 p.m. | OK | MS C++ 2017 | TESTS | 7 | 982 | 0 | ||
200794037 | Karimarm | B | April 4, 2023, 6:33 p.m. | OK | MS C++ 2017 | TESTS | 9 | 1606 | 0 | ||
200778516 | adityanprasad275 | B | April 4, 2023, 4:45 p.m. | OK | MS C++ 2017 | TESTS | 7 | 1652 | 0 | ||
200791272 | mukhaledd | B | April 4, 2023, 6:04 p.m. | OK | MS C++ 2017 | TESTS | 7 | 1684 | 0 | ||
200779525 | Alxyddog | B | April 4, 2023, 4:47 p.m. | OK | MS C++ 2017 | TESTS | 7 | 1715 | 0 | ||
200781525 | vaibhavi812 | B | April 4, 2023, 4:51 p.m. | OK | MS C++ 2017 | TESTS | 7 | 1731 | 0 | ||
200788511 | EbuYandex | B | April 4, 2023, 5:38 p.m. | OK | MS C++ 2017 | TESTS | 7 | 1777 | 0 | ||
200783573 | jvatsal0709 | B | April 4, 2023, 5:01 p.m. | OK | PyPy 3 | TESTS | 7 | 1247 | 11878400 | ||
200807318 | Chelovek9 | B | April 4, 2023, 8:54 p.m. | OK | PyPy 3 | TESTS | 9 | 1528 | 25804800 | ||
200787911 | Kl0_o | B | April 4, 2023, 5:32 p.m. | OK | PyPy 3 | TESTS | 7 | 2667 | 12288000 | ||
200821996 | Youarenotgood | B | April 5, 2023, 2:26 a.m. | OK | PyPy 3-64 | TESTS | 10 | 701 | 13107200 | ||
200819379 | udayan8 | B | April 5, 2023, 1:28 a.m. | OK | PyPy 3-64 | TESTS | 10 | 763 | 30617600 | ||
200826986 | fuyo1622 | B | April 5, 2023, 3:57 a.m. | OK | PyPy 3-64 | TESTS | 10 | 997 | 14028800 | ||
200785306 | toam | B | April 4, 2023, 5:12 p.m. | OK | PyPy 3-64 | TESTS | 7 | 1029 | 13824000 | ||
200778894 | Yergali | B | April 4, 2023, 4:46 p.m. | OK | PyPy 3-64 | TESTS | 7 | 1045 | 14540800 | ||
200786100 | flexr | B | April 4, 2023, 5:17 p.m. | OK | PyPy 3-64 | TESTS | 7 | 1076 | 14540800 | ||
200828199 | thuonguyenvan | B | April 5, 2023, 4:17 a.m. | OK | PyPy 3-64 | TESTS | 10 | 1107 | 37683200 | ||
200790341 | titan23 | B | April 4, 2023, 5:55 p.m. | OK | PyPy 3-64 | TESTS | 7 | 1138 | 16588800 | ||
200798670 | Mayank_Bad | B | April 4, 2023, 7:03 p.m. | OK | PyPy 3-64 | TESTS | 9 | 1154 | 12800000 | ||
200803333 | arnav31 | B | April 4, 2023, 8:01 p.m. | OK | PyPy 3-64 | TESTS | 9 | 1184 | 14131200 | ||
200808016 | Chelovek9 | B | April 4, 2023, 9:05 p.m. | OK | Python 3 | TESTS | 9 | 717 | 15667200 | ||
200809720 | Chelovek9 | B | April 4, 2023, 9:32 p.m. | OK | Python 3 | TESTS | 9 | 748 | 53964800 | ||
200818693 | leanlean | B | April 5, 2023, 1:12 a.m. | OK | Python 3 | TESTS | 10 | 1076 | 512000 | ||
200788172 | Kl0_o | B | April 4, 2023, 5:35 p.m. | OK | Python 3 | TESTS | 7 | 1185 | 5734400 | ||
200807346 | MohmadZaid._. | B | April 4, 2023, 8:55 p.m. | OK | Python 3 | TESTS | 9 | 2027 | 102400 | ||
200819394 | Stan_Jason | B | April 5, 2023, 1:29 a.m. | OK | Python 3 | TESTS | 10 | 2152 | 0 | ||
200792150 | Angelawqy | B | April 4, 2023, 6:13 p.m. | OK | Python 3 | TESTS | 7 | 2152 | 0 | ||
200808712 | Ray10 | B | April 4, 2023, 9:15 p.m. | OK | Python 3 | TESTS | 9 | 2168 | 0 | ||
200785959 | andiamironmanu | B | April 4, 2023, 5:16 p.m. | OK | Python 3 | TESTS | 7 | 2183 | 0 | ||
200783089 | shambhavi_anant | B | April 4, 2023, 4:58 p.m. | OK | Python 3 | TESTS | 7 | 2183 | 0 | ||
200824556 | Kither | B | April 5, 2023, 3:13 a.m. | OK | Rust 2021 | TESTS | 10 | 156 | 0 | ||
200808964 | Milrosen | B | April 4, 2023, 9:20 p.m. | OK | Rust 2021 | TESTS | 9 | 1715 | 0 |
Back to search problems