Mail.Ru Cup 2018 Round 3

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
1056 Mail.Ru Cup 2018 Round 3 FINISHED False 9000 194361923 Nov. 25, 2018, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2421 ) C Pick Heroes PROGRAMMING greedy implementation interactive sortings 1700

B"If you say that Arkady is a bit old-fashioned playing checkers, you won't be right. There is also a modern computer game Arkady and his friends are keen on. We won't discuss its rules, the only feature important to this problem is that each player has to pick a distinct hero in the beginning of the game. There are 2 teams each having n players and 2n heroes to distribute between the teams. The teams take turns picking heroes: at first, the first team chooses a hero in its team, after that the second team chooses a hero and so on. Note that after a hero is chosen it becomes unavailable to both teams. The friends estimate the power of the i -th of the heroes as p_i . Each team wants to maximize the total power of its heroes. However, there is one exception: there are m pairs of heroes that are especially strong against each other, so when any team chooses a hero from such a pair, the other team must choose the other one on its turn. Each hero is in at most one such pair. This is an interactive problem. You are to write a program that will optimally choose the heroes for one team, while the jury's program will play for the other team. Note that the jury's program may behave inefficiently, in this case you have to take the opportunity and still maximize the total power of your team. Formally, if you ever have chance to reach the total power of q or greater regardless of jury's program choices, you must get q or greater to pass a test. The first line contains two integers n and m ( 1 <= n <= 10^3 , 0 <= m <= n ) -- the number of players in one team and the number of special pairs of heroes. The second line contains 2n integers p_1, p_2, ldots, p_{2n} ( 1 <= p_i <= 10^3 ) -- the powers of the heroes. Each of the next m lines contains two integer a and b ( 1 <= a, b <= 2n , a ne b ) -- a pair of heroes that are especially strong against ea"...

Tutorials

Mail.Ru Cup 2018 Round 3 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
46995763 Khanh_Moriaty C Dec. 14, 2018, 8:21 a.m. OK FPC TESTS 37 46 204800 1700
46230598 DedMartyn C Nov. 25, 2018, 8:33 p.m. OK GNU C11 TESTS 37 31 0 1700
46225972 Horcrux1729 C Nov. 25, 2018, 6:50 p.m. OK GNU C11 TESTS 37 62 0 1700
54080954 vjudge1 C May 14, 2019, 3:01 a.m. OK GNU C++11 TESTS 37 31 0 1700
50048553 vjudge2 C Feb. 17, 2019, 7:07 a.m. OK GNU C++11 TESTS 37 31 0 1700
50046903 vjudge5 C Feb. 17, 2019, 6:24 a.m. OK GNU C++11 TESTS 37 31 0 1700
48707735 2016wudi C Jan. 22, 2019, 6:50 a.m. OK GNU C++11 TESTS 37 31 0 1700
47248006 _ShadowSong C Dec. 19, 2018, 6:52 a.m. OK GNU C++11 TESTS 37 31 0 1700
46394960 201724114130 C Nov. 30, 2018, 8:37 a.m. OK GNU C++11 TESTS 37 31 0 1700
57736456 py_ultron C July 25, 2019, 10:05 a.m. OK GNU C++11 TESTS 37 31 0 1700
56689548 mmmod_lqs C July 8, 2019, 2:40 a.m. OK GNU C++11 TESTS 37 31 0 1700
54841660 Frame233 C May 30, 2019, 1:07 p.m. OK GNU C++11 TESTS 37 31 0 1700
69802694 duality C Jan. 29, 2020, 11:34 p.m. OK GNU C++11 TESTS 37 31 0 1700
46218220 igorqs C Nov. 25, 2018, 5:35 p.m. OK GNU C++14 TESTS 37 31 0 1700
46217787 sempav C Nov. 25, 2018, 5:32 p.m. OK GNU C++14 TESTS 37 31 0 1700
46463740 dhaw92 C Dec. 1, 2018, 11:11 p.m. OK GNU C++14 TESTS 37 31 0 1700
46240273 jack.2 C Nov. 26, 2018, 7:24 a.m. OK GNU C++14 TESTS 37 31 0 1700
46262875 Danylo99 C Nov. 26, 2018, 9:49 p.m. OK GNU C++14 TESTS 37 31 102400 1700
46221286 flash_7 C Nov. 25, 2018, 6:04 p.m. OK GNU C++14 TESTS 37 31 102400 1700
49899077 borametz C Feb. 14, 2019, 8:24 a.m. OK GNU C++14 TESTS 37 31 102400 1700
46347051 21August C Nov. 28, 2018, 6:45 p.m. OK GNU C++14 TESTS 37 31 102400 1700
52597315 rasalghul C April 11, 2019, 9:52 a.m. OK GNU C++14 TESTS 37 31 204800 1700
46224928 gosipov C Nov. 25, 2018, 6:39 p.m. OK GNU C++14 TESTS 37 31 204800 1700
51033499 vannamsc C March 8, 2019, 2:06 p.m. OK GNU C++17 TESTS 37 31 0 1700
46215791 k1nval C Nov. 25, 2018, 5:15 p.m. OK GNU C++17 TESTS 37 31 0 1700
46258539 zawr C Nov. 26, 2018, 6:21 p.m. OK GNU C++17 TESTS 37 31 102400 1700
67486394 Mohd. C Dec. 23, 2019, 5:37 p.m. OK GNU C++17 TESTS 37 31 102400 1700
46235587 mia_ortizma C Nov. 26, 2018, 2:19 a.m. OK GNU C++17 TESTS 37 31 102400 1700
46226778 wawa. C Nov. 25, 2018, 6:57 p.m. OK GNU C++17 TESTS 37 31 102400 1700
46222562 SaMer C Nov. 25, 2018, 6:16 p.m. OK GNU C++17 TESTS 37 31 102400 1700
46216276 hiThere23 C Nov. 25, 2018, 5:19 p.m. OK GNU C++17 TESTS 37 31 102400 1700
46282568 angry_Dmitry C Nov. 27, 2018, 2:09 p.m. OK GNU C++17 TESTS 37 31 307200 1700
47329433 yashnavingoyal C Dec. 21, 2018, 12:08 p.m. OK GNU C++17 TESTS 37 31 307200 1700
46224679 life_is_not_bed_of_roses C Nov. 25, 2018, 6:37 p.m. OK Go TESTS 37 62 0 1700
46220834 aminul C Nov. 25, 2018, 5:59 p.m. OK Java 8 TESTS 37 170 0 1700
47624166 typedef_2000 C Dec. 28, 2018, 2:15 p.m. OK Java 8 TESTS 37 171 0 1700
47230365 xodiac C Dec. 18, 2018, 5:51 p.m. OK Java 8 TESTS 37 171 0 1700
46309490 Andres1 C Nov. 28, 2018, 12:21 p.m. OK Java 8 TESTS 37 171 0 1700
46237804 avijit_agarwal C Nov. 26, 2018, 5:08 a.m. OK Java 8 TESTS 37 171 0 1700
46228871 Lewin C Nov. 25, 2018, 7:55 p.m. OK Java 8 TESTS 37 171 0 1700
46226500 CyberTruck C Nov. 25, 2018, 6:55 p.m. OK Java 8 TESTS 37 171 0 1700
46213843 mmaxio C Nov. 25, 2018, 4:59 p.m. OK Java 8 TESTS 37 171 0 1700
46436198 AJ47 C Dec. 1, 2018, 9:15 a.m. OK Java 8 TESTS 37 186 0 1700
46286967 unicorn20141 C Nov. 27, 2018, 4:51 p.m. OK Java 8 TESTS 37 186 0 1700
46214104 shaviava C Nov. 25, 2018, 5:01 p.m. OK Kotlin TESTS 37 233 102400 1700
46221204 raynald C Nov. 25, 2018, 6:03 p.m. OK Kotlin TESTS 37 233 1126400 1700
46300032 Cotheq C Nov. 28, 2018, 7 a.m. OK Kotlin TESTS 37 249 307200 1700
46217565 alexey.enkov C Nov. 25, 2018, 5:30 p.m. OK Kotlin TESTS 37 312 1126400 1700
46564205 shaviava C Dec. 3, 2018, 8:46 p.m. OK Kotlin TESTS 37 327 1331200 1700
47705419 spookywooky C Dec. 29, 2018, 7:53 p.m. OK Kotlin TESTS 37 716 1126400 1700
46235338 eki C Nov. 26, 2018, 1:56 a.m. OK Mono C# TESTS 37 77 307200 1700
46229027 tattosha_aptan C Nov. 25, 2018, 7:57 p.m. OK Mono C# TESTS 37 77 307200 1700
46225874 Coder_D C Nov. 25, 2018, 6:49 p.m. OK Mono C# TESTS 37 93 3993600 1700
46221042 omikad C Nov. 25, 2018, 6:01 p.m. OK Mono C# TESTS 37 93 4198400 1700
46215577 peregrinus C Nov. 25, 2018, 5:13 p.m. OK Mono C# TESTS 37 109 71475200 1700
46226051 Anastasiya_Andreevna C Nov. 25, 2018, 6:51 p.m. OK Mono C# TESTS 37 124 4300800 1700
46255341 teru C Nov. 26, 2018, 4:21 p.m. OK Mono C# TESTS 37 779 4198400 1700
55235491 ys1468362286 C June 7, 2019, 8:12 a.m. OK MS C++ TESTS 37 31 102400 1700
46227733 solenji C Nov. 25, 2018, 7:04 p.m. OK MS C++ TESTS 37 46 0 1700
46221283 LoneFox C Nov. 25, 2018, 6:04 p.m. OK MS C++ TESTS 37 46 0 1700
46213616 wa1tz719 C Nov. 25, 2018, 4:57 p.m. OK MS C++ TESTS 37 46 0 1700
46227322 artikot C Nov. 25, 2018, 7:01 p.m. OK MS C++ TESTS 37 46 0 1700
46213535 bayleef C Nov. 25, 2018, 4:57 p.m. OK MS C++ TESTS 37 46 102400 1700
46221442 XDIMANX007 C Nov. 25, 2018, 6:05 p.m. OK MS C++ TESTS 37 46 102400 1700
46250996 Mao_Z C Nov. 26, 2018, 2:08 p.m. OK MS C++ TESTS 37 46 102400 1700
55235504 vjudge2 C June 7, 2019, 8:12 a.m. OK MS C++ TESTS 37 46 102400 1700
54087142 vjudge3 C May 14, 2019, 8:09 a.m. OK MS C++ TESTS 37 46 21708800 1700
46460819 sk0 C Dec. 1, 2018, 8:02 p.m. OK Ocaml TESTS 37 46 409600 1700
46460167 sk0 C Dec. 1, 2018, 7:29 p.m. OK Ocaml TESTS 37 62 409600 1700
46914892 mayakin C Dec. 11, 2018, 7:31 p.m. OK PHP TESTS 37 982 512000 1700
46232358 c1729 C Nov. 25, 2018, 9:44 p.m. OK PyPy 2 TESTS 37 202 1433600 1700
46216182 zacker-22 C Nov. 25, 2018, 5:19 p.m. OK PyPy 2 TESTS 37 295 2662400 1700
46221053 ManasG C Nov. 25, 2018, 6:01 p.m. OK PyPy 2 TESTS 37 514 8089600 1700
46218574 titia C Nov. 25, 2018, 5:39 p.m. OK PyPy 3 TESTS 37 218 1228800 1700
46233126 chandak_vikas C Nov. 25, 2018, 10:37 p.m. OK PyPy 3 TESTS 37 264 2457600 1700
46225300 111vad111 C Nov. 25, 2018, 6:43 p.m. OK PyPy 3 TESTS 37 264 3584000 1700
52808963 bupt.wc C April 16, 2019, 7:14 a.m. OK PyPy 3 TESTS 37 280 2764800 1700
46229346 LordVader C Nov. 25, 2018, 8:02 p.m. OK PyPy 3 TESTS 37 296 2048000 1700
46232036 LordVader C Nov. 25, 2018, 9:30 p.m. OK PyPy 3 TESTS 37 311 2048000 1700
46224225 Praxis C Nov. 25, 2018, 6:32 p.m. OK PyPy 3 TESTS 37 343 2764800 1700
46217339 xh286286 C Nov. 25, 2018, 5:28 p.m. OK PyPy 3 TESTS 37 389 3686400 1700
46216179 WNG C Nov. 25, 2018, 5:18 p.m. OK Python 2 TESTS 37 218 409600 1700
46214750 nwi C Nov. 25, 2018, 5:07 p.m. OK Python 2 TESTS 37 233 204800 1700
46233492 arman.t C Nov. 25, 2018, 11:04 p.m. OK Python 2 TESTS 37 296 102400 1700
51570540 _PortgasD.Ace_ C March 20, 2019, 11:26 a.m. OK Python 3 TESTS 37 155 409600 1700
49687410 amirah C Feb. 10, 2019, 8:22 a.m. OK Python 3 TESTS 37 155 409600 1700
46229602 old_boo C Nov. 25, 2018, 8:07 p.m. OK Python 3 TESTS 37 155 409600 1700
46239697 r57shell C Nov. 26, 2018, 6:56 a.m. OK Python 3 TESTS 37 155 614400 1700
46229659 abeaumont C Nov. 25, 2018, 8:09 p.m. OK Python 3 TESTS 37 171 307200 1700
46224663 reireg C Nov. 25, 2018, 6:37 p.m. OK Python 3 TESTS 37 171 409600 1700
46995920 Firepaw C Dec. 14, 2018, 8:28 a.m. OK Python 3 TESTS 37 171 512000 1700
46217207 meooow C Nov. 25, 2018, 5:27 p.m. OK Python 3 TESTS 37 171 716800 1700
46215607 whatshisbucket C Nov. 25, 2018, 5:14 p.m. OK Python 3 TESTS 37 202 307200 1700
46222468 fikr C Nov. 25, 2018, 6:15 p.m. OK Python 3 TESTS 37 202 512000 1700
46221097 geckods C Nov. 25, 2018, 6:02 p.m. OK Ruby TESTS 37 421 204800 1700
46216770 limed C Nov. 25, 2018, 5:24 p.m. OK Scala TESTS 37 733 0 1700

remove filters

Back to search problems