Educational Codeforces Round 75 (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
1251 Educational Codeforces Round 75 (Rated for Div. 2) FINISHED False 7200 165509687 Oct. 24, 2019, 3:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2722 ) E2 Voting (Hard Version) PROGRAMMING binary search data structures greedy 2300

B"The only difference between easy and hard versions is constraints. Now elections are held in Berland and you want to win them. More precisely, you want everyone to vote for you. There are n voters, and two ways to convince each of them to vote for you. The first way to convince the i -th voter is to pay him p_i coins. The second way is to make m_i other voters vote for you, and the i -th voter will vote for free. Moreover, the process of such voting takes place in several steps. For example, if there are five voters with m_1 = 1 , m_2 = 2 , m_3 = 2 , m_4 = 4 , m_5 = 5 , then you can buy the vote of the fifth voter, and eventually everyone will vote for you. Set of people voting for you will change as follows: {5} rightarrow {1, 5} rightarrow {1, 2, 3, 5} rightarrow {1, 2, 3, 4, 5} . Calculate the minimum number of coins you have to spend so that everyone votes for you. The first line contains one integer t ( 1 <= t <= 2 cdot 10^5 ) -- the number of test cases. The first line of each test case contains one integer n ( 1 <= n <= 2 cdot 10^5 ) -- the number of voters. The next n lines contains the description of voters. i -th line contains two integers m_i and p_i ( 1 <= p_i <= 10^9, 0 <= m_i < n ). It is guaranteed that the sum of all n over all test cases does not exceed 2 cdot 10^5 . For each test case print one integer -- the minimum number of coins you have to spend so that everyone votes for you. In the first test case you have to buy vote of the third voter. Then the set of people voting for you will change as follows: {3} rightarrow {1, 3} rightarrow {1, 2, 3} . In the second example you don't need to buy votes. The set of people voting for you will change as follows: {1} rightarrow {1, 3, 5} rightarrow {1, 2, 3, 5} rightarrow {1, 2, 3, 5, 6, 7} rightarrow {1, 2, 3, 4, 5, 6, 7} . In the third test case you"...

Tutorials

70860

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
64087290 453908766 E2 Nov. 2, 2019, 11:43 a.m. OK Clang++17 Diagnostics TESTS 23 577 18739200 2300
63332845 rainboy E2 Oct. 24, 2019, 4:41 p.m. OK GNU C11 TESTS 23 701 3993600 2300
66311849 vjudge3 E2 Dec. 5, 2019, 11:43 a.m. OK GNU C++11 TESTS 23 46 3174400 2300
64150634 zxynothing E2 Nov. 3, 2019, 11:17 a.m. OK GNU C++11 TESTS 23 46 6144000 2300
64339213 jiaangk_ E2 Nov. 6, 2019, 1 a.m. OK GNU C++11 TESTS 23 46 6144000 2300
64563666 M_sea E2 Nov. 9, 2019, 6:56 a.m. OK GNU C++11 TESTS 23 46 7782400 2300
66312025 vjudge4 E2 Dec. 5, 2019, 11:46 a.m. OK GNU C++11 TESTS 23 61 3174400 2300
63666529 Heartbeat666 E2 Oct. 28, 2019, 3:31 p.m. OK GNU C++11 TESTS 23 61 6144000 2300
63666535 luogu_bot3 E2 Oct. 28, 2019, 3:31 p.m. OK GNU C++11 TESTS 23 61 6144000 2300
63575736 luogu_bot4 E2 Oct. 27, 2019, 3:55 p.m. OK GNU C++11 TESTS 23 61 6246400 2300
63720852 Dilute E2 Oct. 29, 2019, 11:19 a.m. OK GNU C++11 TESTS 23 61 6246400 2300
64567354 M_sea E2 Nov. 9, 2019, 8:03 a.m. OK GNU C++11 TESTS 23 61 7782400 2300
63414861 BeNoble E2 Oct. 26, 2019, 3:26 a.m. OK GNU C++14 TESTS 23 78 6451200 2300
63339860 tokitsukaze E2 Oct. 24, 2019, 5:23 p.m. OK GNU C++14 TESTS 23 109 9932800 2300
63339768 KaguraNana E2 Oct. 24, 2019, 5:22 p.m. OK GNU C++14 TESTS 23 109 9932800 2300
63629604 merzat E2 Oct. 28, 2019, 5:46 a.m. OK GNU C++14 TESTS 23 124 3174400 2300
63510197 gauss14 E2 Oct. 26, 2019, 8:12 p.m. OK GNU C++14 TESTS 23 124 3174400 2300
63334175 HIT_MKER E2 Oct. 24, 2019, 4:48 p.m. OK GNU C++14 TESTS 23 124 4812800 2300
63924021 renbohan E2 Oct. 31, 2019, 12:32 p.m. OK GNU C++14 TESTS 23 124 6348800 2300
68960899 _HonEy E2 Jan. 17, 2020, 12:40 a.m. OK GNU C++14 TESTS 23 124 6348800 2300
63331884 cdkplay E2 Oct. 24, 2019, 4:37 p.m. OK GNU C++14 TESTS 23 124 6451200 2300
63327409 Linkus E2 Oct. 24, 2019, 4:16 p.m. OK GNU C++14 TESTS 23 124 8192000 2300
63399248 neal E2 Oct. 25, 2019, 5:43 p.m. OK GNU C++17 TESTS 23 46 5734400 2300
63399662 neal E2 Oct. 25, 2019, 5:52 p.m. OK GNU C++17 TESTS 23 61 4915200 2300
63399098 neal E2 Oct. 25, 2019, 5:40 p.m. OK GNU C++17 TESTS 23 61 5734400 2300
63398546 neal E2 Oct. 25, 2019, 5:29 p.m. OK GNU C++17 TESTS 23 62 3276800 2300
63399693 neal E2 Oct. 25, 2019, 5:53 p.m. OK GNU C++17 TESTS 23 62 4915200 2300
64521568 qrfkickit E2 Nov. 8, 2019, 12:30 p.m. OK GNU C++17 TESTS 23 109 7884800 2300
63381675 Aphelios E2 Oct. 25, 2019, 12:39 p.m. OK GNU C++17 TESTS 23 109 7987200 2300
68076773 iaNTU E2 Jan. 2, 2020, 12:51 p.m. OK GNU C++17 TESTS 23 124 3174400 2300
63396599 Vani E2 Oct. 25, 2019, 4:52 p.m. OK GNU C++17 TESTS 23 124 3174400 2300
63361449 Star-Platinum E2 Oct. 25, 2019, 5:50 a.m. OK GNU C++17 TESTS 23 124 3174400 2300
65271038 FKint E2 Nov. 17, 2019, 7:47 p.m. OK Haskell TESTS 23 982 47411200 2300
68051945 MaxHeap E2 Jan. 1, 2020, 7:21 p.m. OK Java 11 TESTS 23 311 18534400 2300
64303497 IslamTalipovTop E2 Nov. 5, 2019, 10:49 a.m. OK Java 11 TESTS 23 358 6144000 2300
63752997 TheSawan E2 Oct. 29, 2019, 9:19 p.m. OK Java 11 TESTS 23 436 15667200 2300
63346384 Dukkha E2 Oct. 24, 2019, 7:28 p.m. OK Java 11 TESTS 23 764 6553600 2300
64558520 lpls1 E2 Nov. 9, 2019, 5:05 a.m. OK Java 11 TESTS 23 1481 18329600 2300
63364285 avijit_agarwal E2 Oct. 25, 2019, 6:54 a.m. OK Java 8 TESTS 23 248 18432000 2300
63327501 dalt E2 Oct. 24, 2019, 4:17 p.m. OK Java 8 TESTS 23 249 6144000 2300
63346023 Harpae E2 Oct. 24, 2019, 7:18 p.m. OK Java 8 TESTS 23 280 5222400 2300
63334539 toshihoge E2 Oct. 24, 2019, 4:50 p.m. OK Java 8 TESTS 23 280 12902400 2300
63727827 procrastinate7 E2 Oct. 29, 2019, 1:10 p.m. OK Java 8 TESTS 23 326 4915200 2300
63433963 vjvjain0 E2 Oct. 26, 2019, 9:59 a.m. OK Java 8 TESTS 23 327 5324800 2300
69542898 beginner1010 E2 Jan. 25, 2020, 11:02 p.m. OK Java 8 TESTS 23 327 18432000 2300
64724547 satya26 E2 Nov. 12, 2019, 5:53 a.m. OK Java 8 TESTS 23 358 13926400 2300
63541208 yaoct E2 Oct. 27, 2019, 9:23 a.m. OK Java 8 TESTS 23 389 31846400 2300
63350115 phantom11 E2 Oct. 24, 2019, 9:17 p.m. OK Java 8 TESTS 23 389 31948800 2300
63413314 Spheniscine E2 Oct. 26, 2019, 2:29 a.m. OK Kotlin TESTS 23 312 5120000 2300
69457732 mban259 E2 Jan. 24, 2020, 9:21 a.m. OK Mono C# TESTS 23 311 25395200 2300
63333165 Yupiteru E2 Oct. 24, 2019, 4:43 p.m. OK Mono C# TESTS 23 530 157184000 2300
69848939 ngtkana E2 Jan. 30, 2020, 3:03 p.m. OK Mono C# TESTS 23 1466 18432000 2300
65615121 vjudge2 E2 Nov. 24, 2019, 2:57 a.m. OK MS C++ TESTS 23 124 8704000 2300
63422447 vjudge2 E2 Oct. 26, 2019, 6:50 a.m. OK MS C++ TESTS 23 124 10854400 2300
63492919 vjudge4 E2 Oct. 26, 2019, 2:48 p.m. OK MS C++ TESTS 23 140 8704000 2300
65025954 vjudge3 E2 Nov. 15, 2019, 7:41 a.m. OK MS C++ TESTS 23 795 7168000 2300
63759210 taekop E2 Oct. 30, 2019, 2:24 a.m. OK MS C++ 2017 TESTS 23 249 12288000 2300
63655701 Tom_smith E2 Oct. 28, 2019, 12:38 p.m. OK MS C++ 2017 TESTS 23 249 12902400 2300
63331664 MrLolthe1st E2 Oct. 24, 2019, 4:36 p.m. OK MS C++ 2017 TESTS 23 514 13107200 2300
63488649 Prokopiy E2 Oct. 26, 2019, 2:07 p.m. OK MS C++ 2017 TESTS 23 670 17920000 2300
63365386 AleksanderBalobanov E2 Oct. 25, 2019, 7:17 a.m. OK MS C++ 2017 TESTS 23 872 4198400 2300
63331395 Friska E2 Oct. 24, 2019, 4:35 p.m. OK MS C++ 2017 TESTS 23 1122 11468800 2300
63341187 pajenegod E2 Oct. 24, 2019, 5:42 p.m. OK PyPy 2 TESTS 23 483 33075200 2300
65930865 yumtam E2 Nov. 28, 2019, 8:59 p.m. OK PyPy 2 TESTS 23 982 36147200 2300
63341451 MVP E2 Oct. 24, 2019, 5:46 p.m. OK PyPy 2 TESTS 23 1013 36761600 2300
65689428 buchannon1 E2 Nov. 25, 2019, 3:32 a.m. OK PyPy 3 TESTS 23 467 33792000 2300
63337487 komolakanto E2 Oct. 24, 2019, 5:03 p.m. OK PyPy 3 TESTS 23 857 41267200 2300
67498694 tycyd E2 Dec. 24, 2019, 2:21 a.m. OK PyPy 3 TESTS 23 1216 37683200 2300
69871940 mitribunskiy E2 Jan. 31, 2020, 12:50 a.m. OK PyPy 3 TESTS 23 1247 14540800 2300
63339594 neterukun E2 Oct. 24, 2019, 5:20 p.m. OK PyPy 3 TESTS 23 1248 29593600 2300
63739676 titia E2 Oct. 29, 2019, 4:30 p.m. OK Python 3 TESTS 23 1435 23449600 2300
63350285 sansen E2 Oct. 24, 2019, 9:23 p.m. OK Rust TESTS 23 77 10547200 2300
63335979 alpha_virginis E2 Oct. 24, 2019, 4:57 p.m. OK Rust TESTS 23 108 10342400 2300
63434506 yakamoto E2 Oct. 26, 2019, 10:12 a.m. OK Scala TESTS 23 717 32665600 2300

remove filters

Back to search problems