Codeforces Round 564 (Div. 1)

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
1172 Codeforces Round 564 (Div. 1) FINISHED False 7200 177530087 June 7, 2019, 12:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 534 ) F Nauuo and Bug PROGRAMMING data structures 3300

B'Nauuo is a girl who loves coding. One day she was solving a problem which requires to calculate a sum of some numbers modulo p . She wrote the following code and got the verdict "Wrong answer". She soon discovered the bug -- the ModAdd function only worked for numbers in the range [0,p) , but the numbers in the problem may be out of the range. She was curious about the wrong function, so she wanted to know the result of it. However, the original code worked too slow, so she asked you to help her. You are given an array a_1,a_2, ldots,a_n and a number p . Nauuo will make m queries, in each query, you are given l and r , and you have to calculate the results of Sum(a,l,r,p). You can see the definition of the Sum function in the pseudocode above. Note that the integers won 't overflow in the code above. The first line contains three integers n , m , p ( 1 <= n <= 10^6 , 1 <= m <= 2 cdot 10^5 , 1 <= p <= 10^9 ) -- the length of the given array, the number of queries and the modulus. Note that the modulus is used only in the ModAdd function. The second line contains n integers a_1,a_2, ldots,a_n ( -10^9 <= a_i <= 10^9 ) -- the given array. In the following m lines, each line contains two integers l , r ( 1 <= l <= r <= n ) -- you have to calculate the result of Sum(a,l,r,p). The output contains m integers to answer the queries in the given order. '...

Tutorials

Codeforces Round #564 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
55610591 ReaLNero1 F June 16, 2019, 5:25 a.m. OK GNU C++11 TESTS 90 1060 256000000 3300
55494174 yasugongshang F June 12, 2019, 11:40 a.m. OK GNU C++11 TESTS 90 1076 249139200 3300
68449568 142857 F Jan. 9, 2020, 1:52 p.m. OK GNU C++11 TESTS 90 1123 311705600 3300
55494257 yasugongshang F June 12, 2019, 11:43 a.m. OK GNU C++11 TESTS 90 1170 256000000 3300
55486347 maxtir F June 12, 2019, 8:02 a.m. OK GNU C++11 TESTS 90 1185 231833600 3300
59202013 lzoilxy F Aug. 21, 2019, 5:21 a.m. OK GNU C++11 TESTS 90 1200 287232000 3300
55681594 zyt1253679098 F June 17, 2019, 1:20 p.m. OK GNU C++11 TESTS 90 1247 263168000 3300
59201615 lzoilxy F Aug. 21, 2019, 5:10 a.m. OK GNU C++11 TESTS 90 1247 287232000 3300
58120216 luogu_bot2 F Aug. 1, 2019, 10:24 a.m. OK GNU C++11 TESTS 90 1279 267161600 3300
59135854 whoamiiahow F Aug. 20, 2019, 12:38 p.m. OK GNU C++11 TESTS 90 1387 263168000 3300
55494156 yasugongshang F June 12, 2019, 11:39 a.m. OK GNU C++14 TESTS 90 1294 249344000 3300
60285323 idxcalcal F Sept. 9, 2019, 1:42 a.m. OK GNU C++14 TESTS 90 1341 263577600 3300
55545710 tmwilliamlin168 F June 14, 2019, 2:14 a.m. OK GNU C++14 TESTS 90 1622 274329600 3300
56422401 ataekOnOrigin F July 2, 2019, 7:58 a.m. OK GNU C++14 TESTS 90 1637 282726400 3300
57978901 Libitina F July 30, 2019, 8:38 a.m. OK GNU C++14 TESTS 90 1653 274432000 3300
55292935 nhho F June 8, 2019, 8:33 a.m. OK GNU C++14 TESTS 90 1668 262758400 3300
57980363 Libitina F July 30, 2019, 9:10 a.m. OK GNU C++14 TESTS 90 1668 274432000 3300
55661094 ksun48 F June 16, 2019, 9:07 p.m. OK GNU C++14 TESTS 90 1762 286208000 3300
55701506 zsyzsy F June 18, 2019, 4:38 a.m. OK GNU C++14 TESTS 90 1809 283340800 3300
55661068 ksun48 F June 16, 2019, 9:06 p.m. OK GNU C++14 TESTS 90 1855 286208000 3300
67584855 user202729_ F Dec. 25, 2019, 7:51 a.m. OK GNU C++17 TESTS 90 1310 235417600 3300
60523097 nickluo F Sept. 14, 2019, 9:14 a.m. OK GNU C++17 TESTS 90 1310 287846400 3300
55485804 rushcheyo F June 12, 2019, 7:45 a.m. OK GNU C++17 TESTS 90 1513 263270400 3300
58659355 tyk07tianxingjian F Aug. 12, 2019, 10:20 a.m. OK GNU C++17 TESTS 90 1528 263270400 3300
56830016 Nakagawa.Kanon F July 11, 2019, 6:35 a.m. OK GNU C++17 TESTS 90 1637 250675200 3300
56829874 Nishihara F July 11, 2019, 6:31 a.m. OK GNU C++17 TESTS 90 1637 250675200 3300
65082241 amethyst0 F Nov. 15, 2019, 4:56 p.m. OK GNU C++17 TESTS 90 1684 282828800 3300
65918210 user202729_ F Nov. 28, 2019, 3:23 p.m. OK GNU C++17 TESTS 90 1700 234393600 3300
65917990 user202729_ F Nov. 28, 2019, 3:18 p.m. OK GNU C++17 TESTS 90 1746 234393600 3300
69720524 gongsuidashen F Jan. 29, 2020, 10:29 a.m. OK GNU C++17 TESTS 90 1840 232038400 3300

remove filters

Back to search problems