Codeforces Round 582 (Div. 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
1213 Codeforces Round 582 (Div. 3) FINISHED False 7200 170263487 Aug. 30, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 11579 ) D2 Equalizing by Division (hard version) PROGRAMMING brute force math sortings 1600

B"The only difference between easy and hard versions is the number of elements in the array. You are given an array a consisting of n integers. In one move you can choose any a_i and divide it by 2 rounding down (in other words, in one move you can set a_i := lfloor frac{a_i}{2} rfloor ). You can perform such an operation any (possibly, zero) number of times with any a_i . Your task is to calculate the minimum possible number of operations required to obtain at least k equal numbers in the array. Don't forget that it is possible to have a_i = 0 after some operations, thus the answer always exists. The first line of the input contains two integers n and k ( 1 <= k <= n <= 2 cdot 10^5 ) -- the number of elements in the array and the number of equal numbers required. The second line of the input contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 2 cdot 10^5 ), where a_i is the i -th element of a . Print one integer -- the minimum possible number of operations required to obtain at least k equal numbers in the array. "...

Tutorials

Codeforces Round #582 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
59845061 pnt2k2 D2 Sept. 1, 2019, 9:05 a.m. OK FPC TESTS 41 93 2457600 1600
60959125 nikhilreddy123 D2 Sept. 21, 2019, 4:31 a.m. OK GNU C11 TESTS 41 62 2457600 1600
59942550 logan.glasson D2 Sept. 3, 2019, 11:57 a.m. OK GNU C11 TESTS 41 62 2457600 1600
59941558 logan.glasson D2 Sept. 3, 2019, 11:38 a.m. OK GNU C11 TESTS 41 62 2457600 1600
68217713 kaiboy D2 Jan. 5, 2020, 1:45 a.m. OK GNU C11 TESTS 41 93 2457600 1600
68214636 kaiboy D2 Jan. 4, 2020, 9:48 p.m. OK GNU C11 TESTS 41 93 2457600 1600
66269313 racerS D2 Dec. 4, 2019, 11:43 a.m. OK GNU C11 TESTS 41 93 6348800 1600
59852556 Peter_Z D2 Sept. 1, 2019, 12:10 p.m. OK GNU C++11 TESTS 41 46 2252800 1600
60288672 yugao D2 Sept. 9, 2019, 5:19 a.m. OK GNU C++11 TESTS 41 46 2457600 1600
60252087 hz2016 D2 Sept. 8, 2019, 7:22 a.m. OK GNU C++11 TESTS 41 46 2457600 1600
60215105 luogu_bot3 D2 Sept. 7, 2019, 11:34 a.m. OK GNU C++11 TESTS 41 46 2457600 1600
59860925 bdcaknoip D2 Sept. 1, 2019, 3:16 p.m. OK GNU C++11 TESTS 41 46 2457600 1600
68344458 youngsystem D2 Jan. 7, 2020, 6:22 a.m. OK GNU C++11 TESTS 41 46 2457600 1600
63363502 caidzh D2 Oct. 25, 2019, 6:38 a.m. OK GNU C++11 TESTS 41 46 2457600 1600
59893121 zhanghapi D2 Sept. 2, 2019, 11:09 a.m. OK GNU C++11 TESTS 41 46 2662400 1600
59942612 _only_you_ D2 Sept. 3, 2019, 11:58 a.m. OK GNU C++11 TESTS 41 46 2662400 1600
61095598 zzzzk D2 Sept. 23, 2019, 2:41 a.m. OK GNU C++11 TESTS 41 46 2764800 1600
60684906 Wielomian D2 Sept. 16, 2019, 3:04 p.m. OK GNU C++14 TESTS 41 62 1638400 1600
60682312 Wielomian D2 Sept. 16, 2019, 2:18 p.m. OK GNU C++14 TESTS 41 62 1740800 1600
60688652 Wielomian D2 Sept. 16, 2019, 4:25 p.m. OK GNU C++14 TESTS 41 62 2048000 1600
60688310 Wielomian D2 Sept. 16, 2019, 4:17 p.m. OK GNU C++14 TESTS 41 62 2048000 1600
60688822 Wielomian D2 Sept. 16, 2019, 4:29 p.m. OK GNU C++14 TESTS 41 62 2150400 1600
59833436 inhasis07 D2 Sept. 1, 2019, 1:50 a.m. OK GNU C++14 TESTS 41 62 2355200 1600
69259689 kwok D2 Jan. 21, 2020, 4:41 p.m. OK GNU C++14 TESTS 41 62 2355200 1600
60161651 Luzivanlt D2 Sept. 6, 2019, 9:13 a.m. OK GNU C++14 TESTS 41 62 2457600 1600
59870209 HipHop D2 Sept. 1, 2019, 6:59 p.m. OK GNU C++14 TESTS 41 62 3174400 1600
59880543 Self_patroit D2 Sept. 2, 2019, 4:31 a.m. OK GNU C++14 TESTS 41 62 3174400 1600
66312463 lijiatu D2 Dec. 5, 2019, 11:55 a.m. OK GNU C++17 TESTS 41 62 2355200 1600
63213911 Warbler D2 Oct. 23, 2019, 5:14 a.m. OK GNU C++17 TESTS 41 62 2355200 1600
61111111 dtc03012 D2 Sept. 23, 2019, 11:17 a.m. OK GNU C++17 TESTS 41 62 2662400 1600
59849001 enabl3d D2 Sept. 1, 2019, 10:42 a.m. OK GNU C++17 TESTS 41 62 3174400 1600
60196650 hsnavarro D2 Sept. 7, 2019, 2:16 a.m. OK GNU C++17 TESTS 41 77 1638400 1600
60196782 hsnavarro D2 Sept. 7, 2019, 2:21 a.m. OK GNU C++17 TESTS 41 77 1638400 1600
60196828 hsnavarro D2 Sept. 7, 2019, 2:23 a.m. OK GNU C++17 TESTS 41 77 1638400 1600
59842362 yeh97xyz D2 Sept. 1, 2019, 7:53 a.m. OK GNU C++17 TESTS 41 77 2355200 1600
65613269 vjudge4 D2 Nov. 24, 2019, 1:26 a.m. OK GNU C++17 TESTS 41 77 2355200 1600
65703381 vjudge5 D2 Nov. 25, 2019, 11:39 a.m. OK GNU C++17 TESTS 41 77 2355200 1600
60412011 reanimatorzon D2 Sept. 11, 2019, 10:40 p.m. OK Go TESTS 41 217 50790400 1600
60412397 reanimatorzon D2 Sept. 11, 2019, 11:02 p.m. OK Go TESTS 41 249 59699200 1600
60075417 Icceey D2 Sept. 5, 2019, 12:27 p.m. OK Go TESTS 41 264 54374400 1600
59914809 dioji D2 Sept. 2, 2019, 6:41 p.m. OK Go TESTS 41 545 45772800 1600
66005700 machhra D2 Nov. 29, 2019, 9:33 p.m. OK Java 11 TESTS 41 264 4812800 1600
60140652 catforce D2 Sept. 5, 2019, 8:03 p.m. OK Java 8 TESTS 41 140 0 1600
60138820 catforce D2 Sept. 5, 2019, 7:15 p.m. OK Java 8 TESTS 41 171 0 1600
60215048 cis_pie D2 Sept. 7, 2019, 11:33 a.m. OK Java 8 TESTS 41 186 18329600 1600
60072838 kostasanemozalis D2 Sept. 5, 2019, 11:41 a.m. OK Java 8 TESTS 41 202 2457600 1600
59826746 icpc_loser D2 Aug. 31, 2019, 7:54 p.m. OK Java 8 TESTS 41 218 4812800 1600
59888298 mdazmat9 D2 Sept. 2, 2019, 9:08 a.m. OK Java 8 TESTS 41 218 5836800 1600
60047981 catforce D2 Sept. 4, 2019, 9:45 p.m. OK Java 8 TESTS 41 218 39219200 1600
59894817 marcose18 D2 Sept. 2, 2019, 11:45 a.m. OK Java 8 TESTS 41 233 3072000 1600
59851247 Jarik D2 Sept. 1, 2019, 11:38 a.m. OK Java 8 TESTS 41 233 3072000 1600
59836124 safarisoul D2 Sept. 1, 2019, 4:14 a.m. OK Java 8 TESTS 41 248 36659200 1600
60032390 yakamoto D2 Sept. 4, 2019, 3:45 p.m. OK Kotlin TESTS 41 607 24883200 1600
60460287 RIPBruh._. D2 Sept. 12, 2019, 8:11 p.m. OK Kotlin TESTS 41 1231 76697600 1600
63117529 NEvOl D2 Oct. 22, 2019, 9:56 a.m. OK Mono C# TESTS 41 1029 67276800 1600
65623635 vjudge4 D2 Nov. 24, 2019, 7:09 a.m. OK MS C++ TESTS 41 61 2457600 1600
60679035 vjudge1 D2 Sept. 16, 2019, 1:24 p.m. OK MS C++ TESTS 41 62 2355200 1600
61680650 vjudge2 D2 Oct. 2, 2019, 12:43 a.m. OK MS C++ TESTS 41 62 2457600 1600
60148274 vjudge1 D2 Sept. 6, 2019, 2:07 a.m. OK MS C++ TESTS 41 62 2457600 1600
65584223 vjudge2 D2 Nov. 23, 2019, 11:54 a.m. OK MS C++ TESTS 41 77 2355200 1600
65703464 vjudge2 D2 Nov. 25, 2019, 11:41 a.m. OK MS C++ TESTS 41 77 2457600 1600
65690851 vjudge2 D2 Nov. 25, 2019, 4:44 a.m. OK MS C++ TESTS 41 77 2457600 1600
65708170 vjudge4 D2 Nov. 25, 2019, 1:21 p.m. OK MS C++ TESTS 41 77 2457600 1600
65282365 WocBug D2 Nov. 18, 2019, 6:34 a.m. OK MS C++ TESTS 41 77 2457600 1600
65583091 vjudge3 D2 Nov. 23, 2019, 11:35 a.m. OK MS C++ TESTS 41 77 2457600 1600
60715716 pichulia D2 Sept. 17, 2019, 10:32 a.m. OK MS C++ 2017 TESTS 41 78 3174400 1600
60066818 hwangganzi D2 Sept. 5, 2019, 9:26 a.m. OK MS C++ 2017 TESTS 41 93 2457600 1600
65743908 vjudge2 D2 Nov. 26, 2019, 11:28 a.m. OK MS C++ 2017 TESTS 41 93 2457600 1600
60824477 shebao D2 Sept. 19, 2019, 2:56 a.m. OK MS C++ 2017 TESTS 41 93 2457600 1600
65585273 vjudge4 D2 Nov. 23, 2019, 12:14 p.m. OK MS C++ 2017 TESTS 41 93 2560000 1600
60348707 vjudge2 D2 Sept. 10, 2019, 1:30 p.m. OK MS C++ 2017 TESTS 41 93 3174400 1600
60510760 Yanhui D2 Sept. 14, 2019, 2:44 a.m. OK MS C++ 2017 TESTS 41 186 25497600 1600
59940907 omerb.zeybek D2 Sept. 3, 2019, 11:25 a.m. OK MS C++ 2017 TESTS 41 187 2457600 1600
64523621 yuanyuan2048 D2 Nov. 8, 2019, 1:05 p.m. OK MS C++ 2017 TESTS 41 202 819200 1600
59934300 MrLolthe1st D2 Sept. 3, 2019, 8:48 a.m. OK MS C++ 2017 TESTS 41 202 2457600 1600
59941858 ssk497 D2 Sept. 3, 2019, 11:44 a.m. OK PyPy 2 TESTS 41 483 47923200 1600
60454313 staiyzia D2 Sept. 12, 2019, 5:14 p.m. OK PyPy 3 TESTS 41 342 17100800 1600
59961389 titia D2 Sept. 3, 2019, 6:12 p.m. OK PyPy 3 TESTS 41 343 15462400 1600
59949018 nani_7 D2 Sept. 3, 2019, 1:54 p.m. OK PyPy 3 TESTS 41 343 16691200 1600
61001356 codershuvo D2 Sept. 21, 2019, 9:40 a.m. OK PyPy 3 TESTS 41 358 15462400 1600
68064204 Waiting D2 Jan. 2, 2020, 6:39 a.m. OK PyPy 3 TESTS 41 389 36249600 1600
60276937 nikeshthapa255 D2 Sept. 8, 2019, 6:20 p.m. OK PyPy 3 TESTS 41 390 19046400 1600
68127688 sureshsinghspd D2 Jan. 3, 2020, 3:48 p.m. OK PyPy 3 TESTS 41 405 19865600 1600
64718967 juppy D2 Nov. 12, 2019, 1:41 a.m. OK PyPy 3 TESTS 41 436 33996800 1600
60605212 Renne_Candy D2 Sept. 15, 2019, 9:14 a.m. OK PyPy 3 TESTS 41 467 39116800 1600
60209960 ThePonyCoder D2 Sept. 7, 2019, 9:41 a.m. OK PyPy 3 TESTS 41 467 51507200 1600
59976887 Madhur1906 D2 Sept. 4, 2019, 6:21 a.m. OK Python 2 TESTS 41 1996 19148800 1600
59849665 kaif_7 D2 Sept. 1, 2019, 10:57 a.m. OK Python 2 TESTS 41 1996 53248000 1600
62114672 vegetablesandwich D2 Oct. 8, 2019, 1:04 p.m. OK Python 3 TESTS 41 1107 33996800 1600
59874732 SalmonTimo D2 Sept. 1, 2019, 10:04 p.m. OK Python 3 TESTS 41 1201 38400000 1600
59820851 LintuStorm D2 Aug. 31, 2019, 5:16 p.m. OK Python 3 TESTS 41 1419 35840000 1600
59892113 denis.nasyrov D2 Sept. 2, 2019, 10:48 a.m. OK Python 3 TESTS 41 1513 42803200 1600
59975998 plusplus6408 D2 Sept. 4, 2019, 5:52 a.m. OK Python 3 TESTS 41 1591 33996800 1600
60048144 orailly D2 Sept. 4, 2019, 9:53 p.m. OK Python 3 TESTS 41 1606 15872000 1600
59853365 livida D2 Sept. 1, 2019, 12:31 p.m. OK Python 3 TESTS 41 1606 34611200 1600
59964830 rushabh1 D2 Sept. 3, 2019, 7:50 p.m. OK Python 3 TESTS 41 1622 32870400 1600
60334559 namanjain2912 D2 Sept. 10, 2019, 7:51 a.m. OK Python 3 TESTS 41 1684 35532800 1600
59889777 user_0001 D2 Sept. 2, 2019, 9:51 a.m. OK Python 3 TESTS 41 1730 38809600 1600
59900156 Andrey_R D2 Sept. 2, 2019, 1:24 p.m. OK Ruby TESTS 41 826 76800000 1600
59837549 arzk D2 Sept. 1, 2019, 5:22 a.m. OK Rust TESTS 41 124 2457600 1600
60456370 tpoeiras D2 Sept. 12, 2019, 6:07 p.m. OK Rust TESTS 41 156 29696000 1600
60458342 tpoeiras D2 Sept. 12, 2019, 7:05 p.m. OK Rust TESTS 41 187 29696000 1600
60456106 tpoeiras D2 Sept. 12, 2019, 6 p.m. OK Rust TESTS 41 202 29696000 1600
60529736 MarcoXerox D2 Sept. 14, 2019, 11:52 a.m. OK Rust TESTS 41 234 27955200 1600
60268790 ikazuya0201 D2 Sept. 8, 2019, 2:32 p.m. OK Rust TESTS 41 514 29286400 1600
61303287 chinmaykousik1 D2 Sept. 26, 2019, 6:05 a.m. OK Rust TESTS 41 685 56934400 1600

remove filters

Back to search problems