Codeforces Round 468 (Div. 1, based on Technocup 2018 Final Round)

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
930 Codeforces Round 468 (Div. 1, based on Technocup 2018 Final Round) FINISHED False 7200 256227923 March 4, 2018, 3:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 511 ) E Coins Exhibition PROGRAMMING data structures dp math 2700

Arkady and Kirill visited an exhibition of rare coins. The coins were located in a row and enumerated from left to right from 1 to k , each coin either was laid with its obverse (front) side up, or with its reverse (back) side up. Arkady and Kirill made some photos of the coins, each photo contained a segment of neighboring coins. Akrady is interested in obverses, so on each photo made by him there is at least one coin with obverse side up. On the contrary, Kirill is interested in reverses, so on each photo made by him there is at least one coin with its reverse side up. The photos are lost now, but Arkady and Kirill still remember the bounds of the segments of coins each photo contained. Given this information, compute the remainder of division by 10 9 + 7 of the number of ways to choose the upper side of each coin in such a way, that on each Arkady's photo there is at least one coin with obverse side up, and on each Kirill's photo there is at least one coin with reverse side up. The first line contains three integers k , n and m ( 1 ≤ k ≤ 10 9 , 0 ≤ n , m ≤ 10 5 ) — the total number of coins, the number of photos made by Arkady, and the number of photos made by Kirill, respectively. The next n lines contain the descriptions of Arkady's photos, one per line. Each of these lines contains two integers l and r ( 1 ≤ l ≤ r ≤ k ), meaning that among coins from the l -th to the r -th there should be at least one with obverse side up. The next m lines contain the descriptions of Kirill's photos, one per line. Each of these lines contains two integers l and r ( 1 ≤ l ≤ r ≤ k ), meaning that among coins from the l -th to the r -th there should be at least one with reverse side up. Print the only line — the number of ways to choose the side for each coin modulo 10 9 + 7 = 1000000007 . In the first example the following ways are possible (' O ' — obverse, ' R ' — reverse side): OROOR , ORORO , ORORR , RROOR , RRORO , RRORR , ORROR , ORRRO . In the second example the

Tutorials

Codeforces Round #468 and Technocup 2018 Final Round Analysis

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
69469462 hos.lyric E Jan. 24, 2020, 2:02 p.m. OK D TESTS 22 779 35840000 2700
36992130 jesseliu612 E April 5, 2018, 8:33 a.m. OK GNU C++ TESTS 22 202 21504000 2700
36072246 XingGeRuCi E March 8, 2018, 1:22 p.m. OK GNU C++ TESTS 22 234 13107200 2700
36985350 zjo_2001 E April 5, 2018, 2:09 a.m. OK GNU C++ TESTS 22 265 21196800 2700
40737065 Night_Fury E July 25, 2018, 10:25 a.m. OK GNU C++ TESTS 22 327 57548800 2700
37590930 sshockwave E April 25, 2018, 8:19 a.m. OK GNU C++ TESTS 22 358 56729600 2700
35945455 skuecrk E March 4, 2018, 5:33 p.m. OK GNU C++ TESTS 22 389 20889600 2700
37451124 mayaohua2003 E April 19, 2018, 3:11 a.m. OK GNU C++ TESTS 22 405 25804800 2700
35942264 Andrew_Makar E March 4, 2018, 5:07 p.m. OK GNU C++ TESTS 22 436 37273600 2700
35985880 wxy_z E March 6, 2018, 8:52 a.m. OK GNU C++ TESTS 22 561 31744000 2700
35982610 cz_xuyixuan E March 6, 2018, 6:11 a.m. OK GNU C++ TESTS 22 576 66150400 2700
40978209 ReaLNero1 E July 30, 2018, 4:31 p.m. OK GNU C++11 TESTS 22 156 17612800 2700
37590935 131441373 E April 25, 2018, 8:19 a.m. OK GNU C++11 TESTS 22 156 21401600 2700
45172180 luogu_bot1 E Nov. 1, 2018, 1:14 p.m. OK GNU C++11 TESTS 22 171 11264000 2700
45053048 yasugongshang E Oct. 29, 2018, 11:35 a.m. OK GNU C++11 TESTS 22 186 11059200 2700
45172401 vjudge2 E Nov. 1, 2018, 1:18 p.m. OK GNU C++11 TESTS 22 187 11264000 2700
38558475 skylee E May 23, 2018, 10:25 a.m. OK GNU C++11 TESTS 22 187 11366400 2700
35979428 samjia2000 E March 6, 2018, 1:28 a.m. OK GNU C++11 TESTS 22 187 21401600 2700
41423381 ykn1 E Aug. 10, 2018, 8:08 a.m. OK GNU C++11 TESTS 22 202 11366400 2700
56059927 _twilight E June 26, 2019, 4:41 a.m. OK GNU C++11 TESTS 22 202 15360000 2700
36193336 FizzyDavid E March 11, 2018, 9:02 a.m. OK GNU C++11 TESTS 22 217 19763200 2700
55745929 Scut82 E June 19, 2019, 10:01 a.m. OK GNU C++14 TESTS 22 202 13619200 2700
36041013 JHSN E March 7, 2018, 11:05 a.m. OK GNU C++14 TESTS 22 217 18022400 2700
35940428 bmerry E March 4, 2018, 4:52 p.m. OK GNU C++14 TESTS 22 249 7270400 2700
35970918 consecutivelimit E March 5, 2018, 3:50 p.m. OK GNU C++14 TESTS 22 249 13107200 2700
36341184 lkjfdsa E March 17, 2018, 3:46 a.m. OK GNU C++14 TESTS 22 249 14540800 2700
36040856 JHSN E March 7, 2018, 11 a.m. OK GNU C++14 TESTS 22 249 18022400 2700
37220853 Twishkle.Aevdark E April 11, 2018, 11:27 a.m. OK GNU C++14 TESTS 22 264 16179200 2700
38534038 shaochengxi E May 22, 2018, 11:52 a.m. OK GNU C++14 TESTS 22 280 16281600 2700
35979134 ZaakDov E March 6, 2018, 12:48 a.m. OK GNU C++14 TESTS 22 296 18124800 2700
36034806 Nero E March 7, 2018, 6:45 a.m. OK GNU C++14 TESTS 22 312 6860800 2700
66085467 GreymaneSilverfang E Dec. 1, 2019, 4:15 a.m. OK GNU C++17 TESTS 22 202 5324800 2700
35980112 ftiasch E March 6, 2018, 2:54 a.m. OK GNU C++17 TESTS 22 327 6860800 2700
69470194 sigma425 E Jan. 24, 2020, 2:17 p.m. OK GNU C++17 TESTS 22 327 13721600 2700
35937874 V--o_o--V E March 4, 2018, 4:32 p.m. OK GNU C++17 TESTS 22 358 32256000 2700
65791794 Kuroni E Nov. 26, 2019, 11:26 p.m. OK GNU C++17 TESTS 22 436 16281600 2700
65791752 Kuroni E Nov. 26, 2019, 11:23 p.m. OK GNU C++17 TESTS 22 451 16281600 2700
65793685 Kuroni E Nov. 27, 2019, 2:01 a.m. OK GNU C++17 TESTS 22 452 16281600 2700
37652124 azneyes E April 27, 2018, 6:01 a.m. OK GNU C++17 TESTS 22 467 13516800 2700
63904974 Roundgod E Oct. 31, 2019, 6:18 a.m. OK GNU C++17 TESTS 22 623 33689600 2700
63784213 tEMMIE.w. E Oct. 30, 2019, 11:52 a.m. OK GNU C++17 TESTS 22 624 6451200 2700
36400344 mmaxio E March 18, 2018, 11:07 p.m. OK Java 8 TESTS 22 405 27750400 2700
43054678 tri E Sept. 19, 2018, 2:30 a.m. OK Java 8 TESTS 22 577 13209600 2700
35938049 Petr E March 4, 2018, 4:33 p.m. OK Java 8 TESTS 22 733 34918400 2700

remove filters

Back to search problems