Educational Codeforces Round 87 (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
1354 Educational Codeforces Round 87 (Rated for Div. 2) FINISHED False 7200 142115999 May 17, 2020, 9:20 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1236 ) F Summoning Minions PROGRAMMING constructive algorithms dp flows graph matchings greedy sortings 2500

B"Polycarp plays a computer game. In this game, the players summon armies of magical minions, which then fight each other. Polycarp can summon n different minions. The initial power level of the i -th minion is a_i , and when it is summoned, all previously summoned minions' power levels are increased by b_i . The minions can be summoned in any order. Unfortunately, Polycarp cannot have more than k minions under his control. To get rid of unwanted minions after summoning them, he may destroy them. Each minion can be summoned (and destroyed) only once. Polycarp's goal is to summon the strongest possible army. Formally, he wants to maximize the sum of power levels of all minions under his control (those which are summoned and not destroyed). Help Polycarp to make up a plan of actions to summon the strongest possible army! The first line contains one integer T ( 1 <= T <= 75 ) -- the number of test cases. Each test case begins with a line containing two integers n and k ( 1 <= k <= n <= 75 ) -- the number of minions availible for summoning, and the maximum number of minions that can be controlled by Polycarp, respectively. Then n lines follow, the i -th line contains 2 integers a_i and b_i ( 1 <= a_i <= 10^5 , 0 <= b_i <= 10^5 ) -- the parameters of the i -th minion. For each test case print the optimal sequence of actions as follows: Firstly, print m -- the number of actions which Polycarp has to perform ( 0 <= m <= 2n ). Then print m integers o_1 , o_2 , ..., o_m , where o_i denotes the i -th action as follows: if the i -th action is to summon the minion x , then o_i = x , and if the i -th action is to destroy the minion x , then o_i = -x . Each minion can be summoned at most once and cannot be destroyed before being summoned (and, obviously, cannot be destroyed more than once). T"...

Tutorials

77593

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
81703753 howardyang F May 28, 2020, 12:18 p.m. OK GNU C++11 TESTS 94 31 102400 2500
81587451 WULI F May 27, 2020, 6:22 a.m. OK GNU C++11 TESTS 94 31 102400 2500
81587005 WULI F May 27, 2020, 6:16 a.m. OK GNU C++11 TESTS 94 31 102400 2500
81570684 ysy20021208 F May 27, 2020, 12:44 a.m. OK GNU C++11 TESTS 94 31 102400 2500
81421305 18380120126 F May 25, 2020, 8:54 p.m. OK GNU C++11 TESTS 94 31 102400 2500
81380562 TrivialMan F May 25, 2020, 12:07 p.m. OK GNU C++11 TESTS 94 31 102400 2500
81280534 Harry_bh F May 24, 2020, 2:55 p.m. OK GNU C++11 TESTS 94 31 102400 2500
80943985 tejeshreddy F May 22, 2020, 2:47 p.m. OK GNU C++11 TESTS 94 31 102400 2500
80815629 msuwakow F May 21, 2020, 2:35 a.m. OK GNU C++11 TESTS 94 31 102400 2500
80747347 luogu_bot4 F May 20, 2020, 6:45 a.m. OK GNU C++11 TESTS 94 31 102400 2500
80672907 frost_ F May 19, 2020, 9:26 a.m. OK GNU C++14 TESTS 93 31 204800 2500
81388210 ..vince F May 25, 2020, 1:38 p.m. OK GNU C++14 TESTS 94 31 307200 2500
81426937 AkaiLemon F May 26, 2020, 12:31 a.m. OK GNU C++14 TESTS 94 31 409600 2500
80895260 _dawn F May 22, 2020, 2:02 a.m. OK GNU C++14 TESTS 94 31 512000 2500
80681993 mtnshh F May 19, 2020, 11:28 a.m. OK GNU C++14 TESTS 93 31 512000 2500
80618605 Devil F May 18, 2020, 3:44 p.m. OK GNU C++14 TESTS 93 31 4096000 2500
80723188 nikolapesic2802 F May 19, 2020, 7:47 p.m. OK GNU C++14 TESTS 94 46 0 2500
80625459 njrafi F May 18, 2020, 5:03 p.m. OK GNU C++14 TESTS 93 46 0 2500
80619370 jk89 F May 18, 2020, 3:52 p.m. OK GNU C++14 TESTS 93 46 102400 2500
80728837 silxi F May 19, 2020, 10:16 p.m. OK GNU C++14 TESTS 94 46 204800 2500
80715145 efyjef F May 19, 2020, 5:48 p.m. OK GNU C++17 TESTS 94 31 0 2500
80912083 codekode F May 22, 2020, 7:41 a.m. OK GNU C++17 TESTS 94 31 102400 2500
80750930 kal0rona F May 20, 2020, 7:40 a.m. OK GNU C++17 TESTS 94 31 102400 2500
80825574 Myrcella F May 21, 2020, 6:31 a.m. OK GNU C++17 TESTS 94 31 204800 2500
80802009 Enkognit F May 20, 2020, 7:13 p.m. OK GNU C++17 TESTS 94 31 204800 2500
80799840 mat_v F May 20, 2020, 6:37 p.m. OK GNU C++17 TESTS 94 31 204800 2500
80794202 sayeedt F May 20, 2020, 5:14 p.m. OK GNU C++17 TESTS 94 31 204800 2500
80736718 Ali.Kh F May 20, 2020, 3:03 a.m. OK GNU C++17 TESTS 94 31 204800 2500
80702669 dantrag F May 19, 2020, 3:17 p.m. OK GNU C++17 TESTS 93 31 204800 2500
80956130 TheLurkingStarman F May 22, 2020, 5:09 p.m. OK GNU C++17 TESTS 94 31 307200 2500
80851509 wassim.omais F May 21, 2020, 12:30 p.m. OK GNU C++17 (64) TESTS 94 31 0 2500
80783589 TheSawan F May 20, 2020, 3 p.m. OK GNU C++17 (64) TESTS 94 31 0 2500
81691813 MrBrionix F May 28, 2020, 9:45 a.m. OK GNU C++17 (64) TESTS 94 31 102400 2500
81030047 ivan100sic F May 23, 2020, 4:10 p.m. OK GNU C++17 (64) TESTS 94 31 102400 2500
80965195 Jester F May 22, 2020, 7:21 p.m. OK GNU C++17 (64) TESTS 94 31 102400 2500
80882306 dna049 F May 21, 2020, 7:02 p.m. OK GNU C++17 (64) TESTS 94 31 102400 2500
80806556 yashvardhan29 F May 20, 2020, 8:46 p.m. OK GNU C++17 (64) TESTS 94 31 102400 2500
80762781 autoint F May 20, 2020, 10:27 a.m. OK GNU C++17 (64) TESTS 94 31 102400 2500
80736162 Diegogrc F May 20, 2020, 2:51 a.m. OK GNU C++17 (64) TESTS 94 31 102400 2500
80680525 hubz F May 19, 2020, 11:10 a.m. OK GNU C++17 (64) TESTS 93 31 102400 2500
81428548 Richard727 F May 26, 2020, 1:27 a.m. OK Java 11 TESTS 94 202 0 2500
80783544 TheSawan F May 20, 2020, 3 p.m. OK Java 11 TESTS 94 218 0 2500
80701328 egaeus.code F May 19, 2020, 3:04 p.m. OK Java 11 TESTS 93 2761 409600 2500
80807925 TheSawan F May 20, 2020, 9:27 p.m. OK Java 11 TESTS 94 4788 921600 2500
80739440 MagentaCobra F May 20, 2020, 4:15 a.m. OK Java 8 TESTS 94 140 0 2500
80547460 ijxjdjd F May 17, 2020, 6:40 p.m. OK Java 8 TESTS 93 140 21606400 2500
80678998 PizzaLovers007 F May 19, 2020, 10:50 a.m. OK Java 8 TESTS 93 171 0 2500
81702246 out_of_the_box F May 28, 2020, noon OK Java 8 TESTS 94 218 614400 2500
80548512 you.maxwell F May 17, 2020, 6:57 p.m. OK Java 8 TESTS 93 467 22528000 2500
80980229 Spheniscine F May 23, 2020, 3:25 a.m. OK Kotlin TESTS 94 156 1536000 2500
80976736 Spheniscine F May 23, 2020, 1:14 a.m. OK Kotlin TESTS 94 171 1536000 2500
80566513 Tlatoani F May 18, 2020, 3:47 a.m. OK Kotlin TESTS 93 467 23244800 2500
80708950 aberent F May 19, 2020, 4:31 p.m. OK PyPy 3 TESTS 93 218 5427200 2500
80614103 lucifer1004 F May 18, 2020, 2:59 p.m. OK PyPy 3 TESTS 93 342 29286400 2500
80871893 zayaz777 F May 21, 2020, 4:32 p.m. OK PyPy 3 TESTS 94 857 10547200 2500
80687875 mkawa2 F May 19, 2020, 12:40 p.m. OK PyPy 3 TESTS 93 2511 16486400 2500
80753853 nebocco F May 20, 2020, 8:24 a.m. OK Python 3 TESTS 94 342 307200 2500
80784663 kobae964 F May 20, 2020, 3:14 p.m. OK Rust TESTS 94 46 716800 2500
80670404 sansen F May 19, 2020, 8:50 a.m. OK Rust TESTS 93 62 512000 2500

remove filters

Back to search problems