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 |
|---|---|---|---|---|---|---|
| 2201 | Codeforces Round 1082 (Div. 1) | FINISHED | False | 9000 | 4548323 | Feb. 23, 2026, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 4809 ) | B | Recollect Numbers | PROGRAMMING | constructive algorithms |
There are (2n) cards with numbers (1,1,2,2,\ldots,n,n) written on them. In other words, for all (j=1,2,\ldots,n), there are exactly (2) cards with the number (j). Each card only has one number written on its front. You will play a card flipping game. Initially, all (2n) cards are placed on their back (the side without numbers). In each turn, you flip exactly two cards. If the two cards have the same number, you discard the two cards. Otherwise, you flip them back to their original position. You win when all (2n) cards are discarded. Note that you do not have to flip the two cards simultaneously, so you can decide on your choice of the second card after seeing the number on the first one. Consider the following "greedy" algorithm to play the game. Initially, the (2n) cards are placed in a row arbitrarily. Then your strategy on each turn is as follows: If there are two cards that you have flipped previously and have the same number , flip those two cards. Otherwise, flip the first card (^\text{*}) that you have never flipped so far as the first one. Let's say this card has the number (x). Afterwards, if there is another card that you have flipped previously and has the number (x) , flip that card. Otherwise, flip the first card (^{\text{∗}}) that you have never flipped so far ( including in this turn ) as the second one. Afterwards, if there is another card that you have flipped previously and has the number (x) , flip that card. Otherwise, flip the first card (^{\text{∗}}) that you have never flipped so far ( including in this turn ) as the second one. It can be shown that the algorithm's strategy is uniquely determined on every turn. You must solve the following problem regarding the algorithm stated above. Given (n) and (k), please find an orientation of the (2n) cards for which the algorithm above takes exactly (k) turns to win the game. Additionally, if such an orientation does not |
| Codeforces Round 1082 (Div. 1, Div. 2) Complete Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 364076578 | -firefly- | B | Feb. 23, 2026, 3:47 p.m. | OK | C# 13 | TESTS | 19 | 93 | 41881600 | ||
| 364070403 | sjtu-wya2007 | B | Feb. 23, 2026, 3:33 p.m. | OK | C++17 (GCC 7-32) | TESTS | 19 | 46 | 6656000 | ||
| 364075670 | Taechka | B | Feb. 23, 2026, 3:44 p.m. | OK | C++17 (GCC 7-32) | TESTS | 19 | 78 | 0 | ||
| 364064264 | Because_I_Love_You | B | Feb. 23, 2026, 3:21 p.m. | OK | C++17 (GCC 7-32) | TESTS | 19 | 78 | 0 | ||
| 364054375 | Kasane_Teto | B | Feb. 23, 2026, 3:05 p.m. | OK | C++17 (GCC 7-32) | TESTS | 19 | 78 | 102400 | ||
| 364067727 | timg8710 | B | Feb. 23, 2026, 3:28 p.m. | OK | C++17 (GCC 7-32) | TESTS | 19 | 78 | 2355200 | ||
| 364082577 | orzchenhaoxuan | B | Feb. 23, 2026, 4:01 p.m. | OK | C++17 (GCC 7-32) | TESTS | 19 | 78 | 2457600 | ||
| 364051604 | Potassium | B | Feb. 23, 2026, 3:01 p.m. | OK | C++17 (GCC 7-32) | TESTS | 19 | 78 | 2560000 | ||
| 364153702 | dkedu | B | Feb. 24, 2026, 5:44 a.m. | OK | C++17 (GCC 7-32) | TESTS | 19 | 93 | 0 | ||
| 364076104 | lwm7708 | B | Feb. 23, 2026, 3:46 p.m. | OK | C++17 (GCC 7-32) | TESTS | 19 | 93 | 0 | ||
| 364063278 | lee_min_hoii | B | Feb. 23, 2026, 3:20 p.m. | OK | C++17 (GCC 7-32) | TESTS | 19 | 93 | 0 | ||
| 364082727 | Jensen123 | B | Feb. 23, 2026, 4:02 p.m. | OK | C++20 (GCC 13-64) | TESTS | 19 | 46 | 102400 | ||
| 364063253 | ahsoltan | B | Feb. 23, 2026, 3:20 p.m. | OK | C++20 (GCC 13-64) | TESTS | 19 | 46 | 102400 | ||
| 364062359 | ya_ssh | B | Feb. 23, 2026, 3:18 p.m. | OK | C++20 (GCC 13-64) | TESTS | 19 | 46 | 102400 | ||
| 364062980 | ukbwyx | B | Feb. 23, 2026, 3:19 p.m. | OK | C++20 (GCC 13-64) | TESTS | 19 | 46 | 3481600 | ||
| 364049378 | Utena | B | Feb. 23, 2026, 2:58 p.m. | OK | C++20 (GCC 13-64) | TESTS | 19 | 46 | 4915200 | ||
| 364051010 | Zheng_iii | B | Feb. 23, 2026, 3 p.m. | OK | C++20 (GCC 13-64) | TESTS | 19 | 46 | 18124800 | ||
| 364144670 | creesh_krx | B | Feb. 24, 2026, 3:08 a.m. | OK | C++20 (GCC 13-64) | TESTS | 19 | 62 | 0 | ||
| 364082565 | houren | B | Feb. 23, 2026, 4:01 p.m. | OK | C++20 (GCC 13-64) | TESTS | 19 | 62 | 0 | ||
| 364081126 | Xerxes | B | Feb. 23, 2026, 3:57 p.m. | OK | C++20 (GCC 13-64) | TESTS | 19 | 62 | 0 | ||
| 364067994 | mewmewmew | B | Feb. 23, 2026, 3:29 p.m. | OK | C++20 (GCC 13-64) | TESTS | 19 | 62 | 0 | ||
| 364064251 | askd | B | Feb. 23, 2026, 3:21 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 19 | 46 | 0 | ||
| 364052042 | re-wa-tl-ok | B | Feb. 23, 2026, 3:01 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 19 | 46 | 102400 | ||
| 364046803 | tickcross.y | B | Feb. 23, 2026, 2:54 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 19 | 46 | 2150400 | ||
| 364077572 | csp1025 | B | Feb. 23, 2026, 3:49 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 19 | 46 | 3686400 | ||
| 364055361 | Gheal | B | Feb. 23, 2026, 3:07 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 19 | 46 | 4096000 | ||
| 364140055 | Kevin911 | B | Feb. 24, 2026, 1:26 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 19 | 46 | 4915200 | ||
| 364135285 | Dymeztky | B | Feb. 23, 2026, 11:16 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 19 | 62 | 0 | ||
| 364125626 | Sora213 | B | Feb. 23, 2026, 8:56 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 19 | 62 | 0 | ||
| 364073892 | Anemone_ | B | Feb. 23, 2026, 3:41 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 19 | 62 | 0 | ||
| 364063457 | Boboge | B | Feb. 23, 2026, 3:20 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 19 | 62 | 0 | ||
| 364079639 | Gassa | B | Feb. 23, 2026, 3:54 p.m. | OK | D | TESTS | 19 | 343 | 10547200 | ||
| 364097311 | pengin_2000 | B | Feb. 23, 2026, 4:45 p.m. | OK | GNU C11 | TESTS | 19 | 140 | 2457600 | ||
| 364078381 | omaltsev | B | Feb. 23, 2026, 3:51 p.m. | OK | Haskell | TESTS | 19 | 234 | 1024000 | ||
| 364134030 | GaleStarr | B | Feb. 23, 2026, 10:49 p.m. | OK | Java 21 | TESTS | 19 | 421 | 61337600 | ||
| 364122016 | daniel.glabai | B | Feb. 23, 2026, 8:16 p.m. | OK | Java 21 | TESTS | 19 | 562 | 1126400 | ||
| 364058519 | NeelmaniPandey09 | B | Feb. 23, 2026, 3:12 p.m. | OK | Java 8 | TESTS | 19 | 312 | 35635200 | ||
| 364057016 | Tlatoani | B | Feb. 23, 2026, 3:09 p.m. | OK | Kotlin 2.2 | TESTS | 19 | 484 | 38809600 | ||
| 364050291 | bcollet | B | Feb. 23, 2026, 2:59 p.m. | OK | PyPy 2 | TESTS | 19 | 156 | 24166400 | ||
| 364067031 | Emikooh | B | Feb. 23, 2026, 3:27 p.m. | OK | PyPy 3-64 | TESTS | 19 | 125 | 22630400 | ||
| 364080453 | hitman_py | B | Feb. 23, 2026, 3:56 p.m. | OK | PyPy 3-64 | TESTS | 19 | 125 | 37888000 | ||
| 364059423 | Nikrien | B | Feb. 23, 2026, 3:13 p.m. | OK | PyPy 3-64 | TESTS | 19 | 140 | 24473600 | ||
| 364070080 | hugoback01 | B | Feb. 23, 2026, 3:33 p.m. | OK | PyPy 3-64 | TESTS | 19 | 140 | 24883200 | ||
| 364148468 | pt50hgm | B | Feb. 24, 2026, 4:16 a.m. | OK | PyPy 3-64 | TESTS | 19 | 156 | 19046400 | ||
| 364045512 | literalchild | B | Feb. 23, 2026, 2:52 p.m. | OK | PyPy 3-64 | TESTS | 19 | 156 | 36249600 | ||
| 364071048 | shade34 | B | Feb. 23, 2026, 3:35 p.m. | OK | PyPy 3-64 | TESTS | 19 | 171 | 19660800 | ||
| 364085270 | yupooh | B | Feb. 23, 2026, 4:08 p.m. | OK | PyPy 3-64 | TESTS | 19 | 171 | 36147200 | ||
| 364060965 | Jank | B | Feb. 23, 2026, 3:16 p.m. | OK | PyPy 3-64 | TESTS | 19 | 171 | 36147200 | ||
| 364057247 | twosquares | B | Feb. 23, 2026, 3:10 p.m. | OK | PyPy 3-64 | TESTS | 19 | 171 | 36147200 | ||
| 364052345 | Jimanbanashi | B | Feb. 23, 2026, 3:02 p.m. | OK | Python 2 | TESTS | 19 | 234 | 35635200 | ||
| 364055541 | Solalyth | B | Feb. 23, 2026, 3:07 p.m. | OK | Rust 2021 | TESTS | 19 | 62 | 13004800 | ||
| 364070444 | Mon_ster | B | Feb. 23, 2026, 3:34 p.m. | OK | Rust 2024 | TESTS | 19 | 78 | 12595200 | ||
| 364070962 | mertyilmaz | B | Feb. 23, 2026, 3:35 p.m. | OK | Rust 2024 | TESTS | 19 | 78 | 21401600 | ||
| 364056709 | DanielAnker | B | Feb. 23, 2026, 3:09 p.m. | OK | Rust 2024 | TESTS | 19 | 93 | 24985600 | ||
| 364049733 | Darknef | B | Feb. 23, 2026, 2:58 p.m. | OK | Rust 2024 | TESTS | 19 | 109 | 19865600 |
Back to search problems