Codeforces Round 571 (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
1186 Codeforces Round 571 (Div. 2) FINISHED False 8100 175729187 June 28, 2019, 8:20 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 639 ) E Vus the Cossack and a Field PROGRAMMING divide and conquer implementation math 2500

B'Vus the Cossack has a field with dimensions n x m , which consists of "0" and "1". He is building an infinite field from this field. He is doing this in this way: For example, if the initial field was: After the first iteration, the field will be like this: After the second iteration, the field will be like this: And so on... Let 's numerate lines from top to bottom from 1 to infinity, and columns from left to right from 1 to infinity. We call the submatrix (x_1, y_1, x_2, y_2) all numbers that have coordinates (x, y) such that x_1 <= q x <= q x_2 and y_1 <= q y <= q y_2 . The Cossack needs sometimes to find the sum of all the numbers in submatrices. Since he is pretty busy right now, he is asking you to find the answers! The first line contains three integers n , m , q ( 1 <= q n, m <= q 1 ,000 , 1 <= q q <= q 10^5 ) -- the dimensions of the initial matrix and the number of queries. Each of the next n lines contains m characters c_{ij} ( 0 <= q c_{ij} <= q 1 ) -- the characters in the matrix. Each of the next q lines contains four integers x_1 , y_1 , x_2 , y_2 ( 1 <= q x_1 <= q x_2 <= q 10^9 , 1 <= q y_1 <= q y_2 <= q 10^9 ) -- the coordinates of the upper left cell and bottom right cell, between which you need to find the sum of all numbers. For each query, print the answer. The first example is explained in the legend. '...

Tutorials

E

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
56281024 xht37 E June 29, 2019, 4:48 p.m. OK GNU C++11 TESTS 33 124 24166400 2500
56430100 vjudge1 E July 2, 2019, 11:39 a.m. OK GNU C++11 TESTS 33 139 19865600 2500
56878338 litble E July 12, 2019, 9:13 a.m. OK GNU C++11 TESTS 33 140 9113600 2500
56429923 chenyewei_1234 E July 2, 2019, 11:35 a.m. OK GNU C++11 TESTS 33 140 19865600 2500
58887849 luogu_bot4 E Aug. 16, 2019, 3:23 a.m. OK GNU C++11 TESTS 33 155 5120000 2500
58105794 221 E Aug. 1, 2019, 4:11 a.m. OK GNU C++11 TESTS 33 155 16384000 2500
57865247 lopare E July 27, 2019, 8:32 p.m. OK GNU C++11 TESTS 33 155 16384000 2500
63115121 KaiserYang E Oct. 22, 2019, 9:03 a.m. OK GNU C++11 TESTS 33 155 32665600 2500
56823345 wh_ZH E July 11, 2019, 2:25 a.m. OK GNU C++11 TESTS 33 156 5017600 2500
56385370 xht13127 E July 1, 2019, 10:17 a.m. OK GNU C++11 TESTS 33 156 16179200 2500
56239494 tokitsukaze E June 28, 2019, 5:46 p.m. OK GNU C++14 TESTS 33 171 20377600 2500
56275983 Hamzqq9 E June 29, 2019, 2:16 p.m. OK GNU C++14 TESTS 33 187 5120000 2500
56596239 erogame E July 5, 2019, 7:38 p.m. OK GNU C++14 TESTS 33 187 5324800 2500
68376269 pikmike E Jan. 7, 2020, 8:05 p.m. OK GNU C++14 TESTS 33 187 6758400 2500
56685410 Shayan E July 7, 2019, 9:56 p.m. OK GNU C++14 TESTS 33 187 34713600 2500
56212875 Radewoosh E June 28, 2019, 9:33 a.m. OK GNU C++14 TESTS 33 202 4096000 2500
56377915 bays2a E July 1, 2019, 7:18 a.m. OK GNU C++14 TESTS 33 202 5017600 2500
56660791 4rfvedc E July 7, 2019, 9:49 a.m. OK GNU C++14 TESTS 33 202 5120000 2500
57774424 Gintoki E July 26, 2019, 2:45 a.m. OK GNU C++14 TESTS 33 202 8294400 2500
56438753 CrazyDiamond E July 2, 2019, 3:22 p.m. OK GNU C++14 TESTS 33 202 9113600 2500
57560740 mohamedeltair E July 23, 2019, 12:21 a.m. OK GNU C++17 TESTS 33 171 5120000 2500
56218701 dantita E June 28, 2019, 10:02 a.m. OK GNU C++17 TESTS 33 186 5017600 2500
56277194 hjk1030 E June 29, 2019, 2:52 p.m. OK GNU C++17 TESTS 33 186 8192000 2500
56249859 Yzm007 E June 29, 2019, 2 a.m. OK GNU C++17 TESTS 33 186 16384000 2500
56501515 newusernme E July 4, 2019, 6:34 a.m. OK GNU C++17 TESTS 33 187 5120000 2500
56390593 trungvthe130284 E July 1, 2019, 12:24 p.m. OK GNU C++17 TESTS 33 187 5120000 2500
57632883 kozyuk E July 24, 2019, 9:25 a.m. OK GNU C++17 TESTS 33 187 16384000 2500
58865824 Lucina E Aug. 15, 2019, 1:20 p.m. OK GNU C++17 TESTS 33 187 33382400 2500
56532613 KrK E July 4, 2019, 8:50 p.m. OK GNU C++17 TESTS 33 202 5120000 2500
65279822 FlowerOfSorrow E Nov. 18, 2019, 4:50 a.m. OK GNU C++17 TESTS 33 202 6348800 2500
58253598 Oopsimbad E Aug. 4, 2019, 8:58 a.m. OK Java 8 TESTS 33 312 4915200 2500
57820651 kusomushi E July 26, 2019, 10:53 p.m. OK Java 8 TESTS 33 343 16998400 2500
69649621 AnandOza E Jan. 28, 2020, 4:20 a.m. OK Java 8 TESTS 33 358 38195200 2500
56206639 uwi E June 28, 2019, 9:05 a.m. OK Java 8 TESTS 33 467 17305600 2500
66188756 dalt E Dec. 2, 2019, 3:34 p.m. OK Java 8 TESTS 33 608 46489600 2500
56232152 notnamed E June 28, 2019, 2:39 p.m. OK Java 8 TESTS 33 889 6860800 2500
56367058 partizan22 E July 1, 2019, 12:06 a.m. OK Java 8 TESTS 33 1122 5017600 2500
56544472 kkyuggu E July 5, 2019, 7:01 a.m. OK Kotlin TESTS 33 468 26828800 2500
59258644 vjudge5 E Aug. 22, 2019, 7:40 a.m. OK MS C++ TESTS 33 265 4096000 2500
59257154 vjudge3 E Aug. 22, 2019, 7:11 a.m. OK MS C++ TESTS 33 265 4096000 2500
59209763 vjudge4 E Aug. 21, 2019, 8:09 a.m. OK MS C++ TESTS 33 389 16179200 2500
56468827 vjudge4 E July 3, 2019, 10:07 a.m. OK MS C++ TESTS 33 389 64819200 2500
59386670 vjudge3 E Aug. 24, 2019, 6:42 a.m. OK MS C++ TESTS 33 390 12185600 2500
59246392 vjudge2 E Aug. 22, 2019, 12:15 a.m. OK MS C++ TESTS 33 404 16076800 2500
57996552 Pokeylope E July 30, 2019, 2:44 p.m. OK PyPy 3 TESTS 33 1231 26624000 2500
56442579 kobae964 E July 2, 2019, 5:10 p.m. OK Rust TESTS 33 358 25088000 2500

remove filters

Back to search problems