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 |
|---|---|---|---|---|---|---|
| 2109 | Codeforces Round 1025 (Div. 2) | FINISHED | False | 8100 | 28913123 | May 17, 2025, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 26864 ) | A | It's Time To Duel | PROGRAMMING | implementation |
Something you may not know about Mouf is that he is a big fan of the Yu-Gi-Oh! card game. He loves to duel with anyone he meets. To gather all fans who love to play as well, he decided to organize a big Yu-Gi-Oh! tournament and invited (n) players. Mouf arranged the (n) players in a line, numbered from (1) to (n). They then held (n - 1) consecutive duels: for each (i) from (1) to (n - 1), player (i) faced player (i + 1), producing one winner and one loser per match. Afterward, each player reports a value (a_i(0 \le a_i \le 1)): (0) indicating they won no duels; (1) indicating they won at least one duel. Since some may lie about their results (e.g., reporting a (1) instead of a (0), or vice versa) to influence prize outcomes, Mouf will cancel the tournament if he can prove any report to be false. Given the array (a), determine whether at least one player must be lying. Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 100)). The description of the test cases follows. The first line of each test case contains one integer (n) ((2 \le n \le 100)) — the number of players in the tournament. The second line of each test case contains (n) integers (a_1, a_2, \ldots, a_n) ((0 \le a_i \le 1)) — denoting the report of the (i)-th player. For each test case, print "YES" (without quotes) if there is at least one liar among the players, 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, it is consistent if player (2) defeats both players (1) and (3), so nobody's report is necessarily false. In the second test case, in the only match between players (1) and (2), one must win — but both claimed zero wins, so someone must be lying. In the t |
| Codeforces Round 1025 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 320150050 | IRacle | A | May 17, 2025, 7:38 p.m. | OK | C# 10 | TESTS | 4 | 108 | 0 | ||
| 320170673 | _shivam__chaudhary | A | May 18, 2025, 3:02 a.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 30 | 0 | ||
| 320167183 | ththanhbui | A | May 18, 2025, 2:05 a.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 30 | 0 | ||
| 320162525 | flamengonaoehtimenao | A | May 17, 2025, 11:57 p.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 30 | 0 | ||
| 320156341 | limabeans | A | May 17, 2025, 9:08 p.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 30 | 0 | ||
| 320150762 | intzeta | A | May 17, 2025, 7:47 p.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 30 | 0 | ||
| 320161825 | LucasAlgorithms | A | May 17, 2025, 11:33 p.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 30 | 102400 | ||
| 320141371 | senpaikj_06 | A | May 17, 2025, 6:20 p.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 30 | 102400 | ||
| 320181333 | Maniprakash_1043 | A | May 18, 2025, 4:52 a.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 31 | 0 | ||
| 320178412 | Jison_Chakma | A | May 18, 2025, 4:09 a.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 31 | 0 | ||
| 320172629 | verma_ashwin7 | A | May 18, 2025, 3:33 a.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 31 | 0 | ||
| 320188146 | NGUYENPHUHAI | A | May 18, 2025, 6:03 a.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 30 | 102400 | ||
| 320151690 | zyadhany | A | May 17, 2025, 7:59 p.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 30 | 102400 | ||
| 320185193 | suryansh22s | A | May 18, 2025, 5:35 a.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 31 | 0 | ||
| 320182892 | SerenityPeak | A | May 18, 2025, 5:10 a.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 31 | 0 | ||
| 320182756 | golam_kibriya_fahim | A | May 18, 2025, 5:09 a.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 31 | 0 | ||
| 320182680 | S.Rohan21 | A | May 18, 2025, 5:08 a.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 31 | 0 | ||
| 320179527 | satyajitsingh147 | A | May 18, 2025, 4:27 a.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 31 | 0 | ||
| 320173030 | mmdrzada | A | May 18, 2025, 3:38 a.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 31 | 0 | ||
| 320171117 | sankhasubhramandal10 | A | May 18, 2025, 3:09 a.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 31 | 0 | ||
| 320170770 | tomatooooo | A | May 18, 2025, 3:04 a.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 31 | 0 | ||
| 320188218 | PTS_codes | A | May 18, 2025, 6:03 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 4 | 30 | 0 | ||
| 320185252 | Kremlin_Showers | A | May 18, 2025, 5:36 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 4 | 30 | 0 | ||
| 320181471 | SSSuzuRan | A | May 18, 2025, 4:53 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 4 | 30 | 0 | ||
| 320173610 | M_L_K | A | May 18, 2025, 3:46 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 4 | 30 | 0 | ||
| 320169717 | msp_008987 | A | May 18, 2025, 2:48 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 4 | 30 | 0 | ||
| 320169437 | Zareen_Tasnim_Refah | A | May 18, 2025, 2:43 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 4 | 30 | 0 | ||
| 320167616 | Hirasawaa | A | May 18, 2025, 2:13 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 4 | 30 | 0 | ||
| 320164565 | lishanshuo | A | May 18, 2025, 1:06 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 4 | 30 | 0 | ||
| 320159157 | RED1_. | A | May 17, 2025, 10:10 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 4 | 30 | 0 | ||
| 320158529 | Quitting... | A | May 17, 2025, 9:53 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 4 | 30 | 0 | ||
| 320188096 | Coder_404. | A | May 18, 2025, 6:03 a.m. | OK | GNU C11 | TESTS | 4 | 30 | 0 | ||
| 320187936 | Loser_Monster. | A | May 18, 2025, 6:01 a.m. | OK | GNU C11 | TESTS | 4 | 30 | 0 | ||
| 320150185 | poitmrinmoy001 | A | May 17, 2025, 7:40 p.m. | OK | GNU C11 | TESTS | 4 | 31 | 0 | ||
| 320129929 | Kamrulhasan12345 | A | May 17, 2025, 4:43 p.m. | OK | GNU C11 | TESTS | 4 | 31 | 0 | ||
| 320186230 | Bharadwaj06 | A | May 18, 2025, 5:45 a.m. | OK | GNU C11 | TESTS | 4 | 31 | 102400 | ||
| 320165572 | OFH | A | May 18, 2025, 1:30 a.m. | OK | GNU C11 | TESTS | 4 | 31 | 102400 | ||
| 320147133 | jaintlemann | A | May 17, 2025, 7:06 p.m. | OK | GNU C11 | TESTS | 4 | 31 | 102400 | ||
| 320146358 | samarathay123 | A | May 17, 2025, 6:58 p.m. | OK | GNU C11 | TESTS | 4 | 31 | 102400 | ||
| 320140141 | zerofuku | A | May 17, 2025, 6:14 p.m. | OK | GNU C11 | TESTS | 4 | 31 | 102400 | ||
| 320187384 | Loser_Monster. | A | May 18, 2025, 5:56 a.m. | OK | GNU C11 | TESTS | 4 | 46 | 0 | ||
| 320166405 | rasjadddd | A | May 18, 2025, 1:49 a.m. | OK | Java 21 | TESTS | 4 | 186 | 409600 | ||
| 320147663 | Sage_Eklavya | A | May 17, 2025, 7:12 p.m. | OK | Java 21 | TESTS | 4 | 218 | 0 | ||
| 320160260 | bomakhamchha | A | May 17, 2025, 10:43 p.m. | OK | Java 21 | TESTS | 4 | 218 | 307200 | ||
| 320180207 | tomcat11 | A | May 18, 2025, 4:37 a.m. | OK | Java 21 | TESTS | 4 | 218 | 1740800 | ||
| 320179077 | Ronit.D | A | May 18, 2025, 4:20 a.m. | OK | Java 21 | TESTS | 4 | 218 | 2048000 | ||
| 320146504 | techyStriver24 | A | May 17, 2025, 7 p.m. | OK | Java 21 | TESTS | 4 | 218 | 2048000 | ||
| 320148117 | tekka_ity | A | May 17, 2025, 7:17 p.m. | OK | Java 21 | TESTS | 4 | 233 | 0 | ||
| 320139689 | krishna_Singh25 | A | May 17, 2025, 6:12 p.m. | OK | Java 21 | TESTS | 4 | 233 | 0 | ||
| 320129597 | Ronit0211 | A | May 17, 2025, 4:42 p.m. | OK | Java 21 | TESTS | 4 | 233 | 102400 | ||
| 320142549 | dhaniya_patti | A | May 17, 2025, 6:27 p.m. | OK | Java 21 | TESTS | 4 | 249 | 819200 | ||
| 320172741 | sourav2999 | A | May 18, 2025, 3:34 a.m. | OK | Java 8 | TESTS | 4 | 124 | 0 | ||
| 320170500 | hytebss | A | May 18, 2025, 3 a.m. | OK | Java 8 | TESTS | 4 | 124 | 0 | ||
| 320157827 | vootkuriakshayreddy | A | May 17, 2025, 9:37 p.m. | OK | Java 8 | TESTS | 4 | 140 | 0 | ||
| 320150419 | ansariwajid | A | May 17, 2025, 7:43 p.m. | OK | Java 8 | TESTS | 4 | 140 | 0 | ||
| 320140771 | MightySun | A | May 17, 2025, 6:16 p.m. | OK | Java 8 | TESTS | 4 | 140 | 0 | ||
| 320152631 | sanikadesh | A | May 17, 2025, 8:11 p.m. | OK | Java 8 | TESTS | 4 | 155 | 0 | ||
| 320171516 | kartikdhande772 | A | May 18, 2025, 3:16 a.m. | OK | Java 8 | TESTS | 4 | 156 | 0 | ||
| 320167941 | not_mohith | A | May 18, 2025, 2:20 a.m. | OK | Java 8 | TESTS | 4 | 171 | 0 | ||
| 320132586 | suhu | A | May 17, 2025, 4:47 p.m. | OK | Java 8 | TESTS | 4 | 171 | 0 | ||
| 320144876 | priyanshu3003 | A | May 17, 2025, 6:45 p.m. | OK | Java 8 | TESTS | 4 | 249 | 0 | ||
| 320156650 | dr0bi | A | May 17, 2025, 9:14 p.m. | OK | Node.js | TESTS | 4 | 108 | 0 | ||
| 320156777 | dr0bi | A | May 17, 2025, 9:17 p.m. | OK | Node.js | TESTS | 4 | 186 | 9113600 | ||
| 320156689 | dr0bi | A | May 17, 2025, 9:15 p.m. | OK | Node.js | TESTS | 4 | 187 | 9216000 | ||
| 320156745 | dr0bi | A | May 17, 2025, 9:16 p.m. | OK | Node.js | TESTS | 4 | 202 | 9216000 | ||
| 320147589 | npnainav | A | May 17, 2025, 7:11 p.m. | OK | PHP | TESTS | 4 | 93 | 204800 | ||
| 320165352 | zainijunaid8228 | A | May 18, 2025, 1:25 a.m. | OK | PyPy 3 | TESTS | 4 | 93 | 1638400 | ||
| 320141880 | Bhavya_24 | A | May 17, 2025, 6:22 p.m. | OK | PyPy 3 | TESTS | 4 | 93 | 1740800 | ||
| 320151260 | grecil | A | May 17, 2025, 7:53 p.m. | OK | PyPy 3-64 | TESTS | 4 | 77 | 204800 | ||
| 320145267 | petin_petya | A | May 17, 2025, 6:48 p.m. | OK | PyPy 3-64 | TESTS | 4 | 77 | 204800 | ||
| 320188246 | m.hasnain | A | May 18, 2025, 6:04 a.m. | OK | PyPy 3-64 | TESTS | 4 | 77 | 1433600 | ||
| 320188111 | donghedd | A | May 18, 2025, 6:03 a.m. | OK | PyPy 3-64 | TESTS | 4 | 77 | 1433600 | ||
| 320169311 | EmeraldBeast | A | May 18, 2025, 2:41 a.m. | OK | PyPy 3-64 | TESTS | 4 | 77 | 1433600 | ||
| 320163650 | gigabuffoon | A | May 18, 2025, 12:38 a.m. | OK | PyPy 3-64 | TESTS | 4 | 77 | 1433600 | ||
| 320150449 | andruha2604 | A | May 17, 2025, 7:43 p.m. | OK | PyPy 3-64 | TESTS | 4 | 77 | 1433600 | ||
| 320144434 | anti_19 | A | May 17, 2025, 6:41 p.m. | OK | PyPy 3-64 | TESTS | 4 | 77 | 1433600 | ||
| 320182784 | jokeeee | A | May 18, 2025, 5:09 a.m. | OK | PyPy 3-64 | TESTS | 4 | 77 | 1536000 | ||
| 320182761 | taowdy | A | May 18, 2025, 5:09 a.m. | OK | PyPy 3-64 | TESTS | 4 | 77 | 1536000 | ||
| 320178247 | biltharesatyendra | A | May 18, 2025, 4:07 a.m. | OK | Python 2 | TESTS | 4 | 62 | 0 | ||
| 320128909 | khanghaicode | A | May 17, 2025, 4:41 p.m. | OK | Python 2 | TESTS | 4 | 77 | 0 | ||
| 320166917 | pundruvarshith17 | A | May 18, 2025, 2 a.m. | OK | Python 3 | TESTS | 4 | 46 | 204800 | ||
| 320166759 | pundruchidvilash2000 | A | May 18, 2025, 1:56 a.m. | OK | Python 3 | TESTS | 4 | 46 | 204800 | ||
| 320164837 | MckyonWee | A | May 18, 2025, 1:14 a.m. | OK | Python 3 | TESTS | 4 | 61 | 0 | ||
| 320181533 | prashant24816gp | A | May 18, 2025, 4:54 a.m. | OK | Python 3 | TESTS | 4 | 61 | 204800 | ||
| 320164348 | eugalt | A | May 18, 2025, 1:01 a.m. | OK | Python 3 | TESTS | 4 | 61 | 204800 | ||
| 320164219 | tusharmyself06 | A | May 18, 2025, 12:57 a.m. | OK | Python 3 | TESTS | 4 | 61 | 204800 | ||
| 320156861 | Rifat_Hasan | A | May 17, 2025, 9:19 p.m. | OK | Python 3 | TESTS | 4 | 61 | 204800 | ||
| 320168026 | Cipher_In_ | A | May 18, 2025, 2:21 a.m. | OK | Python 3 | TESTS | 4 | 62 | 0 | ||
| 320182857 | guptaji_007 | A | May 18, 2025, 5:10 a.m. | OK | Python 3 | TESTS | 4 | 62 | 102400 | ||
| 320184828 | _Red_54 | A | May 18, 2025, 5:31 a.m. | OK | Python 3 | TESTS | 4 | 62 | 204800 | ||
| 320172014 | ynzoqn | A | May 18, 2025, 3:23 a.m. | OK | Rust 2021 | TESTS | 4 | 46 | 0 | ||
| 320170742 | ynzoqn | A | May 18, 2025, 3:03 a.m. | OK | Rust 2021 | TESTS | 4 | 46 | 0 | ||
| 320140079 | 0x81 | A | May 17, 2025, 6:13 p.m. | OK | Rust 2021 | TESTS | 4 | 46 | 0 |
Back to search problems