Codeforces Round 429 (Div. 1)

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
840 Codeforces Round 429 (Div. 1) FINISHED False 7200 228754499 Aug. 18, 2017, 3:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 7008 ) A Leha and Function PROGRAMMING combinatorics greedy math number theory sortings 1300

B"Leha like all kinds of strange things. Recently he liked the function F(n, xe2 x80 x89k). Consider all possible k-element subsets of the set [1, xe2 x80 x892, xe2 x80 x89..., xe2 x80 x89n]. For subset find minimal element in it. F(n, xe2 x80 x89k) -- mathematical expectation of the minimal element among all k-element subsets. But only function does not interest him. He wants to do interesting things with it. Mom brought him two arrays A and B, each consists of m integers. For all i, xe2 x80 x89j such that 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89i, xe2 x80 x89j xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m the condition Ai xe2 x80 x89 xe2 x89 xa5 xe2 x80 x89Bj holds. Help Leha rearrange the numbers in the array A so that the sum is maximally possible, where A' is already rearranged array. First line of input data contains single integer m (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x892 xc2 xb7105) -- length of arrays A and B. Next line contains m integers a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89am (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) -- array A. Next line contains m integers b1, xe2 x80 x89b2, xe2 x80 x89..., xe2 x80 x89bm (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89bi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) -- array B. Output m integers a'1, xe2 x80 x89a'2, xe2 x80 x89..., xe2 x80 x89a'm -- array A' which is permutation of the array A. "...

Tutorials

Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
29560749 fluffyowl A Aug. 18, 2017, 3:17 p.m. OK D TESTS 48 265 22118400 1300
32240650 yigezhe A Nov. 12, 2017, 10:31 a.m. OK GNU C TESTS 48 202 7987200 1300
31940262 reyad A Nov. 1, 2017, 6:52 a.m. OK GNU C TESTS 48 218 3174400 1300
31209206 NoSoul A Oct. 11, 2017, 7:17 a.m. OK GNU C TESTS 48 249 4812800 1300
36871950 mahabir10 A April 2, 2018, 7:36 a.m. OK GNU C TESTS 48 249 6553600 1300
35573549 Khassar A Feb. 22, 2018, 1:01 p.m. OK GNU C++ TESTS 48 77 5324800 1300
29558600 yasugongshang A Aug. 18, 2017, 3:12 p.m. OK GNU C++ TESTS 48 78 3174400 1300
40980261 ReaLNero1 A July 30, 2018, 5:27 p.m. OK GNU C++ TESTS 48 93 3174400 1300
30245349 vjudge3 A Sept. 10, 2017, 12:47 p.m. OK GNU C++ TESTS 48 109 3174400 1300
29584286 jiyutian A Aug. 19, 2017, 12:46 a.m. OK GNU C++ TESTS 48 109 3788800 1300
30257736 vjudge4 A Sept. 11, 2017, 2:13 a.m. OK GNU C++ TESTS 48 109 3993600 1300
29566270 snowflake A Aug. 18, 2017, 3:33 p.m. OK GNU C++ TESTS 48 109 16076800 1300
29566483 Dream-Reality A Aug. 18, 2017, 3:34 p.m. OK GNU C++ TESTS 48 124 3993600 1300
29614933 Merln A Aug. 20, 2017, 7:20 a.m. OK GNU C++ TESTS 48 124 4915200 1300
29565833 xht13127 A Aug. 18, 2017, 3:32 p.m. OK GNU C++ TESTS 48 124 14028800 1300
31868562 Umi A Oct. 29, 2017, 1:51 p.m. OK GNU C++11 TESTS 48 93 3174400 1300
29846307 FizzyDavid A Aug. 28, 2017, 1:22 p.m. OK GNU C++11 TESTS 48 93 5734400 1300
29706780 imone A Aug. 23, 2017, 12:19 p.m. OK GNU C++11 TESTS 48 109 2969600 1300
31063905 00001 A Oct. 6, 2017, 11:32 a.m. OK GNU C++11 TESTS 48 124 3174400 1300
50558899 UESTC_Forsaken A Feb. 27, 2019, 9:44 a.m. OK GNU C++11 TESTS 48 124 3276800 1300
51093264 Gloid A March 9, 2019, 3:11 p.m. OK GNU C++11 TESTS 48 124 3993600 1300
29571488 King_George A Aug. 18, 2017, 3:57 p.m. OK GNU C++11 TESTS 48 124 3993600 1300
29559968 LaPlus A Aug. 18, 2017, 3:15 p.m. OK GNU C++11 TESTS 48 124 3993600 1300
60146993 HorizonWind A Sept. 6, 2019, 12:59 a.m. OK GNU C++11 TESTS 48 124 24371200 1300
29863391 I_love_code A Aug. 29, 2017, 10:33 a.m. OK GNU C++11 TESTS 48 139 3174400 1300
29557240 Egor.Lifar A Aug. 18, 2017, 3:09 p.m. OK GNU C++14 TESTS 48 78 3174400 1300
29566308 platypus179 A Aug. 18, 2017, 3:33 p.m. OK GNU C++14 TESTS 48 93 23244800 1300
29556464 unused A Aug. 18, 2017, 3:08 p.m. OK GNU C++14 TESTS 48 109 3788800 1300
29576947 Andrei1998 A Aug. 18, 2017, 4:34 p.m. OK GNU C++14 TESTS 48 124 4096000 1300
32075364 g0ds1ayer A Nov. 5, 2017, 11:56 a.m. OK GNU C++14 TESTS 48 156 3174400 1300
31912019 Farhod_Farmon A Oct. 31, 2017, 6:30 a.m. OK GNU C++14 TESTS 48 171 2457600 1300
44844471 OmarHashim A Oct. 25, 2018, 1:58 p.m. OK GNU C++14 TESTS 48 171 3174400 1300
32235294 nong A Nov. 12, 2017, 5:41 a.m. OK GNU C++14 TESTS 48 171 3174400 1300
29796992 3_Problems_Everyday A Aug. 26, 2017, 4:50 a.m. OK GNU C++14 TESTS 48 171 3174400 1300
29708725 demonsbane A Aug. 23, 2017, 1:38 p.m. OK GNU C++14 TESTS 48 171 3174400 1300
44760236 Trisolaris A Oct. 24, 2018, 6:39 a.m. OK GNU C++17 TESTS 48 109 3276800 1300
36646889 LiChenKoh A March 26, 2018, 3:30 p.m. OK GNU C++17 TESTS 48 124 6860800 1300
67679469 Mamadu A Dec. 27, 2019, 5:25 a.m. OK GNU C++17 TESTS 48 187 3174400 1300
66453391 tjrac6017203257 A Dec. 7, 2019, 12:18 p.m. OK GNU C++17 TESTS 48 187 3174400 1300
58555509 sunhuarong A Aug. 11, 2019, 1:26 a.m. OK GNU C++17 TESTS 48 187 3174400 1300
54526402 Songtak A May 23, 2019, 2:42 p.m. OK GNU C++17 TESTS 48 187 3174400 1300
48872893 zpr A Jan. 24, 2019, 6:50 a.m. OK GNU C++17 TESTS 48 187 3481600 1300
67299168 h__h A Dec. 20, 2019, 6:01 p.m. OK GNU C++17 TESTS 48 187 3993600 1300
59678349 anakib1 A Aug. 29, 2019, 7:12 p.m. OK GNU C++17 TESTS 48 187 3993600 1300
54269209 DEVV5 A May 17, 2019, 7:52 a.m. OK GNU C++17 TESTS 48 187 4812800 1300
29963274 Bleem A Sept. 1, 2017, 3:02 a.m. OK Haskell TESTS 48 1091 51712000 1300
46251919 wrong_lemma A Nov. 26, 2018, 2:34 p.m. OK Java 8 TESTS 48 264 0 1300
29595281 uwi A Aug. 19, 2017, 10:12 a.m. OK Java 8 TESTS 48 280 4812800 1300
46373247 stolis A Nov. 29, 2018, 5:02 p.m. OK Java 8 TESTS 48 343 4915200 1300
29799548 RoyaLKoninA A Aug. 26, 2017, 7:15 a.m. OK Java 8 TESTS 48 358 19046400 1300
29598581 birlax A Aug. 19, 2017, 12:50 p.m. OK Java 8 TESTS 48 358 23961600 1300
39788389 dipankar12 A June 30, 2018, 5:18 a.m. OK Java 8 TESTS 48 373 5427200 1300
30084149 __________ A Sept. 4, 2017, 8:17 p.m. OK Java 8 TESTS 48 374 4915200 1300
35595782 tmwilliamlin168 A Feb. 23, 2018, 12:10 p.m. OK Java 8 TESTS 48 374 26214400 1300
31582726 IDzekh A Oct. 21, 2017, 5:51 p.m. OK Java 8 TESTS 48 389 41676800 1300
40598660 prabhat236218 A July 21, 2018, 7:15 a.m. OK Java 8 TESTS 48 389 51302400 1300
29574548 .o. A Aug. 18, 2017, 4:16 p.m. OK JavaScript TESTS 48 592 66457600 1300
59875270 david_varela A Sept. 1, 2019, 10:40 p.m. OK Kotlin TESTS 48 889 30720000 1300
30791527 jemsz95 A Sept. 27, 2017, 11:12 p.m. OK Kotlin TESTS 48 1638 30822400 1300
29573166 riantkb A Aug. 18, 2017, 4:06 p.m. OK Mono C# TESTS 48 296 46284800 1300
29592506 leign A Aug. 19, 2017, 8:10 a.m. OK Mono C# TESTS 48 327 47718400 1300
49218384 nemars A Jan. 30, 2019, 6:02 p.m. OK Mono C# TESTS 48 1013 45670400 1300
30868688 og.kostya A Sept. 30, 2017, 2:07 p.m. OK MS C# TESTS 48 140 6451200 1300
30786081 JuanCarlosGI A Sept. 27, 2017, 6:10 p.m. OK MS C# TESTS 48 390 51302400 1300
31852166 albert45 A Oct. 28, 2017, 10:32 p.m. OK MS C# TESTS 48 1045 40345600 1300
54092290 vjudge5 A May 14, 2019, 11:26 a.m. OK MS C++ TESTS 48 171 3174400 1300
29558414 Perforator A Aug. 18, 2017, 3:11 p.m. OK MS C++ TESTS 48 171 3379200 1300
29558576 wa1tz719 A Aug. 18, 2017, 3:12 p.m. OK MS C++ TESTS 48 171 3379200 1300
29619491 carber A Aug. 20, 2017, 11:27 a.m. OK MS C++ TESTS 48 187 2560000 1300
58557728 vjudge3 A Aug. 11, 2019, 3:29 a.m. OK MS C++ TESTS 48 187 3276800 1300
29560349 Taube A Aug. 18, 2017, 3:16 p.m. OK MS C++ TESTS 48 187 6144000 1300
58556849 vjudge1 A Aug. 11, 2019, 2:35 a.m. OK MS C++ TESTS 48 202 3174400 1300
58557248 vjudge1 A Aug. 11, 2019, 3:02 a.m. OK MS C++ TESTS 48 202 3174400 1300
29622458 wonderminicty A Aug. 20, 2017, 1:42 p.m. OK MS C++ TESTS 48 202 3379200 1300
29561239 natalia A Aug. 18, 2017, 3:18 p.m. OK MS C++ TESTS 48 217 3379200 1300
58640957 vjudge2 A Aug. 12, 2019, 3:32 a.m. OK MS C++ 2017 TESTS 48 265 3174400 1300
58557460 vjudge3 A Aug. 11, 2019, 3:15 a.m. OK MS C++ 2017 TESTS 48 499 3174400 1300
64703881 CtrlAlt A Nov. 11, 2019, 3:44 p.m. OK MS C++ 2017 TESTS 48 545 3481600 1300
58557345 vjudge3 A Aug. 11, 2019, 3:08 a.m. OK MS C++ 2017 TESTS 48 608 6451200 1300
45113612 wangkan2001 A Oct. 30, 2018, 7:55 p.m. OK PyPy 2 TESTS 48 499 25292800 1300
42148874 YESMAths A Aug. 27, 2018, 10:51 a.m. OK PyPy 2 TESTS 48 499 33587200 1300
29692320 bluejay9676 A Aug. 22, 2017, 7:39 p.m. OK PyPy 2 TESTS 48 732 36044800 1300
69849546 raj1307 A Jan. 30, 2020, 3:13 p.m. OK PyPy 2 TESTS 48 998 34611200 1300
61771604 iamprayush A Oct. 3, 2019, 10:23 a.m. OK PyPy 2 TESTS 48 1200 31334400 1300
55218641 III_Wolverine_III A June 6, 2019, 6:11 p.m. OK PyPy 3 TESTS 48 857 39833600 1300
55217762 kgmkr00001 A June 6, 2019, 5:41 p.m. OK PyPy 3 TESTS 48 1045 33484800 1300
67174245 PS41 A Dec. 18, 2019, 6:31 p.m. OK PyPy 3 TESTS 48 1325 29593600 1300
54668039 Aidos A May 26, 2019, 2:33 p.m. OK PyPy 3 TESTS 48 1341 29491200 1300
67174211 vjudge2 A Dec. 18, 2019, 6:30 p.m. OK PyPy 3 TESTS 48 1372 29593600 1300
29586473 Punter A Aug. 19, 2017, 2:59 a.m. OK PyPy 3 TESTS 48 1684 173260800 1300
60637002 rjv A Sept. 15, 2019, 2:15 p.m. OK PyPy 3 TESTS 48 1871 27955200 1300
29674871 Roll A Aug. 22, 2017, 5:55 a.m. OK PyPy 3 TESTS 48 1996 43622400 1300
33720054 laoliumang A Dec. 28, 2017, 2:24 p.m. OK Python 2 TESTS 48 810 33280000 1300
33718383 laoliumang A Dec. 28, 2017, 2:19 p.m. OK Python 2 TESTS 48 826 33587200 1300
29558627 nwi A Aug. 18, 2017, 3:12 p.m. OK Python 2 TESTS 48 842 29593600 1300
29721465 nealzane A Aug. 24, 2017, 3:49 a.m. OK Python 2 TESTS 48 904 24985600 1300
40746679 jaaguptamme A July 25, 2018, 3:06 p.m. OK Python 2 TESTS 48 935 24780800 1300
30042637 codemaa A Sept. 3, 2017, 8:03 p.m. OK Python 2 TESTS 48 935 35225600 1300
29583652 ReaLNero A Aug. 18, 2017, 11:46 p.m. OK Python 2 TESTS 48 1216 22425600 1300
29644245 franckmy A Aug. 21, 2017, 1:09 p.m. OK Python 2 TESTS 48 1388 41676800 1300
44909722 ankit_06 A Oct. 26, 2018, 12:58 p.m. OK Python 2 TESTS 48 1575 41984000 1300
40674291 orailly A July 23, 2018, 2:25 p.m. OK Python 3 TESTS 48 608 24473600 1300
56671298 kopok2 A July 7, 2019, 1:15 p.m. OK Python 3 TESTS 48 624 36249600 1300
47508581 xumouyi A Dec. 26, 2018, 4:20 a.m. OK Python 3 TESTS 48 686 37683200 1300
34428600 burakbugrul A Jan. 22, 2018, 1:32 a.m. OK Python 3 TESTS 48 842 40857600 1300
34037428 merolish A Jan. 8, 2018, 11:43 p.m. OK Python 3 TESTS 48 888 42393600 1300
55006296 Mohamed_Ayman A June 3, 2019, 7:43 a.m. OK Python 3 TESTS 48 904 26419200 1300
29818647 linjiahao A Aug. 27, 2017, 4:14 a.m. OK Python 3 TESTS 48 982 36147200 1300
29674878 Roll A Aug. 22, 2017, 5:55 a.m. OK Python 3 TESTS 48 982 49152000 1300
58189813 UTMoonlight A Aug. 2, 2019, 6:57 p.m. OK Python 3 TESTS 48 1045 33382400 1300
39954705 Ali_Pi A July 4, 2018, 12:19 p.m. OK Python 3 TESTS 48 1060 33382400 1300
29587345 limed A Aug. 19, 2017, 3:48 a.m. OK Scala TESTS 48 919 26316800 1300

remove filters

Back to search problems