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 |
---|---|---|---|---|---|---|
1797 | Codeforces Round 864 (Div. 2) | FINISHED | False | 7200 | 56303663 | April 8, 2023, 2:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 16963 ) | B | Li Hua and Pattern | PROGRAMMING | constructive algorithms greedy |
B'Li Hua has a pattern of size n x n , each cell is either blue or red. He can perform exactly k operations. In each operation, he chooses a cell and changes its color from red to blue or from blue to red. Each cell can be chosen as many times as he wants. Is it possible to make the pattern, that matches its rotation by 180^{ circ} ? Suppose you were Li Hua, please solve this problem. The first line contains the single integer t ( 1 <= t <= 100 ) -- the number of test cases. The first line of each test case contains two integers n,k ( 1 <= n <= 10^3,0 <= k <= 10^9 ) -- the size of the pattern and the number of operations. Each of next n lines contains n integers a_{i,j} ( a_{i,j} in {0,1 } ) -- the initial color of the cell, 0 for blue and 1 for red. It 's guaranteed that sum of n over all test cases does not exceed 10^3 . For each set of input, print "YES" if it 's possible to make the pattern, that matches its rotation by 180^{ circ} after applying exactly k of operations, and "NO" 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 test case 1, you can 't perform any operation. The pattern after rotation is on the right. In test case 2, you can perform operations on (2,1),(3,2),(3,4) . The pattern after operations is in the middle and the pattern after rotation is on the right. '... |
Codeforces Round 864 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
201400276 | bluemegane | B | April 9, 2023, 12:31 a.m. | OK | C# 8 | TESTS | 16 | 139 | 4403200 | ||
201357482 | KalashShah | B | April 8, 2023, 5:14 p.m. | OK | Clang++17 Diagnostics | TESTS | 16 | 265 | 3993600 | ||
201351934 | Nobita_Nobi | B | April 8, 2023, 4:45 p.m. | OK | Clang++20 Diagnostics | TESTS | 16 | 717 | 9318400 | ||
201419116 | katomasao | B | April 9, 2023, 5:21 a.m. | OK | GNU C11 | TESTS | 16 | 124 | 1024000 | ||
201414554 | Bernoullitelsla | B | April 9, 2023, 4:25 a.m. | OK | GNU C11 | TESTS | 16 | 124 | 3993600 | ||
201388135 | brners | B | April 8, 2023, 9:14 p.m. | OK | GNU C11 | TESTS | 16 | 124 | 3993600 | ||
201369223 | c0derro | B | April 8, 2023, 6:38 p.m. | OK | GNU C11 | TESTS | 16 | 124 | 7987200 | ||
201361613 | Omega_3 | B | April 8, 2023, 5:40 p.m. | OK | GNU C11 | TESTS | 16 | 140 | 3993600 | ||
201352688 | jrsy | B | April 8, 2023, 4:48 p.m. | OK | GNU C11 | TESTS | 16 | 140 | 4096000 | ||
201354038 | astronom1cal | B | April 8, 2023, 4:55 p.m. | OK | GNU C11 | TESTS | 16 | 140 | 7987200 | ||
201355469 | deadshot1009 | B | April 8, 2023, 5:02 p.m. | OK | GNU C11 | TESTS | 16 | 140 | 7987200 | ||
201399247 | Tanllol | B | April 9, 2023, 12:09 a.m. | OK | GNU C++14 | TESTS | 16 | 46 | 34508800 | ||
201403185 | include_BM | B | April 9, 2023, 1:29 a.m. | OK | GNU C++14 | TESTS | 16 | 93 | 4096000 | ||
201410242 | Zzzyz | B | April 9, 2023, 3:21 a.m. | OK | GNU C++14 | TESTS | 16 | 109 | 4096000 | ||
201354743 | dipra5565 | B | April 8, 2023, 4:58 p.m. | OK | GNU C++14 | TESTS | 16 | 109 | 4300800 | ||
201400395 | m0rtery | B | April 9, 2023, 12:33 a.m. | OK | GNU C++14 | TESTS | 16 | 109 | 16179200 | ||
201358774 | OmarTammam | B | April 8, 2023, 5:21 p.m. | OK | GNU C++14 | TESTS | 16 | 124 | 4300800 | ||
201418706 | jatinxkirito | B | April 9, 2023, 5:17 a.m. | OK | GNU C++14 | TESTS | 16 | 124 | 4300800 | ||
201379441 | Java1 | B | April 8, 2023, 7:58 p.m. | OK | GNU C++14 | TESTS | 16 | 124 | 4300800 | ||
201371226 | omeganot | B | April 8, 2023, 6:55 p.m. | OK | GNU C++14 | TESTS | 16 | 124 | 4300800 | ||
201368074 | algoboi | B | April 8, 2023, 6:28 p.m. | OK | GNU C++14 | TESTS | 16 | 124 | 4300800 | ||
201352405 | rehamgalal | B | April 8, 2023, 4:47 p.m. | OK | GNU C++17 | TESTS | 16 | 31 | 1024000 | ||
201404819 | _Mamdouh_ | B | April 9, 2023, 1:56 a.m. | OK | GNU C++17 | TESTS | 16 | 31 | 1024000 | ||
201411601 | Monsterstar | B | April 9, 2023, 3:42 a.m. | OK | GNU C++17 | TESTS | 16 | 31 | 1024000 | ||
201372067 | osama_bq | B | April 8, 2023, 7:01 p.m. | OK | GNU C++17 | TESTS | 16 | 31 | 1126400 | ||
201368231 | Untrii | B | April 8, 2023, 6:30 p.m. | OK | GNU C++17 | TESTS | 16 | 31 | 1433600 | ||
201414600 | MarbIue | B | April 9, 2023, 4:26 a.m. | OK | GNU C++17 | TESTS | 16 | 31 | 5120000 | ||
201413007 | Gevin | B | April 9, 2023, 4:03 a.m. | OK | GNU C++17 | TESTS | 16 | 46 | 1024000 | ||
201405409 | GOURAB | B | April 9, 2023, 2:06 a.m. | OK | GNU C++17 | TESTS | 16 | 46 | 1024000 | ||
201366361 | Khushi_13 | B | April 8, 2023, 6:14 p.m. | OK | GNU C++17 | TESTS | 16 | 46 | 1024000 | ||
201410533 | JellyBoi | B | April 9, 2023, 3:27 a.m. | OK | GNU C++17 | TESTS | 16 | 46 | 1433600 | ||
201357272 | eiqkx | B | April 8, 2023, 5:12 p.m. | OK | GNU C++17 (64) | TESTS | 16 | 31 | 1126400 | ||
201397152 | Maram | B | April 8, 2023, 11:24 p.m. | OK | GNU C++17 (64) | TESTS | 16 | 31 | 25088000 | ||
201359303 | mobbb | B | April 8, 2023, 5:25 p.m. | OK | GNU C++17 (64) | TESTS | 16 | 46 | 200704000 | ||
201395914 | os-moussao | B | April 8, 2023, 11:01 p.m. | OK | GNU C++17 (64) | TESTS | 16 | 93 | 1024000 | ||
201397777 | wy_zycf | B | April 8, 2023, 11:37 p.m. | OK | GNU C++17 (64) | TESTS | 16 | 93 | 3993600 | ||
201404799 | Once_I_Liked_AGirl | B | April 9, 2023, 1:56 a.m. | OK | GNU C++17 (64) | TESTS | 16 | 93 | 4403200 | ||
201367228 | wisetree | B | April 8, 2023, 6:21 p.m. | OK | GNU C++17 (64) | TESTS | 16 | 93 | 4403200 | ||
201415965 | Sourav_Halder | B | April 9, 2023, 4:46 a.m. | OK | GNU C++17 (64) | TESTS | 16 | 93 | 7987200 | ||
201397005 | anasuss | B | April 8, 2023, 11:21 p.m. | OK | GNU C++17 (64) | TESTS | 16 | 93 | 16179200 | ||
201355909 | eiqkx | B | April 8, 2023, 5:04 p.m. | OK | GNU C++17 (64) | TESTS | 16 | 108 | 1024000 | ||
201363485 | opop1omar | B | April 8, 2023, 5:53 p.m. | OK | GNU C++20 (64) | TESTS | 16 | 15 | 1024000 | ||
201377642 | Esraa_Syam15 | B | April 8, 2023, 7:43 p.m. | OK | GNU C++20 (64) | TESTS | 16 | 15 | 1126400 | ||
201354739 | ninjaa_03 | B | April 8, 2023, 4:58 p.m. | OK | GNU C++20 (64) | TESTS | 16 | 30 | 1024000 | ||
201361496 | BEN_10_y | B | April 8, 2023, 5:39 p.m. | OK | GNU C++20 (64) | TESTS | 16 | 31 | 1024000 | ||
201420054 | Void.exe | B | April 9, 2023, 5:31 a.m. | OK | GNU C++20 (64) | TESTS | 16 | 31 | 1024000 | ||
201380144 | yousef_mojo35 | B | April 8, 2023, 8:04 p.m. | OK | GNU C++20 (64) | TESTS | 16 | 31 | 1024000 | ||
201357239 | Galal012 | B | April 8, 2023, 5:12 p.m. | OK | GNU C++20 (64) | TESTS | 16 | 31 | 1024000 | ||
201362769 | opop1omar | B | April 8, 2023, 5:48 p.m. | OK | GNU C++20 (64) | TESTS | 16 | 31 | 1024000 | ||
201367175 | CrazyCoder00 | B | April 8, 2023, 6:21 p.m. | OK | GNU C++20 (64) | TESTS | 16 | 31 | 1024000 | ||
201378195 | Esraa_Syam15 | B | April 8, 2023, 7:48 p.m. | OK | GNU C++20 (64) | TESTS | 16 | 31 | 1126400 | ||
201405878 | manchik | B | April 9, 2023, 2:13 a.m. | OK | Go | TESTS | 16 | 234 | 8908800 | ||
201405839 | manchik | B | April 9, 2023, 2:12 a.m. | OK | Go | TESTS | 16 | 249 | 8908800 | ||
201355358 | davi0015 | B | April 8, 2023, 5:01 p.m. | OK | Go | TESTS | 16 | 249 | 8908800 | ||
201399975 | harsh.awasthi | B | April 9, 2023, 12:25 a.m. | OK | Go | TESTS | 16 | 280 | 17408000 | ||
201417025 | katomasao | B | April 9, 2023, 4:59 a.m. | OK | Haskell | TESTS | 16 | 468 | 105062400 | ||
201362096 | BabyBlue0514 | B | April 8, 2023, 5:43 p.m. | OK | Java 11 | TESTS | 16 | 187 | 0 | ||
201378455 | cpcdevar | B | April 8, 2023, 7:50 p.m. | OK | Java 11 | TESTS | 16 | 233 | 0 | ||
201372750 | Pranav_Sharda | B | April 8, 2023, 7:07 p.m. | OK | Java 11 | TESTS | 16 | 233 | 0 | ||
201364982 | creativegiant | B | April 8, 2023, 6:04 p.m. | OK | Java 11 | TESTS | 16 | 233 | 6041600 | ||
201373197 | codingIsFun1234 | B | April 8, 2023, 7:10 p.m. | OK | Java 11 | TESTS | 16 | 248 | 0 | ||
201366169 | SAY_NO_TO_EDITORIAL | B | April 8, 2023, 6:13 p.m. | OK | Java 11 | TESTS | 16 | 249 | 0 | ||
201359595 | Ramez__ | B | April 8, 2023, 5:27 p.m. | OK | Java 11 | TESTS | 16 | 249 | 6041600 | ||
201423357 | enuguru_2002 | B | April 9, 2023, 6:03 a.m. | OK | Java 11 | TESTS | 16 | 280 | 18022400 | ||
201377033 | Ayyylmao | B | April 8, 2023, 7:38 p.m. | OK | Java 11 | TESTS | 16 | 327 | 921600 | ||
201402918 | q2045891621. | B | April 9, 2023, 1:24 a.m. | OK | Java 11 | TESTS | 16 | 873 | 0 | ||
201416528 | lpk15014 | B | April 9, 2023, 4:53 a.m. | OK | Java 17 | TESTS | 16 | 187 | 819200 | ||
201397476 | UlaanBatat | B | April 8, 2023, 11:31 p.m. | OK | Java 17 | TESTS | 16 | 218 | 512000 | ||
201382313 | coffeeCoder69 | B | April 8, 2023, 8:23 p.m. | OK | Java 17 | TESTS | 16 | 264 | 204800 | ||
201366627 | aishwarykesarwani | B | April 8, 2023, 6:16 p.m. | OK | Java 17 | TESTS | 16 | 264 | 307200 | ||
201373777 | frzcodes12 | B | April 8, 2023, 7:14 p.m. | OK | Java 17 | TESTS | 16 | 265 | 512000 | ||
201363469 | TCchen | B | April 8, 2023, 5:53 p.m. | OK | Java 17 | TESTS | 16 | 280 | 409600 | ||
201352578 | Nagendravarma | B | April 8, 2023, 4:48 p.m. | OK | Java 17 | TESTS | 16 | 280 | 7372800 | ||
201378829 | synasc | B | April 8, 2023, 7:53 p.m. | OK | Java 17 | TESTS | 16 | 296 | 307200 | ||
201402718 | cnlonces | B | April 9, 2023, 1:20 a.m. | OK | Java 17 | TESTS | 16 | 296 | 512000 | ||
201406991 | CCS_Covenant | B | April 9, 2023, 2:31 a.m. | OK | Java 17 | TESTS | 16 | 296 | 819200 | ||
201414757 | uju | B | April 9, 2023, 4:28 a.m. | OK | Java 8 | TESTS | 16 | 155 | 0 | ||
201394063 | OmarRoka29 | B | April 8, 2023, 10:28 p.m. | OK | Java 8 | TESTS | 16 | 155 | 0 | ||
201392565 | OmarRoka29 | B | April 8, 2023, 10:04 p.m. | OK | Java 8 | TESTS | 16 | 155 | 0 | ||
201368451 | muhandae | B | April 8, 2023, 6:32 p.m. | OK | Java 8 | TESTS | 16 | 155 | 0 | ||
201369100 | 3laaHisham | B | April 8, 2023, 6:37 p.m. | OK | Java 8 | TESTS | 16 | 156 | 0 | ||
201369261 | 3laaHisham | B | April 8, 2023, 6:38 p.m. | OK | Java 8 | TESTS | 16 | 171 | 0 | ||
201363156 | mohamedhassan_c | B | April 8, 2023, 5:50 p.m. | OK | Java 8 | TESTS | 16 | 171 | 19558400 | ||
201353559 | depurador_ik | B | April 8, 2023, 4:52 p.m. | OK | Java 8 | TESTS | 16 | 202 | 38092800 | ||
201386743 | nishikar | B | April 8, 2023, 9 p.m. | OK | Java 8 | TESTS | 16 | 779 | 0 | ||
201419251 | haohaoDong | B | April 9, 2023, 5:23 a.m. | OK | Java 8 | TESTS | 16 | 795 | 0 | ||
201410881 | Qie_Zi | B | April 9, 2023, 3:31 a.m. | OK | MS C++ 2017 | TESTS | 16 | 202 | 4096000 | ||
201381773 | nawalhaidar | B | April 8, 2023, 8:18 p.m. | OK | MS C++ 2017 | TESTS | 16 | 530 | 1024000 | ||
201396785 | shorya1835 | B | April 8, 2023, 11:17 p.m. | OK | MS C++ 2017 | TESTS | 16 | 546 | 204800 | ||
201409149 | ishybee | B | April 9, 2023, 3:05 a.m. | OK | MS C++ 2017 | TESTS | 16 | 546 | 8089600 | ||
201420676 | appease | B | April 9, 2023, 5:37 a.m. | OK | MS C++ 2017 | TESTS | 16 | 561 | 4096000 | ||
201412415 | KeFu | B | April 9, 2023, 3:54 a.m. | OK | MS C++ 2017 | TESTS | 16 | 561 | 8601600 | ||
201357458 | adesh123 | B | April 8, 2023, 5:13 p.m. | OK | MS C++ 2017 | TESTS | 16 | 577 | 4403200 | ||
201367322 | rajeshpenugonda | B | April 8, 2023, 6:22 p.m. | OK | PyPy 3 | TESTS | 16 | 218 | 13312000 | ||
201352275 | brokie | B | April 8, 2023, 4:47 p.m. | OK | PyPy 3 | TESTS | 16 | 264 | 16179200 | ||
201370924 | LazyRGuy | B | April 8, 2023, 6:52 p.m. | OK | PyPy 3 | TESTS | 16 | 296 | 10752000 | ||
201412579 | oooommmm | B | April 9, 2023, 3:57 a.m. | OK | PyPy 3 | TESTS | 16 | 327 | 10752000 | ||
201385091 | man_in_errors | B | April 8, 2023, 8:46 p.m. | OK | PyPy 3 | TESTS | 16 | 327 | 25292800 | ||
201357836 | jvatsal0709 | B | April 8, 2023, 5:16 p.m. | OK | PyPy 3 | TESTS | 16 | 342 | 10649600 | ||
201384629 | man_in_errors | B | April 8, 2023, 8:42 p.m. | OK | PyPy 3 | TESTS | 16 | 342 | 25292800 | ||
201383819 | man_in_errors | B | April 8, 2023, 8:37 p.m. | OK | PyPy 3 | TESTS | 16 | 358 | 25292800 | ||
201390486 | simonnarang | B | April 8, 2023, 9:39 p.m. | OK | PyPy 3 | TESTS | 16 | 373 | 10649600 | ||
201385346 | man_in_errors | B | April 8, 2023, 8:48 p.m. | OK | PyPy 3 | TESTS | 16 | 374 | 25292800 | ||
201375475 | rmr | B | April 8, 2023, 7:26 p.m. | OK | PyPy 3-64 | TESTS | 16 | 109 | 13721600 | ||
201362379 | rmr | B | April 8, 2023, 5:45 p.m. | OK | PyPy 3-64 | TESTS | 16 | 109 | 13721600 | ||
201413638 | Youarenotgood | B | April 9, 2023, 4:12 a.m. | OK | PyPy 3-64 | TESTS | 16 | 109 | 15257600 | ||
201358784 | _icy_ | B | April 8, 2023, 5:21 p.m. | OK | PyPy 3-64 | TESTS | 16 | 124 | 13516800 | ||
201364011 | AAE | B | April 8, 2023, 5:56 p.m. | OK | PyPy 3-64 | TESTS | 16 | 124 | 14028800 | ||
201365099 | gardengnome | B | April 8, 2023, 6:04 p.m. | OK | PyPy 3-64 | TESTS | 16 | 124 | 14643200 | ||
201353016 | SophieHatter | B | April 8, 2023, 4:50 p.m. | OK | PyPy 3-64 | TESTS | 16 | 124 | 16998400 | ||
201354270 | AdityaRamanathan | B | April 8, 2023, 4:56 p.m. | OK | PyPy 3-64 | TESTS | 16 | 139 | 14131200 | ||
201370726 | AS23 | B | April 8, 2023, 6:50 p.m. | OK | PyPy 3-64 | TESTS | 16 | 139 | 14233600 | ||
201364319 | aayush_chhabra | B | April 8, 2023, 5:58 p.m. | OK | PyPy 3-64 | TESTS | 16 | 139 | 14848000 | ||
201361099 | bigdamdam | B | April 8, 2023, 5:36 p.m. | OK | Python 3 | TESTS | 16 | 202 | 5836800 | ||
201400520 | YuhanXia | B | April 9, 2023, 12:36 a.m. | OK | Python 3 | TESTS | 16 | 233 | 20480000 | ||
201355068 | shambhavi_anant | B | April 8, 2023, 5 p.m. | OK | Python 3 | TESTS | 16 | 420 | 5836800 | ||
201408418 | biswasbikram | B | April 9, 2023, 2:54 a.m. | OK | Python 3 | TESTS | 16 | 436 | 5836800 | ||
201361278 | Jocca | B | April 8, 2023, 5:38 p.m. | OK | Python 3 | TESTS | 16 | 436 | 10956800 | ||
201416137 | momenelmesady4803 | B | April 9, 2023, 4:48 a.m. | OK | Python 3 | TESTS | 16 | 467 | 5836800 | ||
201416014 | Komali0214 | B | April 9, 2023, 4:47 a.m. | OK | Python 3 | TESTS | 16 | 498 | 10035200 | ||
201405281 | rushmitha0808 | B | April 9, 2023, 2:03 a.m. | OK | Python 3 | TESTS | 16 | 498 | 10035200 | ||
201402788 | eugalt | B | April 9, 2023, 1:21 a.m. | OK | Python 3 | TESTS | 16 | 499 | 5836800 | ||
201351928 | Akiyama-Mizuki | B | April 8, 2023, 4:45 p.m. | OK | Python 3 | TESTS | 16 | 514 | 5836800 | ||
201400100 | ilyshana | B | April 9, 2023, 12:27 a.m. | OK | Rust 2021 | TESTS | 16 | 31 | 1126400 | ||
201408387 | manchik | B | April 9, 2023, 2:53 a.m. | OK | Rust 2021 | TESTS | 16 | 31 | 4608000 | ||
201385364 | liut | B | April 8, 2023, 8:48 p.m. | OK | Rust 2021 | TESTS | 16 | 62 | 1126400 |
Back to search problems