Codeforces Round 920 (Div. 3)

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
1921 Codeforces Round 920 (Div. 3) FINISHED False 8100 31850663 Jan. 15, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1277 ) G Mischievous Shooter PROGRAMMING data structures divide and conquer dp implementation

B"Once the mischievous and wayward shooter named Shel found himself on a rectangular field of size n x m , divided into unit squares. Each cell either contains a target or not. Shel only had a lucky shotgun with him, with which he can shoot in one of the four directions: right-down, left-down, left-up, or right-up. When fired, the shotgun hits all targets in the chosen direction, the Manhattan distance to which does not exceed a fixed constant k . The Manhattan distance between two points (x_1, y_1) and (x_2, y_2) is equal to |x_1 - x_2| + |y_1 - y_2| . Shel's goal is to hit as many targets as possible. Please help him find this value. Each test consists of several test cases. The first line contains a single integer t ( 1 <= t <= 1000 ) -- the number of test cases. Then follows the description of the test cases. The first line of each test case contains field dimensions n , m , and the constant for the shotgun's power k ( 1 <= n, m, k <= 10^5, 1 <= n cdot m <= 10^5 ). Each of the next n lines contains m characters -- the description of the next field row, where the character '.' means the cell is empty, and the character '#' indicates the presence of a target. It is guaranteed that the sum of n cdot m over all test cases does not exceed 10^5 . For each test case, output a single integer on a separate line, which is equal to the maximum possible number of hit targets with one shot. Possible optimal shots for the examples in the statement: "...

Tutorials

Editorial for Codeforces Round 920 (Div. 3)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
241840709 Gassa G Jan. 15, 2024, 5:27 p.m. OK D TESTS 23 218 13926400
241832504 Gassa G Jan. 15, 2024, 4:49 p.m. OK D TESTS 23 280 24371200
241842662 Gassa G Jan. 15, 2024, 5:42 p.m. OK D TESTS 23 1044 13926400
241856971 ZhiGeBaiShui G Jan. 15, 2024, 8:24 p.m. OK GNU C++14 TESTS 25 61 11366400
241839656 Hihihah G Jan. 15, 2024, 5:21 p.m. OK GNU C++14 TESTS 23 62 6860800
241874911 zltzlt G Jan. 16, 2024, 3:44 a.m. OK GNU C++14 TESTS 25 78 6144000
241865364 omeganot G Jan. 16, 2024, 12:32 a.m. OK GNU C++14 TESTS 25 78 9830400
241840038 RobertoFirmino G Jan. 15, 2024, 5:23 p.m. OK GNU C++14 TESTS 23 93 19046400
241850908 pcajourney G Jan. 15, 2024, 6:53 p.m. OK GNU C++14 TESTS 23 124 3276800
241837185 vrcoder045 G Jan. 15, 2024, 5:06 p.m. OK GNU C++14 TESTS 23 124 15257600
241850162 Palbudir G Jan. 15, 2024, 6:45 p.m. OK GNU C++14 TESTS 23 139 12800000
241846360 johnsmith0xcf G Jan. 15, 2024, 6:10 p.m. OK GNU C++14 TESTS 23 140 13209600
241854133 ArimaKana G Jan. 15, 2024, 7:39 p.m. OK GNU C++14 TESTS 23 140 29593600
241871322 feifwoefi G Jan. 16, 2024, 2:48 a.m. OK GNU C++17 TESTS 25 46 8601600
241864957 MZFMLLJMPAJDAG G Jan. 16, 2024, 12:18 a.m. OK GNU C++17 TESTS 25 62 14233600
241880225 phirtheta G Jan. 16, 2024, 5:01 a.m. OK GNU C++17 TESTS 25 77 11366400
241863527 Bedoo G Jan. 15, 2024, 11:23 p.m. OK GNU C++17 TESTS 25 77 131276800
241864963 MZFMLLJMPAJDAG G Jan. 16, 2024, 12:19 a.m. OK GNU C++17 TESTS 25 78 14233600
241837191 muskanf0035 G Jan. 15, 2024, 5:07 p.m. OK GNU C++17 TESTS 23 93 13721600
241865203 swift51385 G Jan. 16, 2024, 12:27 a.m. OK GNU C++17 TESTS 25 93 14540800
241851572 stefdasca G Jan. 15, 2024, 7 p.m. OK GNU C++17 TESTS 23 93 17510400
241851415 stefdasca G Jan. 15, 2024, 6:58 p.m. OK GNU C++17 TESTS 23 93 18329600
241842433 GOTKAKO G Jan. 15, 2024, 5:40 p.m. OK GNU C++17 TESTS 23 108 9625600
241872525 ChinoKafuu G Jan. 16, 2024, 3:07 a.m. OK GNU C++17 (64) TESTS 25 31 7782400
241867836 1075508020060209tc G Jan. 16, 2024, 1:34 a.m. OK GNU C++17 (64) TESTS 25 31 14438400
241862556 Krzychuo G Jan. 15, 2024, 10:41 p.m. OK GNU C++17 (64) TESTS 25 46 15257600
241855317 galen_colin G Jan. 15, 2024, 7:57 p.m. OK GNU C++17 (64) TESTS 23 61 36352000
241846839 __TRUE__ G Jan. 15, 2024, 6:13 p.m. OK GNU C++17 (64) TESTS 23 62 11878400
241873406 littlegirl112 G Jan. 16, 2024, 3:19 a.m. OK GNU C++17 (64) TESTS 25 62 12083200
241875009 gqf123 G Jan. 16, 2024, 3:45 a.m. OK GNU C++17 (64) TESTS 25 77 29184000
241866671 Misty7 G Jan. 16, 2024, 1:07 a.m. OK GNU C++17 (64) TESTS 25 93 15257600
241847603 21cs01033 G Jan. 15, 2024, 6:20 p.m. OK GNU C++17 (64) TESTS 23 93 22732800
241837908 akauto G Jan. 15, 2024, 5:10 p.m. OK GNU C++17 (64) TESTS 23 93 42086400
241839243 Luqman G Jan. 15, 2024, 5:18 p.m. OK GNU C++20 (64) TESTS 23 30 10854400
241863075 tkacper G Jan. 15, 2024, 11:03 p.m. OK GNU C++20 (64) TESTS 25 31 3379200
241879469 REN_REN G Jan. 16, 2024, 4:50 a.m. OK GNU C++20 (64) TESTS 25 31 10649600
241839675 tosivanmak G Jan. 15, 2024, 5:21 p.m. OK GNU C++20 (64) TESTS 23 31 11571200
241864569 semi_ai G Jan. 16, 2024, 12:07 a.m. OK GNU C++20 (64) TESTS 25 46 7270400
241874574 MedriaLife G Jan. 16, 2024, 3:38 a.m. OK GNU C++20 (64) TESTS 25 46 11878400
241855358 ecottea G Jan. 15, 2024, 7:58 p.m. OK GNU C++20 (64) TESTS 23 46 16076800
241861674 MatteoArcari franv jamesbamber G Jan. 15, 2024, 10:10 p.m. OK GNU C++20 (64) TESTS 25 46 17920000
241841458 hhcy G Jan. 15, 2024, 5:33 p.m. OK GNU C++20 (64) TESTS 23 61 7270400
241852625 GusFring G Jan. 15, 2024, 7:13 p.m. OK GNU C++20 (64) TESTS 23 61 11264000
241859263 arvindf232 G Jan. 15, 2024, 9:07 p.m. OK Kotlin 1.9 TESTS 25 702 142131200
241865309 OLOGY G Jan. 16, 2024, 12:30 a.m. OK PyPy 2 TESTS 25 389 36659200
241863057 OLOGY G Jan. 15, 2024, 11:03 p.m. OK PyPy 2 TESTS 25 1029 15974400
241875596 YMSeah G Jan. 16, 2024, 3:53 a.m. OK PyPy 3 TESTS 25 545 48844800
241841267 Z_actuary G Jan. 15, 2024, 5:31 p.m. OK PyPy 3-64 TESTS 23 327 22016000
241861174 gardengnome G Jan. 15, 2024, 9:53 p.m. OK PyPy 3-64 TESTS 25 452 21504000
241858188 gardengnome G Jan. 15, 2024, 8:45 p.m. OK PyPy 3-64 TESTS 25 482 60006400
241848081 AloFrut G Jan. 15, 2024, 6:24 p.m. OK PyPy 3-64 TESTS 23 717 65945600
241857413 Quick-One G Jan. 15, 2024, 8:31 p.m. OK PyPy 3-64 TESTS 25 732 45875200
241844752 Rumors G Jan. 15, 2024, 5:57 p.m. OK PyPy 3-64 TESTS 23 810 16384000
241837946 Divyanshu_52 G Jan. 15, 2024, 5:11 p.m. OK PyPy 3-64 TESTS 23 810 16384000
241861386 gardengnome G Jan. 15, 2024, 10 p.m. OK PyPy 3-64 TESTS 25 1107 21504000
241865317 OLOGY G Jan. 16, 2024, 12:31 a.m. OK Python 2 TESTS 25 1762 29696000
241872328 OLOGY G Jan. 16, 2024, 3:04 a.m. OK Python 2 TESTS 25 1902 29491200
241852022 snamy520 G Jan. 15, 2024, 7:05 p.m. OK Rust 2021 TESTS 23 46 9728000

remove filters

Back to search problems