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 |
|---|---|---|---|---|---|---|
| 2034 | Rayan Programming Contest 2024 - Selection (Codeforces Round 989, Div. 1 + Div. 2) | FINISHED | False | 10800 | 43428323 | Nov. 30, 2024, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 9098 ) | C | Trapped in the Witch's Labyrinth | PROGRAMMING | constructive algorithms dfs and similar graphs implementation |
In the fourth labor of Rostam , the legendary hero from the Shahnameh , an old witch has created a magical maze to trap him. The maze is a rectangular grid consisting of (n) rows and (m) columns. Each cell in the maze points in a specific direction: up, down, left, or right. The witch has enchanted Rostam so that whenever he is in a cell, he will move to the next cell in the direction indicated by that cell. If Rostam eventually exits the maze, he will be freed from the witch's enchantment and will defeat her. However, if he remains trapped within the maze forever, he will never escape. The witch has not yet determined the directions for all the cells. She wants to assign directions to the unspecified cells in such a way that the number of starting cells from which Rostam will be trapped forever is maximized. Your task is to find the maximum number of starting cells which make Rostam trapped. The first line of the input contains an integer (t) ((1 \leq t \leq 10^4)), the number of test cases. For each test case: The first line contains two integers (n) and (m) ((1 \leq n, m \leq 1000)), representing the number of rows and columns in the maze. Each of the next (n) lines contains a string of (m) characters representing the directions in the maze. Each character is one of the following: U (up) D (down) L (left) R (right) ? (unspecified direction) U (up) D (down) L (left) R (right) ? (unspecified direction) It's guaranteed that the sum of (n \cdot m) over all test cases is at most (10^6). For each test case, print a single integer, the maximum number of starting cells from which Rostam will be trapped forever after assigning directions to the unspecified cells optimally. In the first test case, all of the cells will be good no matter what you do. In the second test case, if you assign the ? s like the picture below, all of the cells will be bad: In the third test case, if you assign the ? s like the picture below, yo |
| Rayan 2024 Selection Round Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 294125605 | wzc_IOI_czw | C | Dec. 1, 2024, 1:26 a.m. | OK | C++17 (GCC 7-32) | TESTS | 20 | 62 | 2048000 | ||
| 294126341 | gopro234 | C | Dec. 1, 2024, 1:44 a.m. | OK | C++17 (GCC 7-32) | TESTS | 20 | 62 | 14848000 | ||
| 294124706 | gopro234 | C | Dec. 1, 2024, 1:06 a.m. | OK | C++17 (GCC 7-32) | TESTS | 20 | 62 | 17715200 | ||
| 294080361 | DenisKarpenko | C | Nov. 30, 2024, 5 p.m. | OK | C++17 (GCC 7-32) | TESTS | 20 | 77 | 0 | ||
| 294126355 | 123cfx | C | Dec. 1, 2024, 1:44 a.m. | OK | C++17 (GCC 7-32) | TESTS | 20 | 77 | 1126400 | ||
| 294142523 | lwdfks | C | Dec. 1, 2024, 6:03 a.m. | OK | C++17 (GCC 7-32) | TESTS | 20 | 77 | 2048000 | ||
| 294109666 | CoderAbhi27 | C | Nov. 30, 2024, 8:24 p.m. | OK | C++17 (GCC 7-32) | TESTS | 20 | 77 | 2252800 | ||
| 294141924 | harsh_bamane17 | C | Dec. 1, 2024, 5:57 a.m. | OK | C++17 (GCC 7-32) | TESTS | 20 | 77 | 2355200 | ||
| 294128645 | nob_lz | C | Dec. 1, 2024, 2:36 a.m. | OK | C++17 (GCC 7-32) | TESTS | 20 | 77 | 5222400 | ||
| 294124327 | gopro234 | C | Dec. 1, 2024, 12:55 a.m. | OK | C++17 (GCC 7-32) | TESTS | 20 | 77 | 13721600 | ||
| 294124428 | zus123 | C | Dec. 1, 2024, 12:58 a.m. | OK | C++20 (GCC 13-64) | TESTS | 20 | 61 | 5529600 | ||
| 294139940 | Koustav_Kundu | C | Dec. 1, 2024, 5:38 a.m. | OK | C++20 (GCC 13-64) | TESTS | 20 | 62 | 1843200 | ||
| 294137159 | aadit59 | C | Dec. 1, 2024, 5:07 a.m. | OK | C++20 (GCC 13-64) | TESTS | 20 | 62 | 1843200 | ||
| 294091550 | Pronoy_Deb | C | Nov. 30, 2024, 5:33 p.m. | OK | C++20 (GCC 13-64) | TESTS | 20 | 62 | 2048000 | ||
| 294126995 | lrXac | C | Dec. 1, 2024, 1:59 a.m. | OK | C++20 (GCC 13-64) | TESTS | 20 | 62 | 8089600 | ||
| 294108035 | CypherVanguard | C | Nov. 30, 2024, 8:06 p.m. | OK | C++20 (GCC 13-64) | TESTS | 20 | 77 | 102400 | ||
| 294138445 | eyewal_18 | C | Dec. 1, 2024, 5:23 a.m. | OK | C++20 (GCC 13-64) | TESTS | 20 | 77 | 102400 | ||
| 294105003 | Wasi_Ur | C | Nov. 30, 2024, 7:37 p.m. | OK | C++20 (GCC 13-64) | TESTS | 20 | 77 | 102400 | ||
| 294130471 | Random_3652 | C | Dec. 1, 2024, 3:13 a.m. | OK | C++20 (GCC 13-64) | TESTS | 20 | 77 | 1945600 | ||
| 294079320 | Mariuse_lul | C | Nov. 30, 2024, 4:56 p.m. | OK | C++20 (GCC 13-64) | TESTS | 20 | 77 | 2048000 | ||
| 294139430 | sleepinginautumnrain | C | Dec. 1, 2024, 5:33 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 20 | 77 | 0 | ||
| 294092545 | Daniyal.a | C | Nov. 30, 2024, 5:34 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 20 | 77 | 1126400 | ||
| 294134989 | linxuanmuyu | C | Dec. 1, 2024, 4:31 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 20 | 77 | 3072000 | ||
| 294134940 | jinhan814 | C | Dec. 1, 2024, 4:30 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 20 | 77 | 3072000 | ||
| 294092324 | Rafsan18 | C | Nov. 30, 2024, 5:34 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 20 | 77 | 4096000 | ||
| 294122754 | M-Sa3dy | C | Dec. 1, 2024, 12:11 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 20 | 77 | 9113600 | ||
| 294126336 | little__bug | C | Dec. 1, 2024, 1:43 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 20 | 77 | 9318400 | ||
| 294133162 | Durandal02 | C | Dec. 1, 2024, 3:59 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 20 | 78 | 2048000 | ||
| 294105427 | Niloy_Das_19 | C | Nov. 30, 2024, 7:41 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 20 | 78 | 2150400 | ||
| 294110457 | emrakul | C | Nov. 30, 2024, 8:34 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 20 | 78 | 37273600 | ||
| 294085020 | date_masamune | C | Nov. 30, 2024, 5:14 p.m. | OK | C# 8 | TESTS | 20 | 1687 | 8089600 | ||
| 294120852 | tgehr | C | Nov. 30, 2024, 11:18 p.m. | OK | D | TESTS | 20 | 343 | 51916800 | ||
| 294080656 | Schmoov | C | Nov. 30, 2024, 5 p.m. | OK | GNU C11 | TESTS | 20 | 202 | 3276800 | ||
| 294086500 | hrutiky__ | C | Nov. 30, 2024, 5:19 p.m. | OK | Go | TESTS | 20 | 968 | 25702400 | ||
| 294117979 | Hastorius | C | Nov. 30, 2024, 10:17 p.m. | OK | Java 21 | TESTS | 20 | 327 | 716800 | ||
| 294098629 | powervic08 | C | Nov. 30, 2024, 6:44 p.m. | OK | Java 21 | TESTS | 20 | 327 | 2252800 | ||
| 294079861 | Sarthak_Kharka | C | Nov. 30, 2024, 4:58 p.m. | OK | Java 21 | TESTS | 20 | 343 | 6246400 | ||
| 294085611 | Loganwick | C | Nov. 30, 2024, 5:16 p.m. | OK | Java 21 | TESTS | 20 | 374 | 3174400 | ||
| 294120482 | man-ray | C | Nov. 30, 2024, 11:09 p.m. | OK | Java 21 | TESTS | 20 | 374 | 6553600 | ||
| 294103479 | testtest111ksjfrdvn | C | Nov. 30, 2024, 7:23 p.m. | OK | Java 21 | TESTS | 20 | 374 | 6553600 | ||
| 294086136 | krikera | C | Nov. 30, 2024, 5:17 p.m. | OK | Java 21 | TESTS | 20 | 390 | 6041600 | ||
| 294132683 | amit_roy | C | Dec. 1, 2024, 3:51 a.m. | OK | Java 21 | TESTS | 20 | 514 | 1843200 | ||
| 294084542 | __muskan | C | Nov. 30, 2024, 5:13 p.m. | OK | Java 21 | TESTS | 20 | 530 | 1945600 | ||
| 294137375 | saiteja6 | C | Dec. 1, 2024, 5:11 a.m. | OK | Java 21 | TESTS | 20 | 530 | 27852800 | ||
| 294111913 | Soumadip_Mishra | C | Nov. 30, 2024, 8:50 p.m. | OK | Java 8 | TESTS | 20 | 203 | 4710400 | ||
| 294092640 | Light_1419 | C | Nov. 30, 2024, 5:34 p.m. | OK | Java 8 | TESTS | 20 | 217 | 0 | ||
| 294131299 | Jha_coder1942 | C | Dec. 1, 2024, 3:28 a.m. | OK | Java 8 | TESTS | 20 | 389 | 5017600 | ||
| 294080718 | yogesh013 | C | Nov. 30, 2024, 5:01 p.m. | OK | Java 8 | TESTS | 20 | 390 | 0 | ||
| 294085957 | vamshikrishnakyatham | C | Nov. 30, 2024, 5:17 p.m. | OK | Java 8 | TESTS | 20 | 421 | 59801600 | ||
| 294080075 | Vedant_Borkar | C | Nov. 30, 2024, 4:59 p.m. | OK | Java 8 | TESTS | 20 | 1202 | 87654400 | ||
| 294102965 | jagbarrameda | C | Nov. 30, 2024, 7:19 p.m. | OK | Kotlin 1.9 | TESTS | 20 | 312 | 4608000 | ||
| 294090765 | yungleandoer2013 | C | Nov. 30, 2024, 5:31 p.m. | OK | Kotlin 1.9 | TESTS | 20 | 312 | 4608000 | ||
| 294103230 | yajme | C | Nov. 30, 2024, 7:21 p.m. | OK | Kotlin 1.9 | TESTS | 20 | 952 | 193126400 | ||
| 294084235 | iN_siDious | C | Nov. 30, 2024, 5:12 p.m. | OK | PyPy 3-64 | TESTS | 20 | 374 | 14336000 | ||
| 294099236 | abenezer_m54 | C | Nov. 30, 2024, 6:49 p.m. | OK | PyPy 3-64 | TESTS | 20 | 390 | 13824000 | ||
| 294130684 | young_skywalker_ | C | Dec. 1, 2024, 3:17 a.m. | OK | PyPy 3-64 | TESTS | 20 | 421 | 63795200 | ||
| 294101888 | samchen123 | C | Nov. 30, 2024, 7:10 p.m. | OK | PyPy 3-64 | TESTS | 20 | 452 | 20275200 | ||
| 294100007 | Jimx123 | C | Nov. 30, 2024, 6:56 p.m. | OK | PyPy 3-64 | TESTS | 20 | 467 | 18432000 | ||
| 294089662 | samchen123 | C | Nov. 30, 2024, 5:28 p.m. | OK | PyPy 3-64 | TESTS | 20 | 499 | 20377600 | ||
| 294141733 | KrishBhimani | C | Dec. 1, 2024, 5:55 a.m. | OK | PyPy 3-64 | TESTS | 20 | 499 | 57753600 | ||
| 294101409 | Dutch_vdl | C | Nov. 30, 2024, 7:06 p.m. | OK | PyPy 3-64 | TESTS | 20 | 593 | 56524800 | ||
| 294083057 | Cloud_Z3 | C | Nov. 30, 2024, 5:08 p.m. | OK | PyPy 3-64 | TESTS | 20 | 624 | 26624000 | ||
| 294091461 | xxh1999 | C | Nov. 30, 2024, 5:33 p.m. | OK | PyPy 3-64 | TESTS | 20 | 640 | 106496000 | ||
| 294082662 | VRAJESHARMA | C | Nov. 30, 2024, 5:07 p.m. | OK | Python 3 | TESTS | 20 | 733 | 10035200 | ||
| 294078550 | kamulboyev__diyorbek | C | Nov. 30, 2024, 4:54 p.m. | OK | Python 3 | TESTS | 20 | 859 | 10035200 | ||
| 294078524 | kstef | C | Nov. 30, 2024, 4:54 p.m. | OK | Python 3 | TESTS | 20 | 1655 | 139264000 | ||
| 294098599 | NJIRTAI | C | Nov. 30, 2024, 6:44 p.m. | OK | Python 3 | TESTS | 20 | 1765 | 208998400 | ||
| 294089112 | storybehind | C | Nov. 30, 2024, 5:26 p.m. | OK | Python 3 | TESTS | 20 | 2406 | 14233600 | ||
| 294083341 | manvendra21 | C | Nov. 30, 2024, 5:09 p.m. | OK | Python 3 | TESTS | 20 | 2796 | 29900800 | ||
| 294088275 | Codemaster404 | C | Nov. 30, 2024, 5:24 p.m. | OK | Ruby 3 | TESTS | 20 | 1171 | 11878400 | ||
| 294086101 | CliffordMortimer | C | Nov. 30, 2024, 5:17 p.m. | OK | Rust 2021 | TESTS | 20 | 155 | 6041600 | ||
| 294101527 | DreadedHippy | C | Nov. 30, 2024, 7:07 p.m. | OK | Rust 2021 | TESTS | 20 | 218 | 132505600 | ||
| 294097563 | Cheshulko | C | Nov. 30, 2024, 6:37 p.m. | OK | Rust 2021 | TESTS | 20 | 296 | 44134400 | ||
| 294128960 | Lord-scheme | C | Dec. 1, 2024, 2:43 a.m. | OK | Rust 2021 | TESTS | 20 | 312 | 113766400 |
Back to search problems