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 |
---|---|---|---|---|---|---|
1534 | Codeforces LATOKEN Round 1 (Div. 1 + Div. 2) | FINISHED | False | 10800 | 108224699 | June 13, 2021, 3:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 12771 ) | A | Colour the Flag | PROGRAMMING | brute force implementation |
B'Today we will be playing a red and white colouring game (no, this is not the Russian Civil War; these are just the colours of the Canadian flag). You are given an n x m grid of "R", "W", and "." characters. "R" is red, "W" is white and "." is blank. The neighbours of a cell are those that share an edge with it (those that only share a corner do not count). Your job is to colour the blank cells red or white so that every red cell only has white neighbours (and no red ones) and every white cell only has red neighbours (and no white ones). You are not allowed to recolour already coloured cells. The first line contains t ( 1 <= t <= 100 ), the number of test cases. In each test case, the first line will contain n ( 1 <= n <= 50 ) and m ( 1 <= m <= 50 ), the height and width of the grid respectively. The next n lines will contain the grid. Each character of the grid is either 'R ', 'W ', or '. '. For each test case, output "YES" if there is a valid grid or "NO" if there is not. If there is, output the grid on the next n lines. If there are multiple answers, print any. In the output, the "YES"s and "NO"s are case-insensitive, meaning that outputs such as "yEs" and "nO" are valid. However, the grid is case-sensitive. The answer for the first example case is given in the example output, and it can be proven that no grid exists that satisfies the requirements of the second example case. In the third example all cells are initially coloured, and the colouring is valid. '... |
Codeforces LATOKEN Round 1 (Div. 1 + Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
119408863 | cutx64 | A | June 14, 2021, 1:12 a.m. | OK | D | TESTS | 13 | 31 | 1945600 | ||
119397275 | iquoteonyou | A | June 13, 2021, 6:34 p.m. | OK | GNU C11 | TESTS | 13 | 811 | 0 | ||
119400964 | Newpson | A | June 13, 2021, 8:02 p.m. | OK | GNU C11 | TESTS | 13 | 826 | 0 | ||
119404005 | 20bcs030 | A | June 13, 2021, 9:10 p.m. | OK | GNU C11 | TESTS | 13 | 841 | 0 | ||
119388035 | srinjoy_12 | A | June 13, 2021, 6 p.m. | OK | GNU C11 | TESTS | 13 | 842 | 0 | ||
119418538 | Erd0s | A | June 14, 2021, 5 a.m. | OK | GNU C11 | TESTS | 13 | 857 | 0 | ||
119417501 | kunjan_gokani | A | June 14, 2021, 4:41 a.m. | OK | GNU C11 | TESTS | 13 | 858 | 0 | ||
119410855 | sumanthbittu | A | June 14, 2021, 2:19 a.m. | OK | GNU C11 | TESTS | 13 | 858 | 0 | ||
119389915 | Aditya_871 | A | June 13, 2021, 6:08 p.m. | OK | GNU C11 | TESTS | 13 | 873 | 102400 | ||
119409451 | zhoumofei | A | June 14, 2021, 1:36 a.m. | OK | GNU C++11 | TESTS | 13 | 15 | 0 | ||
119407782 | zhangjunyan2580 | A | June 14, 2021, 12:15 a.m. | OK | GNU C++11 | TESTS | 13 | 15 | 0 | ||
119407829 | Werner_Yin | A | June 14, 2021, 12:18 a.m. | OK | GNU C++11 | TESTS | 13 | 15 | 0 | ||
119409009 | Huah | A | June 14, 2021, 1:20 a.m. | OK | GNU C++11 | TESTS | 13 | 15 | 0 | ||
119416707 | xwp | A | June 14, 2021, 4:26 a.m. | OK | GNU C++11 | TESTS | 13 | 15 | 6656000 | ||
119388727 | BL_HLD | A | June 13, 2021, 6:03 p.m. | OK | GNU C++11 | TESTS | 13 | 30 | 0 | ||
119409018 | Huah | A | June 14, 2021, 1:20 a.m. | OK | GNU C++11 | TESTS | 13 | 30 | 0 | ||
119421092 | KING_OF_TURTLE | A | June 14, 2021, 5:40 a.m. | OK | GNU C++11 | TESTS | 13 | 30 | 0 | ||
119415134 | Lucky_Yukikaze | A | June 14, 2021, 3:56 a.m. | OK | GNU C++11 | TESTS | 13 | 30 | 0 | ||
119422243 | HHHEN | A | June 14, 2021, 5:56 a.m. | OK | GNU C++11 | TESTS | 13 | 31 | 0 | ||
119400039 | Ani222001 | A | June 13, 2021, 7:53 p.m. | OK | GNU C++14 | TESTS | 13 | 15 | 204800 | ||
119414381 | sai_deepchand | A | June 14, 2021, 3:41 a.m. | OK | GNU C++14 | TESTS | 13 | 15 | 204800 | ||
119414563 | shikhaa | A | June 14, 2021, 3:45 a.m. | OK | GNU C++14 | TESTS | 13 | 30 | 0 | ||
119400273 | laksh02balani | A | June 13, 2021, 7:55 p.m. | OK | GNU C++14 | TESTS | 13 | 30 | 0 | ||
119418259 | fancktol | A | June 14, 2021, 4:55 a.m. | OK | GNU C++14 | TESTS | 13 | 30 | 0 | ||
119401419 | divyanshushuklazz10 | A | June 13, 2021, 8:09 p.m. | OK | GNU C++14 | TESTS | 13 | 30 | 0 | ||
119420371 | __Broly__ | A | June 14, 2021, 5:30 a.m. | OK | GNU C++14 | TESTS | 13 | 30 | 204800 | ||
119403382 | rebel_roar | A | June 13, 2021, 8:54 p.m. | OK | GNU C++14 | TESTS | 13 | 30 | 204800 | ||
119386494 | llggcccc | A | June 13, 2021, 5:53 p.m. | OK | GNU C++14 | TESTS | 13 | 30 | 204800 | ||
119414740 | ianujvarshney | A | June 14, 2021, 3:49 a.m. | OK | GNU C++14 | TESTS | 13 | 30 | 204800 | ||
119411083 | _Ziad_Waleed | A | June 14, 2021, 2:26 a.m. | OK | GNU C++17 | TESTS | 13 | 15 | 0 | ||
119411176 | aticus | A | June 14, 2021, 2:29 a.m. | OK | GNU C++17 | TESTS | 13 | 15 | 0 | ||
119407044 | Ahmed_Allawati | A | June 13, 2021, 11:25 p.m. | OK | GNU C++17 | TESTS | 13 | 15 | 0 | ||
119421244 | vineet4571 | A | June 14, 2021, 5:42 a.m. | OK | GNU C++17 | TESTS | 13 | 15 | 204800 | ||
119421360 | is_this_F | A | June 14, 2021, 5:44 a.m. | OK | GNU C++17 | TESTS | 13 | 15 | 204800 | ||
119420389 | dinskid | A | June 14, 2021, 5:30 a.m. | OK | GNU C++17 | TESTS | 13 | 15 | 204800 | ||
119418677 | Deep_20 | A | June 14, 2021, 5:02 a.m. | OK | GNU C++17 | TESTS | 13 | 15 | 204800 | ||
119417144 | Amank2854 | A | June 14, 2021, 4:35 a.m. | OK | GNU C++17 | TESTS | 13 | 15 | 204800 | ||
119412221 | Infinity_IQ | A | June 14, 2021, 2:55 a.m. | OK | GNU C++17 | TESTS | 13 | 15 | 204800 | ||
119410331 | shubham84 | A | June 14, 2021, 2:03 a.m. | OK | GNU C++17 | TESTS | 13 | 15 | 204800 | ||
119399551 | Anish_aak | A | June 13, 2021, 7:50 p.m. | OK | GNU C++17 (64) | TESTS | 13 | 15 | 0 | ||
119400822 | kaustavshouvik | A | June 13, 2021, 8 p.m. | OK | GNU C++17 (64) | TESTS | 13 | 15 | 0 | ||
119401104 | paulll | A | June 13, 2021, 8:04 p.m. | OK | GNU C++17 (64) | TESTS | 13 | 15 | 0 | ||
119409789 | diyora13 | A | June 14, 2021, 1:47 a.m. | OK | GNU C++17 (64) | TESTS | 13 | 15 | 0 | ||
119418194 | cracyx | A | June 14, 2021, 4:54 a.m. | OK | GNU C++17 (64) | TESTS | 13 | 15 | 0 | ||
119415249 | mahbubhasanmht | A | June 14, 2021, 3:58 a.m. | OK | GNU C++17 (64) | TESTS | 13 | 30 | 0 | ||
119407678 | Misbaul_Hasan | A | June 14, 2021, 12:10 a.m. | OK | GNU C++17 (64) | TESTS | 13 | 30 | 0 | ||
119418184 | rabbitsthecat | A | June 14, 2021, 4:54 a.m. | OK | GNU C++17 (64) | TESTS | 13 | 30 | 0 | ||
119418568 | lifeless_martian | A | June 14, 2021, 5:01 a.m. | OK | GNU C++17 (64) | TESTS | 13 | 30 | 0 | ||
119422380 | nazmuShakib | A | June 14, 2021, 5:57 a.m. | OK | GNU C++17 (64) | TESTS | 13 | 30 | 0 | ||
119408329 | ethan55 | A | June 14, 2021, 12:45 a.m. | OK | Java 11 | TESTS | 13 | 171 | 0 | ||
119401931 | tony_heart | A | June 13, 2021, 8:17 p.m. | OK | Java 11 | TESTS | 13 | 187 | 0 | ||
119413371 | pikachu_pika_pika | A | June 14, 2021, 3:20 a.m. | OK | Java 11 | TESTS | 13 | 202 | 0 | ||
119407412 | adarsh_goku | A | June 13, 2021, 11:55 p.m. | OK | Java 11 | TESTS | 13 | 202 | 0 | ||
119402879 | lucasr | A | June 13, 2021, 8:39 p.m. | OK | Java 11 | TESTS | 13 | 202 | 0 | ||
119420388 | nagu-pm | A | June 14, 2021, 5:30 a.m. | OK | Java 11 | TESTS | 13 | 218 | 0 | ||
119408282 | ethan55 | A | June 14, 2021, 12:43 a.m. | OK | Java 11 | TESTS | 13 | 218 | 0 | ||
119401000 | pdk.abhishek | A | June 13, 2021, 8:03 p.m. | OK | Java 11 | TESTS | 13 | 218 | 0 | ||
119388248 | tushar__2019 | A | June 13, 2021, 6:01 p.m. | OK | Java 11 | TESTS | 13 | 218 | 0 | ||
119386842 | r_i_t_i_k_1 | A | June 13, 2021, 5:55 p.m. | OK | Java 11 | TESTS | 13 | 218 | 0 | ||
119421744 | gssakash | A | June 14, 2021, 5:49 a.m. | OK | Java 8 | TESTS | 13 | 124 | 0 | ||
119412768 | shubhamsb25 | A | June 14, 2021, 3:07 a.m. | OK | Java 8 | TESTS | 13 | 124 | 0 | ||
119386405 | Akshay211 | A | June 13, 2021, 5:53 p.m. | OK | Java 8 | TESTS | 13 | 124 | 0 | ||
119403126 | FlameFire | A | June 13, 2021, 8:46 p.m. | OK | Java 8 | TESTS | 13 | 139 | 0 | ||
119399893 | This_is_the_one | A | June 13, 2021, 7:52 p.m. | OK | Java 8 | TESTS | 13 | 139 | 0 | ||
119402772 | qlf9 | A | June 13, 2021, 8:35 p.m. | OK | Java 8 | TESTS | 13 | 140 | 0 | ||
119387358 | dynamo_001 | A | June 13, 2021, 5:57 p.m. | OK | Java 8 | TESTS | 13 | 140 | 0 | ||
119401611 | Anubhai | A | June 13, 2021, 8:12 p.m. | OK | Java 8 | TESTS | 13 | 155 | 0 | ||
119401097 | sahil832 | A | June 13, 2021, 8:04 p.m. | OK | Java 8 | TESTS | 13 | 155 | 0 | ||
119389744 | Anubhai | A | June 13, 2021, 6:07 p.m. | OK | Java 8 | TESTS | 13 | 155 | 0 | ||
119407236 | Spheniscine | A | June 13, 2021, 11:41 p.m. | OK | Kotlin | TESTS | 13 | 108 | 0 | ||
119405983 | DaddyM | A | June 13, 2021, 10:24 p.m. | OK | Kotlin | TESTS | 13 | 686 | 1126400 | ||
119412402 | changlin.fu | A | June 14, 2021, 2:59 a.m. | OK | MS C++ 2017 | TESTS | 13 | 46 | 0 | ||
119386485 | Ash_2k | A | June 13, 2021, 5:53 p.m. | OK | MS C++ 2017 | TESTS | 13 | 93 | 204800 | ||
119387053 | staRain | A | June 13, 2021, 5:56 p.m. | OK | Node.js | TESTS | 13 | 155 | 6348800 | ||
119407329 | gkz | A | June 13, 2021, 11:48 p.m. | OK | PyPy 2 | TESTS | 13 | 202 | 3072000 | ||
119405230 | lebron87 | A | June 13, 2021, 9:51 p.m. | OK | PyPy 2 | TESTS | 13 | 312 | 11059200 | ||
119422697 | rivnam | A | June 14, 2021, 6:01 a.m. | OK | PyPy 3 | TESTS | 13 | 140 | 3686400 | ||
119400267 | rishabhrao | A | June 13, 2021, 7:55 p.m. | OK | PyPy 3 | TESTS | 13 | 186 | 6553600 | ||
119399664 | rishabhrao | A | June 13, 2021, 7:51 p.m. | OK | PyPy 3 | TESTS | 13 | 186 | 7065600 | ||
119403246 | gourav2001k | A | June 13, 2021, 8:50 p.m. | OK | PyPy 3 | TESTS | 13 | 218 | 5529600 | ||
119402441 | macneil | A | June 13, 2021, 8:26 p.m. | OK | PyPy 3 | TESTS | 13 | 218 | 6348800 | ||
119413026 | kirito18086 | A | June 14, 2021, 3:12 a.m. | OK | PyPy 3 | TESTS | 13 | 218 | 7782400 | ||
119414310 | dutt_shouvik | A | June 14, 2021, 3:39 a.m. | OK | PyPy 3 | TESTS | 13 | 233 | 72499200 | ||
119414974 | jaaguptamme | A | June 14, 2021, 3:53 a.m. | OK | PyPy 3 | TESTS | 13 | 249 | 7270400 | ||
119420393 | k_star_ | A | June 14, 2021, 5:30 a.m. | OK | PyPy 3 | TESTS | 13 | 264 | 8806400 | ||
119389392 | Skillful_Wanderer | A | June 13, 2021, 6:06 p.m. | OK | PyPy 3 | TESTS | 13 | 265 | 7168000 | ||
119403536 | belkka | A | June 13, 2021, 8:58 p.m. | OK | Python 3 | TESTS | 13 | 140 | 0 | ||
119402221 | eugalt | A | June 13, 2021, 8:22 p.m. | OK | Python 3 | TESTS | 13 | 186 | 0 | ||
119399614 | eugalt | A | June 13, 2021, 7:51 p.m. | OK | Python 3 | TESTS | 13 | 186 | 0 | ||
119412589 | Mac_prime | A | June 14, 2021, 3:03 a.m. | OK | Python 3 | TESTS | 13 | 187 | 0 | ||
119400701 | eugalt | A | June 13, 2021, 7:59 p.m. | OK | Python 3 | TESTS | 13 | 187 | 0 | ||
119400445 | eugalt | A | June 13, 2021, 7:56 p.m. | OK | Python 3 | TESTS | 13 | 187 | 0 | ||
119417120 | eugalt | A | June 14, 2021, 4:34 a.m. | OK | Python 3 | TESTS | 13 | 202 | 0 | ||
119412934 | Mac_prime | A | June 14, 2021, 3:10 a.m. | OK | Python 3 | TESTS | 13 | 202 | 0 | ||
119401909 | eugalt | A | June 13, 2021, 8:17 p.m. | OK | Python 3 | TESTS | 13 | 218 | 0 | ||
119389843 | Ajay_santhosh | A | June 13, 2021, 6:08 p.m. | OK | Python 3 | TESTS | 13 | 233 | 102400 | ||
119414598 | Land_oF_cOdErS | A | June 14, 2021, 3:46 a.m. | OK | Python 3 + libs | TESTS | 13 | 389 | 0 | ||
119414386 | cottoncotton | A | June 14, 2021, 3:41 a.m. | OK | Rust | TESTS | 13 | 30 | 307200 | ||
119391514 | ngtkana | A | June 13, 2021, 6:15 p.m. | OK | Rust | TESTS | 13 | 61 | 0 | ||
119405185 | TFTM | A | June 13, 2021, 9:50 p.m. | OK | Rust | TESTS | 13 | 77 | 0 | ||
119405108 | IvanDyachenko | A | June 13, 2021, 9:47 p.m. | OK | Scala | TESTS | 13 | 608 | 204800 |
Back to search problems