Codeforces Round 955 (Div. 2, with prizes from NEAR!)

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
1982 Codeforces Round 955 (Div. 2, with prizes from NEAR!) FINISHED False 7200 17853863 June 25, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 7429 ) D Beauty of the mountains PROGRAMMING brute force data structures implementation math number theory

B"Nikita loves mountains and has finally decided to visit the Berlyand mountain range! The range was so beautiful that Nikita decided to capture it on a map. The map is a table of n rows and m columns, with each cell containing a non-negative integer representing the height of the mountain. He also noticed that mountains come in two types: Nikita is a very pragmatic person. He wants the sum of the heights of the mountains with snowy caps to be equal to the sum of the heights of the mountains without them. He has arranged with the mayor of Berlyand, Polikarp Polikarpovich, to allow him to transform the landscape. Nikita can perform transformations on submatrices of size k x k as follows: he can add an integer constant c to the heights of the mountains within this area, but the type of the mountain remains unchanged. Nikita can choose the constant c independently for each transformation. Note that c can be negative. Before making the transformations, Nikita asks you to find out if it is possible to achieve equality of the sums, or if it is impossible. It doesn't matter at what cost, even if the mountains turn into canyons and have negative heights. If only one type of mountain is represented on the map, then the sum of the heights of the other type of mountain is considered to be zero. Each test consists of several test cases. The first line contains an integer t ( 1 <= t <= 10^{4} ) -- the number of test cases. This is followed by a description of test cases. The first line of each test case contains three integers n, m, k ( 1 <= n, m <= 500, 1 <= k <= min(n, m) ). The next n lines of each test case contain m integers a_{i j} ( 0 <= a_{i j} <= 10^{9} ) -- the initial heights of the mountains. The next n binary strings of length m for each test case determine the type of mountain, ' 0 ' -- with snowy caps, ' 1 ' -- without them. It is guarante"...

Tutorials

130839

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
267447835 Grammar_hbw D June 26, 2024, 1:54 a.m. OK C++14 (GCC 6-32) TESTS 34 93 4096000
267443653 wyoo D June 26, 2024, 12:20 a.m. OK C++14 (GCC 6-32) TESTS 33 108 2355200
267427252 nmh111 D June 25, 2024, 7:39 p.m. OK C++14 (GCC 6-32) TESTS 33 108 2969600
267407837 yuyc D June 25, 2024, 5:13 p.m. OK C++14 (GCC 6-32) TESTS 32 109 3072000
267409792 phuocson D June 25, 2024, 5:21 p.m. OK C++14 (GCC 6-32) TESTS 32 109 4096000
267446690 For_rest D June 26, 2024, 1:29 a.m. OK C++14 (GCC 6-32) TESTS 34 109 4198400
267421406 Misaka19280 D June 25, 2024, 6:42 p.m. OK C++14 (GCC 6-32) TESTS 33 109 4198400
267457025 gsczl71 D June 26, 2024, 4:14 a.m. OK C++14 (GCC 6-32) TESTS 34 109 4403200
267449190 Zhi_zI D June 26, 2024, 2:19 a.m. OK C++14 (GCC 6-32) TESTS 34 124 921600
267418280 Errors D June 25, 2024, 6:16 p.m. OK C++14 (GCC 6-32) TESTS 33 124 1126400
267419440 badub D June 25, 2024, 6:26 p.m. OK C++17 (GCC 7-32) TESTS 33 93 2048000
267449204 NotFound D June 26, 2024, 2:19 a.m. OK C++17 (GCC 7-32) TESTS 34 108 0
267420858 _0-1_nap_nap_ D June 25, 2024, 6:37 p.m. OK C++17 (GCC 7-32) TESTS 33 108 614400
267426953 Dimitrovsd D June 25, 2024, 7:36 p.m. OK C++17 (GCC 7-32) TESTS 33 108 2048000
267447479 xiaoqie D June 26, 2024, 1:46 a.m. OK C++17 (GCC 7-32) TESTS 34 108 3686400
267420632 yashu1819 D June 25, 2024, 6:36 p.m. OK C++17 (GCC 7-32) TESTS 33 109 0
267413020 KBahl D June 25, 2024, 5:40 p.m. OK C++17 (GCC 7-32) TESTS 32 109 0
267409406 sanchit24 D June 25, 2024, 5:19 p.m. OK C++17 (GCC 7-32) TESTS 32 109 0
267451800 kushal46 D June 26, 2024, 3:02 a.m. OK C++17 (GCC 7-32) TESTS 34 109 307200
267414163 TaHeToO D June 25, 2024, 5:47 p.m. OK C++17 (GCC 7-32) TESTS 32 109 716800
267409980 Tainel D June 25, 2024, 5:22 p.m. OK C++20 (GCC 13-64) TESTS 32 93 0
267447690 nosaboy D June 26, 2024, 1:50 a.m. OK C++20 (GCC 13-64) TESTS 34 93 102400
267450604 IzzyAbello D June 26, 2024, 2:43 a.m. OK C++20 (GCC 13-64) TESTS 34 93 614400
267463330 arpit040199 D June 26, 2024, 5:23 a.m. OK C++20 (GCC 13-64) TESTS 34 93 716800
267454255 t1r3d_ D June 26, 2024, 3:39 a.m. OK C++20 (GCC 13-64) TESTS 34 93 716800
267442532 Ali_Azzam D June 25, 2024, 11:52 p.m. OK C++20 (GCC 13-64) TESTS 33 93 1024000
267440034 kevin D June 25, 2024, 10:53 p.m. OK C++20 (GCC 13-64) TESTS 33 93 1126400
267428263 DedSecAlpha D June 25, 2024, 7:51 p.m. OK C++20 (GCC 13-64) TESTS 33 93 1536000
267420449 archit10 D June 25, 2024, 6:34 p.m. OK C++20 (GCC 13-64) TESTS 33 93 1638400
267433371 ibrahimhanifceker D June 25, 2024, 8:56 p.m. OK C++20 (GCC 13-64) TESTS 33 93 2048000
267413216 ruban D June 25, 2024, 5:41 p.m. OK FPC TESTS 32 171 32358400
267417435 NenadDapic D June 25, 2024, 6:10 p.m. OK FPC TESTS 33 202 2048000
267418851 NenadDapic D June 25, 2024, 6:21 p.m. OK FPC TESTS 33 249 2048000
267448224 1435730 D June 26, 2024, 2 a.m. OK GNU C11 TESTS 34 140 2355200
267410399 swarnim9901 D June 25, 2024, 5:25 p.m. OK Go TESTS 32 109 5427200
267454976 nguyenquocthao00 D June 26, 2024, 3:48 a.m. OK Go TESTS 34 264 33996800
267417637 LCM D June 25, 2024, 6:11 p.m. OK Haskell TESTS 33 1546 150220800
267466789 amit_roy D June 26, 2024, 5:54 a.m. OK Java 21 TESTS 34 296 614400
267458297 priyaroy3370 D June 26, 2024, 4:28 a.m. OK Java 21 TESTS 34 296 1024000
267408242 DOOMJUICE D June 25, 2024, 5:14 p.m. OK Java 21 TESTS 32 311 6553600
267464725 minibin D June 26, 2024, 5:36 a.m. OK Java 21 TESTS 34 327 1126400
267452143 dhruv0902 D June 26, 2024, 3:08 a.m. OK Java 21 TESTS 34 328 819200
267431338 Sumitsingh7 D June 25, 2024, 8:29 p.m. OK Java 21 TESTS 33 342 13107200
267419021 mkah123 D June 25, 2024, 6:22 p.m. OK Java 21 TESTS 33 343 921600
267408284 coder0687 D June 25, 2024, 5:14 p.m. OK Java 21 TESTS 32 343 1433600
267427669 Akash_Sardar D June 25, 2024, 7:43 p.m. OK Java 21 TESTS 33 358 3788800
267464476 mohit458 D June 26, 2024, 5:33 a.m. OK Java 21 TESTS 34 374 614400
267431407 Sumitsingh7 D June 25, 2024, 8:30 p.m. OK Java 8 TESTS 33 218 7065600
267454595 achyut88 D June 26, 2024, 3:44 a.m. OK Java 8 TESTS 34 234 0
267459893 guptashreyansh2048 D June 26, 2024, 4:46 a.m. OK Java 8 TESTS 34 249 0
267438337 etian6795 D June 25, 2024, 10:17 p.m. OK Java 8 TESTS 33 249 0
267425119 kasiru_69 D June 25, 2024, 7:16 p.m. OK Java 8 TESTS 33 265 1536000
267416098 1091857051 D June 25, 2024, 6:01 p.m. OK Java 8 TESTS 33 296 0
267401787 invincible777 D June 25, 2024, 4:29 p.m. OK Java 8 TESTS 32 296 5324800
267437548 PlayDate D June 25, 2024, 10:02 p.m. OK Java 8 TESTS 33 624 0
267432385 dauletomarov1130 D June 25, 2024, 8:43 p.m. OK Java 8 TESTS 33 655 0
267408132 HardikG12 D June 25, 2024, 5:14 p.m. OK Java 8 TESTS 32 671 0
267412269 ahtoh_ D June 25, 2024, 5:35 p.m. OK Node.js TESTS 32 593 54681600
267434411 Ahmed_Turkman D June 25, 2024, 9:11 p.m. OK PyPy 3 TESTS 33 655 10649600
267465408 sanjay.garg2072 D June 26, 2024, 5:41 a.m. OK PyPy 3 TESTS 34 1999 10752000
267433065 MistaFlash D June 25, 2024, 8:52 p.m. OK PyPy 3-64 TESTS 33 281 10137600
267410060 siic D June 25, 2024, 5:23 p.m. OK PyPy 3-64 TESTS 32 281 14745600
267436628 pulkit_garg14 D June 25, 2024, 9:46 p.m. OK PyPy 3-64 TESTS 33 296 10444800
267402239 iedfa D June 25, 2024, 4:30 p.m. OK PyPy 3-64 TESTS 32 296 13312000
267409178 siic D June 25, 2024, 5:18 p.m. OK PyPy 3-64 TESTS 32 311 14950400
267453924 RobinFromTheHood D June 26, 2024, 3:35 a.m. OK PyPy 3-64 TESTS 34 312 9830400
267450058 InHng_ D June 26, 2024, 2:34 a.m. OK PyPy 3-64 TESTS 34 312 10342400
267428319 MassimoG D June 25, 2024, 7:52 p.m. OK PyPy 3-64 TESTS 33 327 11366400
267452812 neutrinoant D June 26, 2024, 3:18 a.m. OK PyPy 3-64 TESTS 34 327 20172800
267420223 FTGUPP D June 25, 2024, 6:32 p.m. OK PyPy 3-64 TESTS 33 343 11161600
267452554 DLC0203 D June 26, 2024, 3:14 a.m. OK Python 3 TESTS 34 875 21811200
267404878 anatemsf D June 25, 2024, 4:34 p.m. OK Python 3 TESTS 32 983 33280000
267402278 lvlup D June 25, 2024, 4:30 p.m. OK Python 3 TESTS 32 1062 58675200
267403439 swiftkey204 D June 25, 2024, 4:32 p.m. OK Python 3 TESTS 32 1389 32051200
267452777 jinyiqi D June 26, 2024, 3:18 a.m. OK Python 3 TESTS 34 1718 34406400
267416797 cottoncotton D June 25, 2024, 6:05 p.m. OK Rust 2021 TESTS 33 156 2048000
267449240 JUBHAI D June 26, 2024, 2:19 a.m. OK Rust 2021 TESTS 34 249 2048000
267408841 Cheshulko D June 25, 2024, 5:17 p.m. OK Rust 2021 TESTS 32 342 1126400
267432131 lrvideckis D June 25, 2024, 8:39 p.m. OK Rust 2021 TESTS 33 375 3276800
267407898 M1ngXu D June 25, 2024, 5:13 p.m. OK Rust 2021 TESTS 32 1108 5734400

remove filters

Back to search problems