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 159893699 Oct. 24, 2019, 3:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2363 ) E1 Voting (Easy Version) PROGRAMMING data structures dp greedy 2200

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 <= 5000 ) -- the number of test cases. The first line of each test case contains one integer n ( 1 <= n <= 5000 ) -- 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 5000 . 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 have to buy votes of th"...

Tutorials

70860

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
64087053 453908766 E1 Nov. 2, 2019, 11:39 a.m. OK Clang++17 Diagnostics TESTS 16 61 10444800 2200
63332883 rainboy E1 Oct. 24, 2019, 4:42 p.m. OK GNU C11 TESTS 16 31 3993600 2200
63346456 Chipe1 E1 Oct. 24, 2019, 7:29 p.m. OK GNU C11 TESTS 16 78 1638400 2200
63356719 chdyFZH E1 Oct. 25, 2019, 3:08 a.m. OK GNU C++11 TESTS 16 15 307200 2200
63360974 Setsumi E1 Oct. 25, 2019, 5:39 a.m. OK GNU C++11 TESTS 16 15 64512000 2200
63343884 glpstkf E1 Oct. 24, 2019, 6:32 p.m. OK GNU C++11 TESTS 16 30 102400 2200
63371418 kaodigua E1 Oct. 25, 2019, 9:30 a.m. OK GNU C++11 TESTS 16 30 2560000 2200
63759539 eatingmore E1 Oct. 30, 2019, 2:42 a.m. OK GNU C++11 TESTS 16 30 2560000 2200
64206989 FrostStar E1 Nov. 4, 2019, 1:09 p.m. OK GNU C++11 TESTS 16 30 2560000 2200
64145334 D_14134 E1 Nov. 3, 2019, 9:41 a.m. OK GNU C++11 TESTS 16 30 2662400 2200
63696993 handsome_zlk E1 Oct. 29, 2019, 5:51 a.m. OK GNU C++11 TESTS 16 30 3379200 2200
64563526 M_sea E1 Nov. 9, 2019, 6:54 a.m. OK GNU C++11 TESTS 16 30 4096000 2200
63336235 arcanae E1 Oct. 24, 2019, 4:58 p.m. OK GNU C++11 TESTS 16 30 4096000 2200
63352303 madlad E1 Oct. 24, 2019, 11:01 p.m. OK GNU C++14 TESTS 16 15 307200 2200
63327342 Linkus E1 Oct. 24, 2019, 4:16 p.m. OK GNU C++14 TESTS 16 15 307200 2200
63370424 nweeks E1 Oct. 25, 2019, 9:09 a.m. OK GNU C++14 TESTS 16 15 307200 2200
63849724 follower0523 E1 Oct. 30, 2019, 3:22 p.m. OK GNU C++14 TESTS 16 15 307200 2200
63624735 harsh1599 E1 Oct. 28, 2019, 2:44 a.m. OK GNU C++14 TESTS 16 15 409600 2200
63355604 HanTroid E1 Oct. 25, 2019, 2:21 a.m. OK GNU C++14 TESTS 16 15 512000 2200
66676431 SugA E1 Dec. 12, 2019, 11:29 a.m. OK GNU C++14 TESTS 16 15 512000 2200
66244313 marcOS E1 Dec. 3, 2019, 7:39 p.m. OK GNU C++14 TESTS 16 15 512000 2200
63507621 prashiksahare110044 E1 Oct. 26, 2019, 7:17 p.m. OK GNU C++14 TESTS 16 15 512000 2200
63338497 A.Magdy7 E1 Oct. 24, 2019, 5:09 p.m. OK GNU C++14 TESTS 16 15 512000 2200
63335075 jdh E1 Oct. 24, 2019, 4:52 p.m. OK GNU C++17 TESTS 16 15 204800 2200
63327301 teapotd E1 Oct. 24, 2019, 4:16 p.m. OK GNU C++17 TESTS 16 15 204800 2200
63352628 TheOneYouWant E1 Oct. 24, 2019, 11:23 p.m. OK GNU C++17 TESTS 16 15 307200 2200
64148959 maxan E1 Nov. 3, 2019, 10:47 a.m. OK GNU C++17 TESTS 16 15 307200 2200
63358249 Krato E1 Oct. 25, 2019, 4:03 a.m. OK GNU C++17 TESTS 16 15 307200 2200
64063906 liuxingyuan E1 Nov. 2, 2019, 5:03 a.m. OK GNU C++17 TESTS 16 15 307200 2200
65339069 hi_allerria E1 Nov. 19, 2019, 10:14 a.m. OK GNU C++17 TESTS 16 15 409600 2200
63394376 HanaYukii E1 Oct. 25, 2019, 4:12 p.m. OK GNU C++17 TESTS 16 15 409600 2200
63435350 LowR E1 Oct. 26, 2019, 10:30 a.m. OK GNU C++17 TESTS 16 15 512000 2200
63532289 IT_MACHINE E1 Oct. 27, 2019, 7:04 a.m. OK GNU C++17 TESTS 16 15 512000 2200
65271013 FKint E1 Nov. 17, 2019, 7:46 p.m. OK Haskell TESTS 16 46 102400 2200
68051928 MaxHeap E1 Jan. 1, 2020, 7:21 p.m. OK Java 11 TESTS 16 171 0 2200
64303441 IslamTalipovTop E1 Nov. 5, 2019, 10:48 a.m. OK Java 11 TESTS 16 187 0 2200
64558105 lpls1 E1 Nov. 9, 2019, 4:53 a.m. OK Java 11 TESTS 16 202 0 2200
63752979 TheSawan E1 Oct. 29, 2019, 9:19 p.m. OK Java 11 TESTS 16 202 0 2200
63346400 Dukkha E1 Oct. 24, 2019, 7:28 p.m. OK Java 11 TESTS 16 218 102400 2200
65343293 potatmen E1 Nov. 19, 2019, 11:44 a.m. OK Java 11 TESTS 16 483 263782400 2200
64724609 satya26 E1 Nov. 12, 2019, 5:55 a.m. OK Java 8 TESTS 16 124 0 2200
63347231 Harpae E1 Oct. 24, 2019, 7:48 p.m. OK Java 8 TESTS 16 124 0 2200
63334320 toshihoge E1 Oct. 24, 2019, 4:49 p.m. OK Java 8 TESTS 16 139 0 2200
69542891 beginner1010 E1 Jan. 25, 2020, 11:01 p.m. OK Java 8 TESTS 16 140 0 2200
63350124 phantom11 E1 Oct. 24, 2019, 9:17 p.m. OK Java 8 TESTS 16 140 0 2200
63336092 zakharJ E1 Oct. 24, 2019, 4:57 p.m. OK Java 8 TESTS 16 155 0 2200
63327648 dalt E1 Oct. 24, 2019, 4:17 p.m. OK Java 8 TESTS 16 155 0 2200
63727789 procrastinate7 E1 Oct. 29, 2019, 1:09 p.m. OK Java 8 TESTS 16 156 0 2200
63337723 NinjaDoggy E1 Oct. 24, 2019, 5:04 p.m. OK Java 8 TESTS 16 156 0 2200
63334775 martins E1 Oct. 24, 2019, 4:51 p.m. OK Java 8 TESTS 16 171 0 2200
63413280 Spheniscine E1 Oct. 26, 2019, 2:28 a.m. OK Kotlin TESTS 16 155 307200 2200
69457710 mban259 E1 Jan. 24, 2020, 9:20 a.m. OK Mono C# TESTS 16 78 6451200 2200
63333059 Yupiteru E1 Oct. 24, 2019, 4:42 p.m. OK Mono C# TESTS 16 93 141209600 2200
63422389 vjudge5 E1 Oct. 26, 2019, 6:49 a.m. OK MS C++ TESTS 16 31 5017600 2200
64632226 vjudge5 E1 Nov. 10, 2019, 10:31 a.m. OK MS C++ TESTS 16 46 3276800 2200
63759215 taekop E1 Oct. 30, 2019, 2:24 a.m. OK MS C++ 2017 TESTS 16 31 307200 2200
63331581 MrLolthe1st E1 Oct. 24, 2019, 4:35 p.m. OK MS C++ 2017 TESTS 16 31 307200 2200
63365421 AleksanderBalobanov E1 Oct. 25, 2019, 7:17 a.m. OK MS C++ 2017 TESTS 16 31 2662400 2200
63331592 Friska E1 Oct. 24, 2019, 4:35 p.m. OK MS C++ 2017 TESTS 16 46 409600 2200
63488465 Prokopiy E1 Oct. 26, 2019, 2:06 p.m. OK MS C++ 2017 TESTS 16 46 614400 2200
63341179 pajenegod E1 Oct. 24, 2019, 5:42 p.m. OK PyPy 2 TESTS 16 155 3072000 2200
63341374 MVP E1 Oct. 24, 2019, 5:45 p.m. OK PyPy 2 TESTS 16 405 6656000 2200
67498682 tycyd E1 Dec. 24, 2019, 2:20 a.m. OK PyPy 3 TESTS 16 202 5734400 2200
69871957 mitribunskiy E1 Jan. 31, 2020, 12:51 a.m. OK PyPy 3 TESTS 16 218 5017600 2200
63339435 neterukun E1 Oct. 24, 2019, 5:18 p.m. OK PyPy 3 TESTS 16 343 9318400 2200
65492127 buchannon1 E1 Nov. 21, 2019, 3:05 p.m. OK PyPy 3 TESTS 16 358 8192000 2200
63333368 hwergelmir E1 Oct. 24, 2019, 4:44 p.m. OK Python 3 TESTS 16 155 614400 2200
63740031 titia E1 Oct. 29, 2019, 4:37 p.m. OK Python 3 TESTS 16 155 819200 2200
63336895 komolakanto E1 Oct. 24, 2019, 5:01 p.m. OK Python 3 TESTS 16 156 1331200 2200
66865140 sritha E1 Dec. 14, 2019, 12:50 p.m. OK Python 3 TESTS 16 186 614400 2200
63326290 tobias.glimmerfors E1 Oct. 24, 2019, 4:12 p.m. OK Python 3 TESTS 16 186 921600 2200
63335851 alpha_virginis E1 Oct. 24, 2019, 4:56 p.m. OK Rust TESTS 16 31 409600 2200
63350302 sansen E1 Oct. 24, 2019, 9:23 p.m. OK Rust TESTS 16 31 614400 2200
64671120 folen E1 Nov. 11, 2019, 5:57 a.m. OK Rust TESTS 16 46 614400 2200
63368484 yoshrc E1 Oct. 25, 2019, 8:27 a.m. OK Rust TESTS 16 452 403251200 2200
63339392 yakamoto E1 Oct. 24, 2019, 5:18 p.m. OK Scala TESTS 16 655 0 2200

remove filters

Back to search problems