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 |
|---|---|---|---|---|---|---|
| 2071 | Codeforces Round 1007 (Div. 2) | FINISHED | False | 8100 | 35652323 | Feb. 28, 2025, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 27787 ) | A | The Play Never Ends | PROGRAMMING | math number theory |
Let's introduce a two-player game, table tennis, where a winner is always decided and draws are impossible. Three players, Sosai, Fofo, and Hohai, want to spend the rest of their lives playing table tennis. They decided to play forever in the following way: In each match, two players compete while the third spectates. To ensure fairness, no player can play three times in a row. The player who plays twice in a row must sit out as a spectator in the next match, which will be played by the other two players. Otherwise, the winner and the spectator will play in the next match, while the loser will spectate. Now, the players, fully immersed in this infinite loop of matches, have tasked you with solving the following problem: Given an integer (k), determine whether the spectator of the first match can be the spectator in the (k)-th match. Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 1000)). The description of the test cases follows. The only line of each test case contains one integer (k) ((1 \le k \le 10^9)). For each test case, print "YES" (without quotes) if the spectator of the first match can be the spectator of the (k)-th match, and "NO" (without quotes) otherwise. You can output the answer in any case (upper or lower). For example, the strings "yEs" , "yes" , "Yes" , and "YES" will be recognized as positive responses. In the first test case, the spectator of the first match is already a spectator in the (1)st match. In the second test case, the spectator of the first match will play in the (2)nd match regardless of the result of the first match. |
| Codeforces Round 1007 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 308401387 | Sumon_Ahmed | A | Feb. 28, 2025, 7:13 p.m. | OK | C# 10 | TESTS | 3 | 93 | 0 | ||
| 308408602 | Rifatjoy | A | Feb. 28, 2025, 8:19 p.m. | OK | C++17 (GCC 7-32) | TESTS | 3 | 15 | 0 | ||
| 308448984 | Dakshita_Singh | A | March 1, 2025, 5:52 a.m. | OK | C++17 (GCC 7-32) | TESTS | 3 | 30 | 0 | ||
| 308443541 | Radioactive_10 | A | March 1, 2025, 5:03 a.m. | OK | C++17 (GCC 7-32) | TESTS | 3 | 30 | 0 | ||
| 308442440 | revenger_11 | A | March 1, 2025, 4:51 a.m. | OK | C++17 (GCC 7-32) | TESTS | 3 | 30 | 0 | ||
| 308429921 | buntatayoga | A | March 1, 2025, 2:11 a.m. | OK | C++17 (GCC 7-32) | TESTS | 3 | 30 | 0 | ||
| 308420783 | Wolke | A | Feb. 28, 2025, 10:55 p.m. | OK | C++17 (GCC 7-32) | TESTS | 3 | 30 | 0 | ||
| 308417293 | Ebrahim_Mohamed7 | A | Feb. 28, 2025, 9:55 p.m. | OK | C++17 (GCC 7-32) | TESTS | 3 | 30 | 0 | ||
| 308410451 | Cowfrog | A | Feb. 28, 2025, 8:36 p.m. | OK | C++17 (GCC 7-32) | TESTS | 3 | 30 | 0 | ||
| 308410230 | TheBatMan | A | Feb. 28, 2025, 8:34 p.m. | OK | C++17 (GCC 7-32) | TESTS | 3 | 30 | 0 | ||
| 308450161 | Kausiq_Mondol | A | March 1, 2025, 6:01 a.m. | OK | C++17 (GCC 7-32) | TESTS | 3 | 30 | 0 | ||
| 308439926 | BDN_SANS | A | March 1, 2025, 4:20 a.m. | OK | C++20 (GCC 13-64) | TESTS | 3 | 15 | 0 | ||
| 308426739 | Amrkhaled1 | A | March 1, 2025, 1:10 a.m. | OK | C++20 (GCC 13-64) | TESTS | 3 | 15 | 0 | ||
| 308394110 | MCoder123 | A | Feb. 28, 2025, 6:11 p.m. | OK | C++20 (GCC 13-64) | TESTS | 3 | 15 | 0 | ||
| 308389439 | Tun-Tun-Mosi | A | Feb. 28, 2025, 5:38 p.m. | OK | C++20 (GCC 13-64) | TESTS | 3 | 15 | 0 | ||
| 308448762 | anurag_16 | A | March 1, 2025, 5:50 a.m. | OK | C++20 (GCC 13-64) | TESTS | 3 | 30 | 0 | ||
| 308443356 | raj8963 | A | March 1, 2025, 5:02 a.m. | OK | C++20 (GCC 13-64) | TESTS | 3 | 30 | 0 | ||
| 308429693 | Mohammad_Aasaad | A | March 1, 2025, 2:07 a.m. | OK | C++20 (GCC 13-64) | TESTS | 3 | 30 | 0 | ||
| 308426867 | Cycrane | A | March 1, 2025, 1:13 a.m. | OK | C++20 (GCC 13-64) | TESTS | 3 | 30 | 0 | ||
| 308419346 | wynaut | A | Feb. 28, 2025, 10:29 p.m. | OK | C++20 (GCC 13-64) | TESTS | 3 | 30 | 0 | ||
| 308405656 | FP7317 | A | Feb. 28, 2025, 7:53 p.m. | OK | C++20 (GCC 13-64) | TESTS | 3 | 30 | 0 | ||
| 308398321 | catgirl | A | Feb. 28, 2025, 6:46 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 3 | 15 | 102400 | ||
| 308419467 | deepak30 | A | Feb. 28, 2025, 10:31 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 3 | 30 | 0 | ||
| 308440440 | FangYifan | A | March 1, 2025, 4:27 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 3 | 30 | 0 | ||
| 308436685 | iaknay | A | March 1, 2025, 3:38 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 3 | 30 | 0 | ||
| 308423087 | MinaMagdy1 | A | Feb. 28, 2025, 11:44 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 3 | 30 | 0 | ||
| 308417766 | rishz09 | A | Feb. 28, 2025, 10:02 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 3 | 30 | 0 | ||
| 308416196 | 3_B_S | A | Feb. 28, 2025, 9:40 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 3 | 30 | 0 | ||
| 308395222 | Unusuals | A | Feb. 28, 2025, 6:19 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 3 | 30 | 0 | ||
| 308393774 | Gadhiya_Dharm | A | Feb. 28, 2025, 6:08 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 3 | 30 | 0 | ||
| 308392371 | Asmaatomeh | A | Feb. 28, 2025, 5:58 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 3 | 30 | 0 | ||
| 308446589 | Putin_er_Abbu | A | March 1, 2025, 5:32 a.m. | OK | GNU C11 | TESTS | 3 | 31 | 0 | ||
| 308380315 | fuad_100 | A | Feb. 28, 2025, 4:40 p.m. | OK | GNU C11 | TESTS | 3 | 31 | 0 | ||
| 308389173 | Siddharth6969 | A | Feb. 28, 2025, 5:36 p.m. | OK | GNU C11 | TESTS | 3 | 46 | 0 | ||
| 308379810 | usususuus66 | A | Feb. 28, 2025, 4:39 p.m. | OK | GNU C11 | TESTS | 3 | 46 | 0 | ||
| 308409347 | star4code | A | Feb. 28, 2025, 8:25 p.m. | OK | GNU C11 | TESTS | 3 | 46 | 102400 | ||
| 308387577 | snkkkts | A | Feb. 28, 2025, 5:26 p.m. | OK | Go | TESTS | 3 | 46 | 0 | ||
| 308419365 | snippet8 | A | Feb. 28, 2025, 10:29 p.m. | OK | Java 21 | TESTS | 3 | 202 | 409600 | ||
| 308400155 | iamalizaidi | A | Feb. 28, 2025, 7:02 p.m. | OK | Java 21 | TESTS | 3 | 217 | 0 | ||
| 308387738 | sujal24092004 | A | Feb. 28, 2025, 5:27 p.m. | OK | Java 21 | TESTS | 3 | 217 | 614400 | ||
| 308394477 | PlayDate | A | Feb. 28, 2025, 6:14 p.m. | OK | Java 21 | TESTS | 3 | 218 | 614400 | ||
| 308441692 | ganaDEV | A | March 1, 2025, 4:42 a.m. | OK | Java 21 | TESTS | 3 | 218 | 1126400 | ||
| 308391663 | Sasece_8 | A | Feb. 28, 2025, 5:53 p.m. | OK | Java 21 | TESTS | 3 | 233 | 614400 | ||
| 308446368 | neutral_tech | A | March 1, 2025, 5:30 a.m. | OK | Java 21 | TESTS | 3 | 233 | 614400 | ||
| 308404712 | AlgoAce2004 | A | Feb. 28, 2025, 7:44 p.m. | OK | Java 21 | TESTS | 3 | 233 | 1024000 | ||
| 308379073 | kunalstacks | A | Feb. 28, 2025, 4:37 p.m. | OK | Java 21 | TESTS | 3 | 234 | 409600 | ||
| 308431115 | vuysztrcKJBHVIUVbkjbkhj | A | March 1, 2025, 2:28 a.m. | OK | Java 21 | TESTS | 3 | 234 | 819200 | ||
| 308382308 | paul.win | A | Feb. 28, 2025, 4:46 p.m. | OK | Java 8 | TESTS | 3 | 109 | 0 | ||
| 308427370 | kartik__sethi | A | March 1, 2025, 1:23 a.m. | OK | Java 8 | TESTS | 3 | 140 | 0 | ||
| 308376852 | Anupriya29 | A | Feb. 28, 2025, 4:31 p.m. | OK | Java 8 | TESTS | 3 | 155 | 0 | ||
| 308393762 | snehakanodia4 | A | Feb. 28, 2025, 6:08 p.m. | OK | Java 8 | TESTS | 3 | 155 | 38912000 | ||
| 308432784 | Purav_Shah07 | A | March 1, 2025, 2:50 a.m. | OK | Java 8 | TESTS | 3 | 156 | 0 | ||
| 308425491 | baixuejava | A | March 1, 2025, 12:43 a.m. | OK | Java 8 | TESTS | 3 | 156 | 0 | ||
| 308445568 | Um_nikO | A | March 1, 2025, 5:23 a.m. | OK | Java 8 | TESTS | 3 | 171 | 0 | ||
| 308390353 | JagdishEverest | A | Feb. 28, 2025, 5:44 p.m. | OK | Java 8 | TESTS | 3 | 171 | 0 | ||
| 308381631 | kirti019 | A | Feb. 28, 2025, 4:44 p.m. | OK | Java 8 | TESTS | 3 | 186 | 0 | ||
| 308441754 | jroy.karnati | A | March 1, 2025, 4:43 a.m. | OK | Java 8 | TESTS | 3 | 187 | 0 | ||
| 308428023 | arvindf232 | A | March 1, 2025, 1:37 a.m. | OK | Kotlin 1.9 | TESTS | 3 | 155 | 0 | ||
| 308404574 | Elimm | A | Feb. 28, 2025, 7:43 p.m. | OK | PyPy 2 | TESTS | 3 | 93 | 307200 | ||
| 308376732 | Master_Code_ | A | Feb. 28, 2025, 4:31 p.m. | OK | PyPy 3 | TESTS | 3 | 109 | 1433600 | ||
| 308400536 | zuba37 | A | Feb. 28, 2025, 7:06 p.m. | OK | PyPy 3 | TESTS | 3 | 124 | 2969600 | ||
| 308401961 | megahertz13 | A | Feb. 28, 2025, 7:18 p.m. | OK | PyPy 3 | TESTS | 3 | 139 | 2867200 | ||
| 308383530 | Spidey_Potter | A | Feb. 28, 2025, 4:48 p.m. | OK | PyPy 3 | TESTS | 3 | 140 | 2662400 | ||
| 308408884 | hundunlilun1 | A | Feb. 28, 2025, 8:21 p.m. | OK | PyPy 3 | TESTS | 3 | 140 | 2867200 | ||
| 308389680 | titan_ | A | Feb. 28, 2025, 5:39 p.m. | OK | PyPy 3 | TESTS | 3 | 140 | 2867200 | ||
| 308388893 | Phantom_702 | A | Feb. 28, 2025, 5:34 p.m. | OK | PyPy 3-64 | TESTS | 3 | 62 | 1433600 | ||
| 308391580 | gardengnome | A | Feb. 28, 2025, 5:52 p.m. | OK | PyPy 3-64 | TESTS | 3 | 77 | 0 | ||
| 308436385 | VSS203977_MSHAFAY | A | March 1, 2025, 3:34 a.m. | OK | PyPy 3-64 | TESTS | 3 | 77 | 1331200 | ||
| 308422128 | TerryYangUSA | A | Feb. 28, 2025, 11:23 p.m. | OK | PyPy 3-64 | TESTS | 3 | 77 | 1331200 | ||
| 308410363 | jvatsal0709 | A | Feb. 28, 2025, 8:35 p.m. | OK | PyPy 3-64 | TESTS | 3 | 77 | 1433600 | ||
| 308390390 | vishnuyash | A | Feb. 28, 2025, 5:44 p.m. | OK | PyPy 3-64 | TESTS | 3 | 77 | 1433600 | ||
| 308391034 | IRONOK | A | Feb. 28, 2025, 5:48 p.m. | OK | PyPy 3-64 | TESTS | 3 | 77 | 1536000 | ||
| 308407614 | FredBill | A | Feb. 28, 2025, 8:11 p.m. | OK | PyPy 3-64 | TESTS | 3 | 78 | 1331200 | ||
| 308414700 | pseudonam | A | Feb. 28, 2025, 9:21 p.m. | OK | PyPy 3-64 | TESTS | 3 | 78 | 1433600 | ||
| 308391921 | lokesh_7139 | A | Feb. 28, 2025, 5:55 p.m. | OK | PyPy 3-64 | TESTS | 3 | 78 | 1433600 | ||
| 308392151 | ag._. | A | Feb. 28, 2025, 5:56 p.m. | OK | Python 2 | TESTS | 3 | 62 | 0 | ||
| 308437336 | Tsigemariam | A | March 1, 2025, 3:46 a.m. | OK | Python 3 | TESTS | 3 | 46 | 0 | ||
| 308414201 | Haml1n | A | Feb. 28, 2025, 9:15 p.m. | OK | Python 3 | TESTS | 3 | 46 | 0 | ||
| 308376188 | d.belyakova.100666149 | A | Feb. 28, 2025, 4:29 p.m. | OK | Python 3 | TESTS | 3 | 46 | 0 | ||
| 308375057 | r-chesnokova-129774799 | A | Feb. 28, 2025, 4:26 p.m. | OK | Python 3 | TESTS | 3 | 46 | 0 | ||
| 308438078 | Hanyun | A | March 1, 2025, 3:55 a.m. | OK | Python 3 | TESTS | 3 | 61 | 0 | ||
| 308401168 | Ones_More | A | Feb. 28, 2025, 7:11 p.m. | OK | Python 3 | TESTS | 3 | 61 | 0 | ||
| 308396127 | fanatic_24 | A | Feb. 28, 2025, 6:26 p.m. | OK | Python 3 | TESTS | 3 | 61 | 0 | ||
| 308392578 | matheswaran322007 | A | Feb. 28, 2025, 5:59 p.m. | OK | Python 3 | TESTS | 3 | 61 | 0 | ||
| 308384055 | palanioffl | A | Feb. 28, 2025, 4:49 p.m. | OK | Python 3 | TESTS | 3 | 61 | 0 | ||
| 308382062 | Luong_Vu | A | Feb. 28, 2025, 4:45 p.m. | OK | Python 3 | TESTS | 3 | 61 | 0 |
Back to search problems