Codeforces Round 592 (Div. 2)

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
1244 Codeforces Round 592 (Div. 2) FINISHED False 7200 160865699 Oct. 13, 2019, 9:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1545 ) F Chips PROGRAMMING constructive algorithms implementation 2300

B'There are n chips arranged in a circle, numbered from 1 to n . Initially each chip has black or white color. Then k iterations occur. During each iteration the chips change their colors according to the following rules. For each chip i , three chips are considered: chip i itself and two its neighbours. If the number of white chips among these three is greater than the number of black chips among these three chips, then the chip i becomes white. Otherwise, the chip i becomes black. Note that for each i from 2 to (n - 1) two neighbouring chips have numbers (i - 1) and (i + 1) . The neighbours for the chip i = 1 are n and 2 . The neighbours of i = n are (n - 1) and 1 . The following picture describes one iteration with n = 6 . The chips 1 , 3 and 4 are initially black, and the chips 2 , 5 and 6 are white. After the iteration 2 , 3 and 4 become black, and 1 , 5 and 6 become white. Your task is to determine the color of each chip after k iterations. The first line contains two integers n and k (3 <= n <= 200 ,000, 1 <= k <= 10^{9}) -- the number of chips and the number of iterations, respectively. The second line contains a string consisting of n characters "W" and "B". If the i -th character is "W", then the i -th chip is white initially. If the i -th character is "B", then the i -th chip is black initially. Print a string consisting of n characters "W" and "B". If after k iterations the i -th chip is white, then the i -th character should be "W". Otherwise the i -th character should be "B". The first example is described in the statement. The second example: "WBWBWBW" rightarrow "WWBWBWW" rightarrow "WWWBWWW" rightarrow "WWWWWWW". So all chips become white. The third example: "'...

Tutorials

Codeforces Round #592 (Div. 2) Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
63057889 MRoy F Oct. 21, 2019, 7:15 a.m. OK GNU C11 TESTS 73 655 1843200 2300
62767454 dredwerkz F Oct. 17, 2019, 9:07 a.m. OK GNU C++11 TESTS 73 31 204800 2300
63412082 w190971822 F Oct. 26, 2019, 1:29 a.m. OK GNU C++11 TESTS 73 31 409600 2300
63657607 vjudge4 F Oct. 28, 2019, 1:09 p.m. OK GNU C++11 TESTS 73 31 409600 2300
63657605 vjudge2 F Oct. 28, 2019, 1:09 p.m. OK GNU C++11 TESTS 73 31 409600 2300
62548320 AuqaKyz F Oct. 14, 2019, 7:28 a.m. OK GNU C++11 TESTS 73 31 614400 2300
62839778 Binary_Search_Tree F Oct. 18, 2019, 1:48 a.m. OK GNU C++11 TESTS 73 31 1024000 2300
64147296 xiaok F Nov. 3, 2019, 10:19 a.m. OK GNU C++11 TESTS 73 31 1024000 2300
63662400 cheetose F Oct. 28, 2019, 2:15 p.m. OK GNU C++11 TESTS 73 31 1126400 2300
63267517 luojinyao F Oct. 24, 2019, 1:27 a.m. OK GNU C++11 TESTS 73 31 1228800 2300
64364943 ACMWGR F Nov. 6, 2019, 12:46 p.m. OK GNU C++11 TESTS 73 31 1228800 2300
62966570 2683331518 F Oct. 20, 2019, 4:56 a.m. OK GNU C++14 TESTS 73 31 204800 2300
62668117 rolypolyvg F Oct. 16, 2019, 8:38 a.m. OK GNU C++14 TESTS 73 31 512000 2300
62599777 KoalaMuch F Oct. 15, 2019, 4:47 a.m. OK GNU C++14 TESTS 73 31 614400 2300
62541957 _HossamYehia_ F Oct. 14, 2019, 4:05 a.m. OK GNU C++14 TESTS 73 31 614400 2300
62541637 _HossamYehia_ F Oct. 14, 2019, 3:50 a.m. OK GNU C++14 TESTS 73 31 614400 2300
62526100 IMAN_GH F Oct. 13, 2019, 5:24 p.m. OK GNU C++14 TESTS 73 31 716800 2300
66181103 aviroop123 F Dec. 2, 2019, 12:51 p.m. OK GNU C++14 TESTS 73 31 716800 2300
65276960 thekmman F Nov. 18, 2019, 2:15 a.m. OK GNU C++14 TESTS 73 31 921600 2300
65277038 thekmman F Nov. 18, 2019, 2:20 a.m. OK GNU C++14 TESTS 73 31 921600 2300
62529721 Bignubie F Oct. 13, 2019, 6:45 p.m. OK GNU C++14 TESTS 73 31 1024000 2300
62575396 Mastre F Oct. 14, 2019, 3:45 p.m. OK GNU C++17 TESTS 73 30 1536000 2300
62645311 dasper F Oct. 15, 2019, 7:21 p.m. OK GNU C++17 TESTS 73 30 4505600 2300
62753455 201612201401011 F Oct. 17, 2019, 3:02 a.m. OK GNU C++17 TESTS 73 31 409600 2300
63510514 NelsonGomesNeto F Oct. 26, 2019, 8:20 p.m. OK GNU C++17 TESTS 73 31 409600 2300
63073878 jkchen F Oct. 21, 2019, 1:10 p.m. OK GNU C++17 TESTS 73 31 409600 2300
62915457 Golam_Rahman_Chowdhury F Oct. 19, 2019, 8:33 a.m. OK GNU C++17 TESTS 73 31 409600 2300
62624149 EvolveZ F Oct. 15, 2019, 1:37 p.m. OK GNU C++17 TESTS 73 31 409600 2300
62854490 oskarfiuk1 F Oct. 18, 2019, 8:43 a.m. OK GNU C++17 TESTS 73 31 512000 2300
62526496 Gladius_Smerch F Oct. 13, 2019, 5:33 p.m. OK GNU C++17 TESTS 73 31 512000 2300
64512435 moss3s F Nov. 8, 2019, 9:19 a.m. OK GNU C++17 TESTS 73 31 512000 2300
65717107 IslamTalipovTop F Nov. 25, 2019, 5:07 p.m. OK Java 11 TESTS 73 187 5324800 2300
65900682 potatmen F Nov. 28, 2019, 8:36 a.m. OK Java 11 TESTS 73 217 0 2300
65132348 bluesky111 F Nov. 16, 2019, 4:13 a.m. OK Java 8 TESTS 73 124 0 2300
62533656 uwi F Oct. 13, 2019, 8:44 p.m. OK Java 8 TESTS 73 124 0 2300
64777154 Ahmad F Nov. 13, 2019, 5:12 a.m. OK Java 8 TESTS 73 139 0 2300
62877400 egaeus F Oct. 18, 2019, 3:44 p.m. OK Java 8 TESTS 73 139 0 2300
62840927 Ruins F Oct. 18, 2019, 2:37 a.m. OK Java 8 TESTS 73 140 0 2300
62613042 yaoct F Oct. 15, 2019, 10:29 a.m. OK Java 8 TESTS 73 140 0 2300
62549777 Witless_Deer F Oct. 14, 2019, 8:06 a.m. OK Java 8 TESTS 73 140 0 2300
62536899 Suzukaze F Oct. 13, 2019, 11:35 p.m. OK Java 8 TESTS 73 140 0 2300
63356457 AnandOza F Oct. 25, 2019, 2:58 a.m. OK Java 8 TESTS 73 155 0 2300
62564267 spar5h F Oct. 14, 2019, 12:50 p.m. OK Java 8 TESTS 73 155 5734400 2300
62753809 Spheniscine F Oct. 17, 2019, 3:15 a.m. OK Kotlin TESTS 73 155 0 2300
62753717 Spheniscine F Oct. 17, 2019, 3:12 a.m. OK Kotlin TESTS 73 155 0 2300
63897279 vjudge2 F Oct. 31, 2019, 2:55 a.m. OK MS C++ TESTS 73 31 3993600 2300
63896095 vjudge1 F Oct. 31, 2019, 2:05 a.m. OK MS C++ TESTS 73 31 3993600 2300
64260378 r57shell F Nov. 4, 2019, 4:26 p.m. OK MS C++ TESTS 73 46 2150400 2300
63895972 vjudge1 F Oct. 31, 2019, 1:59 a.m. OK MS C++ TESTS 73 46 3993600 2300
62686342 vjudge4 F Oct. 16, 2019, 2:10 p.m. OK MS C++ TESTS 73 46 4403200 2300
63024472 MegalithAgnusDei F Oct. 20, 2019, 3:46 p.m. OK MS C++ TESTS 73 46 5529600 2300
62910916 vjudge4 F Oct. 19, 2019, 7:17 a.m. OK MS C++ TESTS 73 62 1024000 2300
65228461 vjudge1 F Nov. 17, 2019, 3:25 a.m. OK MS C++ TESTS 73 62 3072000 2300
63780633 vjudge1 F Oct. 30, 2019, 10:56 a.m. OK MS C++ TESTS 73 62 3584000 2300
62564586 Prokopiy F Oct. 14, 2019, 12:54 p.m. OK MS C++ 2017 TESTS 73 46 716800 2300
62536170 j2v F Oct. 13, 2019, 10:44 p.m. OK MS C++ 2017 TESTS 73 46 819200 2300
64193973 MT_07 F Nov. 4, 2019, 8:55 a.m. OK MS C++ 2017 TESTS 73 46 1433600 2300
64522702 qiyangbo F Nov. 8, 2019, 12:49 p.m. OK MS C++ 2017 TESTS 73 46 3788800 2300
63123518 dream_dreamer F Oct. 22, 2019, 12:06 p.m. OK MS C++ 2017 TESTS 73 62 1945600 2300
62567488 alexwice F Oct. 14, 2019, 1:36 p.m. OK PyPy 2 TESTS 73 233 15155200 2300
62555565 Venia F Oct. 14, 2019, 10:25 a.m. OK PyPy 3 TESTS 73 202 14131200 2300
62518671 Kirillov_Alexey F Oct. 13, 2019, 3:06 p.m. OK PyPy 3 TESTS 73 217 10035200 2300
62552532 chielo F Oct. 14, 2019, 9:16 a.m. OK PyPy 3 TESTS 73 280 15872000 2300
67130654 erickjohnross F Dec. 17, 2019, 11:38 p.m. OK Python 3 TESTS 73 670 16896000 2300
62970124 vishnutheerthep F Oct. 20, 2019, 6:36 a.m. OK Python 3 TESTS 73 702 25088000 2300
68257919 17wh1a0550 F Jan. 5, 2020, 2:42 p.m. OK Python 3 TESTS 73 764 25497600 2300

remove filters

Back to search problems