Educational Codeforces Round 67 (Rated for 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
1187 Educational Codeforces Round 67 (Rated for Div. 2) FINISHED False 7200 175533287 June 30, 2019, 2:45 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 903 ) F Expected Square Beauty PROGRAMMING dp math probabilities 2600

B"Let x be an array of integers x = [x_1, x_2, ... , x_n] . Let's define B(x) as a minimal size of a partition of x into subsegments such that all elements in each subsegment are equal. For example, B([3, 3, 6, 1, 6, 6, 6]) = 4 using next partition: [3, 3 | 6 | 1 | 6, 6, 6] . Now you don't have any exact values of x , but you know that x_i can be any integer value from [l_i, r_i] ( l_i <= r_i ) uniformly at random. All x_i are independent. Calculate expected value of (B(x))^2 , or E((B(x))^2) . It's guaranteed that the expected value can be represented as rational fraction frac{P}{Q} where (P, Q) = 1 , so print the value P cdot Q^{-1} mod 10^9 + 7 . The first line contains the single integer n ( 1 <= n <= 2 cdot 10^5 ) -- the size of the array x . The second line contains n integers l_1, l_2, ... , l_n ( 1 <= l_i <= 10^9 ). The third line contains n integers r_1, r_2, ... , r_n ( l_i <= r_i <= 10^9 ). Print the single integer -- E((B(x))^2) as P cdot Q^{-1} mod 10^9 + 7 . Let's describe all possible values of x for the first sample: All possible values of x for the second sample: "...

Tutorials

Разбор Educational Codeforces Round 67

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
60517223 _BARUTO F Sept. 14, 2019, 7:10 a.m. OK GNU C++11 TESTS 39 93 3993600 2600
57865207 lopare F July 27, 2019, 8:30 p.m. OK GNU C++11 TESTS 39 93 3993600 2600
57709555 py_ultron F July 24, 2019, 10:38 p.m. OK GNU C++11 TESTS 39 93 3993600 2600
67577077 dqa2020 F Dec. 25, 2019, 3:23 a.m. OK GNU C++11 TESTS 39 109 3072000 2600
69936629 hotwords F Feb. 1, 2020, 4:11 a.m. OK GNU C++11 TESTS 39 109 4608000 2600
56694293 crawarb F July 8, 2019, 6:10 a.m. OK GNU C++11 TESTS 39 109 12083200 2600
56860358 eriksuenderhauf F July 11, 2019, 9:35 p.m. OK GNU C++11 TESTS 39 109 32051200 2600
56647852 luogu_bot2 F July 7, 2019, 7:17 a.m. OK GNU C++11 TESTS 39 124 3174400 2600
66301559 luogu_bot2 F Dec. 5, 2019, 7:28 a.m. OK GNU C++11 TESTS 39 140 3993600 2600
66301552 stal_xy23z7b8 F Dec. 5, 2019, 7:28 a.m. OK GNU C++11 TESTS 39 140 3993600 2600
56342526 hank55663 F June 30, 2019, 4:41 p.m. OK GNU C++14 TESTS 39 156 4812800 2600
56705547 opooopooo F July 8, 2019, 10:56 a.m. OK GNU C++14 TESTS 39 156 16076800 2600
56372737 yan-zp F July 1, 2019, 4:51 a.m. OK GNU C++14 TESTS 39 187 3174400 2600
56743850 Libitina F July 9, 2019, 8:48 a.m. OK GNU C++14 TESTS 39 202 3174400 2600
56615389 Newusers F July 6, 2019, 9:22 a.m. OK GNU C++14 TESTS 39 202 3174400 2600
56500284 Origenes F July 4, 2019, 5:59 a.m. OK GNU C++14 TESTS 39 202 3379200 2600
56638481 krijgertje F July 6, 2019, 10:07 p.m. OK GNU C++14 TESTS 39 202 3993600 2600
57894249 liuweih F July 28, 2019, 12:56 p.m. OK GNU C++14 TESTS 39 202 4812800 2600
56344290 redbox F June 30, 2019, 4:55 p.m. OK GNU C++14 TESTS 39 202 6758400 2600
57194913 megatron10599 F July 17, 2019, 11:53 a.m. OK GNU C++14 TESTS 39 218 3174400 2600
56827893 Worst_Coder17 F July 11, 2019, 5:32 a.m. OK GNU C++17 TESTS 39 124 3993600 2600
56387983 CMXRYNP F July 1, 2019, 11:21 a.m. OK GNU C++17 TESTS 39 124 3993600 2600
56867740 andyseve F July 12, 2019, 4:27 a.m. OK GNU C++17 TESTS 39 171 1638400 2600
56384978 kessido F July 1, 2019, 10:07 a.m. OK GNU C++17 TESTS 39 171 5120000 2600
56881051 gyz_gyz F July 12, 2019, 10:28 a.m. OK GNU C++17 TESTS 39 171 6451200 2600
56358224 wwwxxxddd F June 30, 2019, 6:03 p.m. OK GNU C++17 TESTS 39 187 5632000 2600
57713391 zhushaoben F July 25, 2019, 1:28 a.m. OK GNU C++17 TESTS 39 187 6451200 2600
56416101 Jefe F July 2, 2019, 4:43 a.m. OK GNU C++17 TESTS 39 187 6451200 2600
56433861 grand_zeno F July 2, 2019, 1:16 p.m. OK GNU C++17 TESTS 39 187 7987200 2600
59509322 jiangly F Aug. 26, 2019, 7:22 a.m. OK GNU C++17 TESTS 39 202 3174400 2600
56410873 savinov F July 1, 2019, 11:38 p.m. OK Go TESTS 39 1668 9830400 2600
58146897 Darth_Jar_Jar_Binks F Aug. 1, 2019, 10:23 p.m. OK Java 8 TESTS 39 312 10854400 2600
66185460 dalt F Dec. 2, 2019, 2:19 p.m. OK Java 8 TESTS 39 389 19251200 2600
58145022 lpm F Aug. 1, 2019, 8:26 p.m. OK Java 8 TESTS 39 436 16896000 2600
56363470 uwi F June 30, 2019, 8:42 p.m. OK Java 8 TESTS 39 468 0 2600
56408086 armking F July 1, 2019, 8:47 p.m. OK Java 8 TESTS 39 545 18432000 2600
56531843 Andreus F July 4, 2019, 8:15 p.m. OK Java 8 TESTS 39 592 14848000 2600
61951538 derrick20 F Oct. 6, 2019, 3:44 a.m. OK Java 8 TESTS 39 716 0 2600
56460070 AnandOza F July 3, 2019, 6:24 a.m. OK Java 8 TESTS 39 717 25292800 2600
56345047 AkshajK F June 30, 2019, 5:08 p.m. OK Java 8 TESTS 39 1996 10956800 2600
59254505 Spheniscine F Aug. 22, 2019, 5:58 a.m. OK Kotlin TESTS 39 779 26419200 2600
59254370 Spheniscine F Aug. 22, 2019, 5:54 a.m. OK Kotlin TESTS 39 826 26316800 2600
56607071 Tlatoani F July 6, 2019, 5:23 a.m. OK Kotlin TESTS 39 998 5836800 2600
56458445 Tlatoani F July 3, 2019, 5:32 a.m. OK Kotlin TESTS 39 1200 6246400 2600
56549009 AleksanderBalobanov F July 5, 2019, 8:52 a.m. OK MS C++ 2017 TESTS 39 1309 3993600 2600
58925565 Helli.code F Aug. 16, 2019, 7:18 p.m. OK PyPy 2 TESTS 39 1092 36454400 2600
56419103 pineriver F July 2, 2019, 6:27 a.m. OK PyPy 3 TESTS 39 1466 42700800 2600
56374245 Pokeylope F July 1, 2019, 5:46 a.m. OK PyPy 3 TESTS 39 1528 23552000 2600
61062255 sansen F Sept. 22, 2019, 9:50 a.m. OK Rust TESTS 39 249 12595200 2600

remove filters

Back to search problems