Codeforces Round 578 (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
1200 Codeforces Round 578 (Div. 2) FINISHED False 7200 166296299 Aug. 11, 2019, 12:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4146 ) D White Lines PROGRAMMING brute force data structures dp implementation two pointers 1900

B"Gildong has bought a famous painting software cfpaint. The working screen of cfpaint is square-shaped consisting of n rows and n columns of square cells. The rows are numbered from 1 to n , from top to bottom, and the columns are numbered from 1 to n , from left to right. The position of a cell at row r and column c is represented as (r, c) . There are only two colors for the cells in cfpaint -- black and white. There is a tool named eraser in cfpaint. The eraser has an integer size k ( 1 <= k <= n ). To use the eraser, Gildong needs to click on a cell (i, j) where 1 <= i, j <= n - k + 1 . When a cell (i, j) is clicked, all of the cells (i', j') where i <= i' <= i + k - 1 and j <= j' <= j + k - 1 become white. In other words, a square with side equal to k cells and top left corner at (i, j) is colored white. A white line is a row or a column without any black cells. Gildong has worked with cfpaint for some time, so some of the cells (possibly zero or all) are currently black. He wants to know the maximum number of white lines after using the eraser exactly once. Help Gildong find the answer to his question. The first line contains two integers n and k ( 1 <= k <= n <= 2000 ) -- the number of rows and columns, and the size of the eraser. The next n lines contain n characters each without spaces. The j -th character in the i -th line represents the cell at (i,j) . Each character is given as either 'B' representing a black cell, or 'W' representing a white cell. Print one integer: the maximum number of white lines after using the eraser exactly once. In the first example, Gildong can click the cell (2, 2) , then the working screen becomes: Then there are four white lines -- the 2 -nd and 3 -rd row, and the 2 -nd and 3 -rd column. In the second example, clicking the cell $"...

Tutorials

Codeforces Round #578 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
58607930 iica D Aug. 11, 2019, 1:56 p.m. OK D TESTS 101 249 73216000 1900
58617174 coderbd D Aug. 11, 2019, 2:31 p.m. OK GNU C11 TESTS 101 171 100761600 1900
58604354 ddytxdy D Aug. 11, 2019, 1:43 p.m. OK GNU C++11 TESTS 101 62 4096000 1900
58615394 fakecydiater D Aug. 11, 2019, 2:25 p.m. OK GNU C++11 TESTS 101 62 4096000 1900
58603020 chentong D Aug. 11, 2019, 1:39 p.m. OK GNU C++11 TESTS 101 62 4198400 1900
58603888 spacevortex D Aug. 11, 2019, 1:42 p.m. OK GNU C++11 TESTS 101 62 4403200 1900
58600967 lhylhy D Aug. 11, 2019, 1:33 p.m. OK GNU C++11 TESTS 101 62 16076800 1900
58612097 QaQEpoch D Aug. 11, 2019, 2:12 p.m. OK GNU C++11 TESTS 101 62 16281600 1900
58612478 Mr_Wu D Aug. 11, 2019, 2:13 p.m. OK GNU C++11 TESTS 101 62 19968000 1900
58600381 Lius D Aug. 11, 2019, 1:31 p.m. OK GNU C++11 TESTS 101 62 20172800 1900
58614058 Desertico D Aug. 11, 2019, 2:20 p.m. OK GNU C++11 TESTS 101 62 20275200 1900
58618086 yingyudou D Aug. 11, 2019, 2:34 p.m. OK GNU C++11 TESTS 101 62 20275200 1900
58608229 tokitsukaze D Aug. 11, 2019, 1:57 p.m. OK GNU C++14 TESTS 101 62 20582400 1900
58608714 wa006 D Aug. 11, 2019, 1:58 p.m. OK GNU C++14 TESTS 101 77 4198400 1900
58606056 forerunner D Aug. 11, 2019, 1:49 p.m. OK GNU C++14 TESTS 101 77 10752000 1900
58601763 xgcxgc D Aug. 11, 2019, 1:35 p.m. OK GNU C++14 TESTS 101 77 20070400 1900
58585183 gamegamewillwinioi2020 D Aug. 11, 2019, 12:55 p.m. OK GNU C++14 TESTS 101 77 23347200 1900
58604239 Okazaki_Yumemi D Aug. 11, 2019, 1:43 p.m. OK GNU C++14 TESTS 101 77 25088000 1900
58607539 idxcalcal D Aug. 11, 2019, 1:54 p.m. OK GNU C++14 TESTS 101 78 20172800 1900
58604333 daniel14311531 D Aug. 11, 2019, 1:43 p.m. OK GNU C++14 TESTS 101 78 20275200 1900
58591225 QutarZ_Z D Aug. 11, 2019, 1:07 p.m. OK GNU C++14 TESTS 101 78 20275200 1900
58609542 KristinAlter D Aug. 11, 2019, 2:02 p.m. OK GNU C++14 TESTS 101 78 20275200 1900
58611448 2683331518 D Aug. 11, 2019, 2:09 p.m. OK GNU C++17 TESTS 101 62 4300800 1900
58613165 LJL36 D Aug. 11, 2019, 2:16 p.m. OK GNU C++17 TESTS 101 77 4096000 1900
58610966 ne4eHbKa D Aug. 11, 2019, 2:07 p.m. OK GNU C++17 TESTS 101 77 17305600 1900
58597422 Tropical_maid D Aug. 11, 2019, 1:23 p.m. OK GNU C++17 TESTS 101 77 20070400 1900
58613297 Sagimune D Aug. 11, 2019, 2:16 p.m. OK GNU C++17 TESTS 101 77 20172800 1900
58603528 paulica D Aug. 11, 2019, 1:41 p.m. OK GNU C++17 TESTS 101 77 20275200 1900
58612259 hojoon0205 D Aug. 11, 2019, 2:12 p.m. OK GNU C++17 TESTS 101 77 20480000 1900
58610465 zstu_jack D Aug. 11, 2019, 2:05 p.m. OK GNU C++17 TESTS 101 78 5017600 1900
58607717 huasheng D Aug. 11, 2019, 1:55 p.m. OK GNU C++17 TESTS 101 78 16896000 1900
58614461 GGKK D Aug. 11, 2019, 2:21 p.m. OK GNU C++17 TESTS 101 78 20172800 1900
58609236 Derino D Aug. 11, 2019, 2 p.m. OK Java 8 TESTS 101 202 15564800 1900
58617407 YourAdCouldBeHere D Aug. 11, 2019, 2:32 p.m. OK Java 8 TESTS 101 218 15974400 1900
58607535 brainfxxk D Aug. 11, 2019, 1:54 p.m. OK Java 8 TESTS 101 249 39731200 1900
58613708 chojh1222 D Aug. 11, 2019, 2:18 p.m. OK Java 8 TESTS 101 280 42496000 1900
58605887 ika D Aug. 11, 2019, 1:48 p.m. OK Java 8 TESTS 101 295 73830400 1900
58615559 garnacha D Aug. 11, 2019, 2:25 p.m. OK Java 8 TESTS 101 296 16896000 1900
58608014 vcght D Aug. 11, 2019, 1:56 p.m. OK Java 8 TESTS 101 327 74854400 1900
58618398 Witless_Deer D Aug. 11, 2019, 2:34 p.m. OK Java 8 TESTS 101 358 0 1900
58603995 spar5h D Aug. 11, 2019, 1:42 p.m. OK Java 8 TESTS 101 389 88166400 1900
58614877 DanilS D Aug. 11, 2019, 2:23 p.m. OK Java 8 TESTS 101 390 40448000 1900
58598802 keymoon D Aug. 11, 2019, 1:26 p.m. OK Mono C# TESTS 101 234 23347200 1900
58614114 kichi2004 D Aug. 11, 2019, 2:20 p.m. OK Mono C# TESTS 101 249 53248000 1900
58609257 Yupiteru D Aug. 11, 2019, 2 p.m. OK Mono C# TESTS 101 358 216780800 1900
58613296 eki D Aug. 11, 2019, 2:16 p.m. OK Mono C# TESTS 101 405 127590400 1900
58597303 LateRest D Aug. 11, 2019, 1:22 p.m. OK Mono C# TESTS 101 421 154214400 1900
58609909 kuuso D Aug. 11, 2019, 2:03 p.m. OK Mono C# TESTS 101 499 77312000 1900
58616391 jjang36524 D Aug. 11, 2019, 2:28 p.m. OK MS C++ 2017 TESTS 101 93 4096000 1900
58605916 moreda D Aug. 11, 2019, 1:48 p.m. OK MS C++ 2017 TESTS 101 124 38092800 1900
58600847 Timonnable D Aug. 11, 2019, 1:32 p.m. OK MS C++ 2017 TESTS 101 187 38809600 1900
58618268 mihaiI D Aug. 11, 2019, 2:34 p.m. OK MS C++ 2017 TESTS 101 217 141926400 1900
58607559 siwei D Aug. 11, 2019, 1:54 p.m. OK MS C++ 2017 TESTS 101 857 52326400 1900
58609491 bcollet D Aug. 11, 2019, 2:01 p.m. OK PyPy 2 TESTS 101 358 41574400 1900
58608556 dukati8 D Aug. 11, 2019, 1:58 p.m. OK PyPy 2 TESTS 101 467 74342400 1900
58602143 ikatakos D Aug. 11, 2019, 1:36 p.m. OK PyPy 3 TESTS 101 1497 169574400 1900
58608663 limed D Aug. 11, 2019, 1:58 p.m. OK Scala TESTS 101 639 11161600 1900

remove filters

Back to search problems