Codeforces Round 443 (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
878 Codeforces Round 443 (Div. 1) FINISHED False 7200 222794099 Oct. 26, 2017, 2:45 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 571 ) E Numbers on the blackboard PROGRAMMING combinatorics dp 3200

B"A sequence of n integers is written on a blackboard. Soon Sasha will come to the blackboard and start the following actions: let x and y be two adjacent numbers (x before y), then he can remove them and write x xe2 x80 x89+ xe2 x80 x892y instead of them. He will perform these operations until one number is left. Sasha likes big numbers and will get the biggest possible number. Nikita wants to get to the blackboard before Sasha and erase some of the numbers. He has q options, in the option i he erases all numbers to the left of the li-th number and all numbers to the right of ri-th number, i. e. all numbers between the li-th and the ri-th, inclusive, remain on the blackboard. For each of the options he wants to know how big Sasha's final number is going to be. This number can be very big, so output it modulo 109 xe2 x80 x89+ xe2 x80 x897. The first line contains two integers n and q (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89q xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105) -- the number of integers on the blackboard and the number of Nikita's options. The next line contains n integers a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an ( xe2 x80 x89- xe2 x80 x89109 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) -- the sequence on the blackboard. Each of the next q lines contains two integers li and ri (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89li xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ri xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n), describing Nikita's options. For each option output Sasha's result modulo 109 xe2 x80 x89+ xe2 x80 x897. In the second sample Nikita doesn't erase anything. Sasha first erases the numbers 1 and 2 and writes 5. Then he erases 5 and -3 and gets -1. -1 modulo 109 xe2 x80 x89+ xe2 x80 x897 is 109 xe2 x80 x89+ xe2 x80 x896. "...

Tutorials

Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
33925163 alan_cty E Jan. 5, 2018, 2:40 p.m. OK GNU C++ TESTS 55 77 9728000 3200
38788589 Drin_E E May 31, 2018, 3:02 a.m. OK GNU C++ TESTS 55 78 8704000 3200
35041538 yyhhenry E Feb. 8, 2018, 2:40 a.m. OK GNU C++ TESTS 55 78 9932800 3200
32622673 vjudge4 E Nov. 24, 2017, 1:40 p.m. OK GNU C++ TESTS 55 78 9932800 3200
40979392 ReaLNero1 E July 30, 2018, 5:03 p.m. OK GNU C++ TESTS 55 93 7680000 3200
32622541 VPigeonKing E Nov. 24, 2017, 1:33 p.m. OK GNU C++ TESTS 55 93 9932800 3200
38150945 vjudge3 E May 13, 2018, 2:36 a.m. OK GNU C++ TESTS 55 93 13619200 3200
34042767 _SHENZHEBEI_ E Jan. 9, 2018, 7:10 a.m. OK GNU C++ TESTS 55 93 85504000 3200
36323082 Heaplax E March 16, 2018, 10:45 a.m. OK GNU C++ TESTS 55 124 18739200 3200
42264162 Scut82 E Aug. 30, 2018, 6:04 a.m. OK GNU C++ TESTS 55 140 17612800 3200
61986546 dqa2020 E Oct. 6, 2019, 1:43 p.m. OK GNU C++11 TESTS 55 46 5836800 3200
61852423 ilnil E Oct. 4, 2019, 1:05 p.m. OK GNU C++11 TESTS 55 46 26009600 3200
61864904 ruogu E Oct. 4, 2019, 4:19 p.m. OK GNU C++11 TESTS 55 62 8089600 3200
63353540 The_Crossing E Oct. 25, 2019, 12:20 a.m. OK GNU C++11 TESTS 55 62 22630400 3200
61853740 ZhongJQ E Oct. 4, 2019, 1:29 p.m. OK GNU C++11 TESTS 55 62 26316800 3200
63279717 550576898 E Oct. 24, 2019, 8:16 a.m. OK GNU C++11 TESTS 55 62 45363200 3200
63281465 luogu_bot1 E Oct. 24, 2019, 8:50 a.m. OK GNU C++11 TESTS 55 77 41881600 3200
63281083 luogu_bot2 E Oct. 24, 2019, 8:42 a.m. OK GNU C++11 TESTS 55 77 41881600 3200
63420113 lzoilxy E Oct. 26, 2019, 6:06 a.m. OK GNU C++11 TESTS 55 77 51916800 3200
63419962 lzoilxy E Oct. 26, 2019, 6:03 a.m. OK GNU C++11 TESTS 55 77 51916800 3200
64683383 idxcalcal E Nov. 11, 2019, 10:56 a.m. OK GNU C++14 TESTS 55 62 33587200 3200
34051123 FizzyDavid E Jan. 9, 2018, 2:33 p.m. OK GNU C++14 TESTS 55 109 14848000 3200
69545455 Cyanic E Jan. 26, 2020, 2:07 a.m. OK GNU C++14 TESTS 55 124 7884800 3200
62112891 LanrTabe E Oct. 8, 2019, 12:39 p.m. OK GNU C++14 TESTS 55 124 7884800 3200
40728023 lllllllllllllllllllllll E July 25, 2018, 6:11 a.m. OK GNU C++14 TESTS 55 124 7884800 3200
63285829 MinecraftFuns E Oct. 24, 2019, 10:18 a.m. OK GNU C++14 TESTS 55 124 9318400 3200
32977432 yfzcsc E Dec. 6, 2017, 1:43 p.m. OK GNU C++14 TESTS 55 124 12083200 3200
32991191 cyz666 E Dec. 7, 2017, 3:32 a.m. OK GNU C++14 TESTS 55 124 12595200 3200
32152083 Krydom_Yuudachi E Nov. 9, 2017, 6:46 a.m. OK GNU C++14 TESTS 55 124 14438400 3200
31962779 navneethingankar9 E Nov. 1, 2017, 8:41 p.m. OK GNU C++14 TESTS 55 124 14643200 3200
64683269 lidongxu E Nov. 11, 2019, 10:53 a.m. OK GNU C++17 TESTS 55 62 33792000 3200
63292436 slzxchy E Oct. 24, 2019, 12:07 p.m. OK GNU C++17 TESTS 55 77 24473600 3200
46906641 dogcdt E Dec. 11, 2018, 2:34 p.m. OK GNU C++17 TESTS 55 124 8704000 3200
63290858 realSpongeBob E Oct. 24, 2019, 11:43 a.m. OK GNU C++17 TESTS 55 124 25497600 3200
63290675 luogu_bot2 E Oct. 24, 2019, 11:40 a.m. OK GNU C++17 TESTS 55 124 25497600 3200
63275605 Siyuan E Oct. 24, 2019, 6:41 a.m. OK GNU C++17 TESTS 55 124 25497600 3200
63284506 qinyuyang E Oct. 24, 2019, 9:50 a.m. OK GNU C++17 TESTS 55 139 99020800 3200
65672533 justfocusplease E Nov. 24, 2019, 4:34 p.m. OK GNU C++17 TESTS 55 140 12697600 3200
63290946 __JuRuo E Oct. 24, 2019, 11:44 a.m. OK GNU C++17 TESTS 55 156 31539200 3200
47385379 ShichengXiao E Dec. 23, 2018, 3:57 a.m. OK GNU C++17 TESTS 55 170 6348800 3200

remove filters

Back to search problems