Codeforces Global Round 22

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
1738 Codeforces Global Round 22 FINISHED False 9000 72717863 Sept. 30, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 473 ) G Anti-Increasing Addicts PROGRAMMING constructive algorithms dfs and similar dp greedy

B'You are given an n x n grid. We write (i, j) to denote the cell in the i -th row and j -th column. For each cell, you are told whether yon can delete it or not. Given an integer k , you are asked to delete exactly (n-k+1)^2 cells from the grid such that the following condition holds. Each test contains multiple test cases. The first line contains an integer t ( 1 <= q t <= q 10^5 ) -- the number of test cases. The following lines contain the description of each test case. The first line of each test case contains two integers n and k ( 2 <= q k <= q n <= q 1000 ). Then n lines follow. The i -th line contains a binary string s_i of length n . The j -th character of s_i is 1 if you can delete cell (i, j) , and 0 otherwise. It 's guaranteed that the sum of n^2 over all test cases does not exceed 10^6 . For each test case, if there is no way to delete exactly (n-k+1)^2 cells to meet the condition, output "NO" (without quotes). Otherwise, output "YES" (without quotes). Then, output n lines. The i -th line should contain a binary string t_i of length n . The j -th character of t_i is 0 if cell (i, j) is deleted, and 1 otherwise. If there are multiple solutions, you can output any of them. You can output "YES" and "NO" in any case (for example, strings "yEs", "yes" and "Yes" will be recognized as a positive response). For the first test case, you only have to delete cell (1, 1) . For the second test case, you could choose to delete cells (1,1) , (1,2) , (4,3) and (4,4) . For the third test case, it is no solution because the cells in the diagonal will always form a strictly increasing sequence of length 5 . '...

Tutorials

Editorial of Codeforces Global Round <strong>22</strong>

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
174187442 nor G Oct. 1, 2022, 1:25 a.m. OK GNU C11 TESTS 61 46 105267200
174187198 nor G Oct. 1, 2022, 1:21 a.m. OK GNU C11 TESTS 61 46 105267200
174150454 liuhengxi G Sept. 30, 2022, 4:52 p.m. OK GNU C++14 TESTS 61 124 6041600
174203159 -____ G Oct. 1, 2022, 5:30 a.m. OK GNU C++14 TESTS 61 140 9932800
174147706 lovemathboy G Sept. 30, 2022, 4:44 p.m. OK GNU C++14 TESTS 61 202 18329600
174188360 Alex_Wei G Oct. 1, 2022, 1:45 a.m. OK GNU C++14 TESTS 61 748 13209600
174162156 gisp_zjz G Sept. 30, 2022, 6:17 p.m. OK GNU C++14 TESTS 61 1200 18534400
174178086 Bobocan G Sept. 30, 2022, 9:21 p.m. OK GNU C++17 TESTS 61 46 5529600
174154879 milisav G Sept. 30, 2022, 5:03 p.m. OK GNU C++17 TESTS 61 124 2252800
174188140 tokusakurai G Oct. 1, 2022, 1:40 a.m. OK GNU C++17 TESTS 61 139 9113600
174184982 ziadelsamahyy G Oct. 1, 2022, 12:30 a.m. OK GNU C++17 TESTS 61 156 2969600
174182603 Kilani G Sept. 30, 2022, 11:25 p.m. OK GNU C++17 TESTS 61 187 6758400
174149936 Pyqe G Sept. 30, 2022, 4:50 p.m. OK GNU C++17 TESTS 61 265 16691200
174154208 se1ka2 G Sept. 30, 2022, 5:01 p.m. OK GNU C++17 TESTS 61 295 5836800
174149063 pigstd G Sept. 30, 2022, 4:48 p.m. OK GNU C++17 TESTS 61 608 16384000
174147340 NeoOrgano G Sept. 30, 2022, 4:43 p.m. OK GNU C++17 TESTS 61 1497 4198400
174161099 yzc2005 G Sept. 30, 2022, 6:11 p.m. OK GNU C++17 (64) TESTS 61 139 15667200
174162084 yzc2005 G Sept. 30, 2022, 6:17 p.m. OK GNU C++17 (64) TESTS 61 139 15667200
174162232 yzc2005 G Sept. 30, 2022, 6:17 p.m. OK GNU C++17 (64) TESTS 61 140 15667200
174189712 lqx2005 G Oct. 1, 2022, 2:09 a.m. OK GNU C++17 (64) TESTS 61 155 38195200
174147398 hitonanode G Sept. 30, 2022, 4:43 p.m. OK GNU C++17 (64) TESTS 61 171 6246400
174176991 lightseba G Sept. 30, 2022, 9 p.m. OK GNU C++17 (64) TESTS 61 171 13107200
174148118 noimi G Sept. 30, 2022, 4:45 p.m. OK GNU C++17 (64) TESTS 61 202 22220800
174153931 dario2994 G Sept. 30, 2022, 5:01 p.m. OK GNU C++17 (64) TESTS 61 202 29388800
174152762 kotatsugame G Sept. 30, 2022, 4:58 p.m. OK GNU C++17 (64) TESTS 61 264 7987200
174177736 353cerega G Sept. 30, 2022, 9:14 p.m. OK GNU C++17 (64) TESTS 61 421 27545600
174187407 nor G Oct. 1, 2022, 1:25 a.m. OK GNU C++20 (64) TESTS 61 46 105062400
174187292 nor G Oct. 1, 2022, 1:22 a.m. OK GNU C++20 (64) TESTS 61 46 105164800
174147620 physics0523 G Sept. 30, 2022, 4:44 p.m. OK GNU C++20 (64) TESTS 61 62 3379200
174152933 tatyam G Sept. 30, 2022, 4:58 p.m. OK GNU C++20 (64) TESTS 61 78 1228800
174175967 Endagorion G Sept. 30, 2022, 8:43 p.m. OK GNU C++20 (64) TESTS 61 78 8396800
174186523 BurnedChicken G Oct. 1, 2022, 1:07 a.m. OK GNU C++20 (64) TESTS 61 78 14336000
174182951 njwrz G Sept. 30, 2022, 11:35 p.m. OK GNU C++20 (64) TESTS 61 78 32358400
174160693 InternetPerson10 G Sept. 30, 2022, 6:09 p.m. OK GNU C++20 (64) TESTS 61 93 2048000
174165514 liouzhou_101 G Sept. 30, 2022, 6:38 p.m. OK GNU C++20 (64) TESTS 61 93 2355200
174160936 BucketPotato G Sept. 30, 2022, 6:10 p.m. OK GNU C++20 (64) TESTS 61 93 20480000
174162623 mmaxio G Sept. 30, 2022, 6:19 p.m. OK Java 11 TESTS 61 311 6758400
174152071 eatmore G Sept. 30, 2022, 4:56 p.m. OK Java 11 TESTS 61 342 6041600
174163011 arvindf232 G Sept. 30, 2022, 6:21 p.m. OK Kotlin 1.6 TESTS 61 451 34918400

remove filters

Back to search problems