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 164647499 Aug. 30, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 11430 ) D1 Equalizing by Division (easy version) PROGRAMMING brute force implementation 1500

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 <= 50 ) -- 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
60347146 vjudge2 D1 Sept. 10, 2019, 12:59 p.m. OK Clang++17 Diagnostics TESTS 29 93 6041600 1500
59845038 pnt2k2 D1 Sept. 1, 2019, 9:04 a.m. OK FPC TESTS 29 31 2457600 1500
64719060 chaorenhaha D1 Nov. 12, 2019, 1:48 a.m. OK FPC TESTS 29 31 6246400 1500
59842946 pnt2k2 D1 Sept. 1, 2019, 8:10 a.m. OK FPC TESTS 29 61 120217600 1500
67298517 satya_chaitanya D1 Dec. 20, 2019, 5:46 p.m. OK GNU C11 TESTS 29 30 1638400 1500
68214564 kaiboy D1 Jan. 4, 2020, 9:44 p.m. OK GNU C11 TESTS 29 31 1638400 1500
68217710 kaiboy D1 Jan. 5, 2020, 1:45 a.m. OK GNU C11 TESTS 29 31 2457600 1500
60959029 nikhilreddy123 D1 Sept. 21, 2019, 4:29 a.m. OK GNU C11 TESTS 29 31 2457600 1500
68214642 kaiboy D1 Jan. 4, 2020, 9:49 p.m. OK GNU C11 TESTS 29 31 2457600 1500
59941597 logan.glasson D1 Sept. 3, 2019, 11:39 a.m. OK GNU C11 TESTS 29 46 2457600 1500
67649646 Trinadh724 D1 Dec. 26, 2019, 11:36 a.m. OK GNU C11 TESTS 29 46 3993600 1500
60030485 221 D1 Sept. 4, 2019, 3:16 p.m. OK GNU C++11 TESTS 29 15 2252800 1500
60379661 MathNoobie D1 Sept. 11, 2019, 8:27 a.m. OK GNU C++11 TESTS 29 15 2457600 1500
59820537 kandyatkhobra D1 Aug. 31, 2019, 5:09 p.m. OK GNU C++11 TESTS 29 30 0 1500
59964308 WilliamBMDK D1 Sept. 3, 2019, 7:34 p.m. OK GNU C++11 TESTS 29 30 0 1500
59861038 sushant032 D1 Sept. 1, 2019, 3:19 p.m. OK GNU C++11 TESTS 29 30 0 1500
60253728 vjudge3 D1 Sept. 8, 2019, 8:17 a.m. OK GNU C++11 TESTS 29 30 2457600 1500
60365150 H_M_Vaghasiya D1 Sept. 10, 2019, 8:23 p.m. OK GNU C++11 TESTS 29 30 2457600 1500
61868588 darked D1 Oct. 4, 2019, 5:23 p.m. OK GNU C++11 TESTS 29 30 2457600 1500
62602342 vjudge1 D1 Oct. 15, 2019, 6:13 a.m. OK GNU C++11 TESTS 29 30 2457600 1500
60188281 vjudge4 D1 Sept. 6, 2019, 7:42 p.m. OK GNU C++11 TESTS 29 30 2457600 1500
59836279 sj.shivam25 D1 Sept. 1, 2019, 4:22 a.m. OK GNU C++14 TESTS 29 15 0 1500
60912307 vjudge1 D1 Sept. 20, 2019, 6:31 a.m. OK GNU C++14 TESTS 29 15 204800 1500
63985494 -renaissance- D1 Nov. 1, 2019, 11:36 a.m. OK GNU C++14 TESTS 29 15 204800 1500
63944651 shreyassubhedar D1 Oct. 31, 2019, 6:30 p.m. OK GNU C++14 TESTS 29 15 204800 1500
62614199 itsmihir D1 Oct. 15, 2019, 10:55 a.m. OK GNU C++14 TESTS 29 15 204800 1500
60333891 shining_flash D1 Sept. 10, 2019, 7:31 a.m. OK GNU C++14 TESTS 29 15 204800 1500
60068895 codeangella D1 Sept. 5, 2019, 10:21 a.m. OK GNU C++14 TESTS 29 15 204800 1500
60056927 mth1908 D1 Sept. 5, 2019, 4:49 a.m. OK GNU C++14 TESTS 29 15 204800 1500
59976397 sy_chen D1 Sept. 4, 2019, 6:06 a.m. OK GNU C++14 TESTS 29 15 204800 1500
59974576 i_am_sankey23 D1 Sept. 4, 2019, 5:01 a.m. OK GNU C++14 TESTS 29 15 204800 1500
59847558 Gol_D D1 Sept. 1, 2019, 10:08 a.m. OK GNU C++17 TESTS 29 15 0 1500
62313600 wqj D1 Oct. 10, 2019, 2:36 p.m. OK GNU C++17 TESTS 29 15 0 1500
63782033 anshul_dhiman_ D1 Oct. 30, 2019, 11:19 a.m. OK GNU C++17 TESTS 29 15 0 1500
62226275 muhi1112 D1 Oct. 9, 2019, 7:06 p.m. OK GNU C++17 TESTS 29 15 204800 1500
63681454 Jagonmoy D1 Oct. 28, 2019, 8:09 p.m. OK GNU C++17 TESTS 29 15 204800 1500
69060532 izuku D1 Jan. 18, 2020, 4:18 p.m. OK GNU C++17 TESTS 29 15 204800 1500
69415700 oblivion_21 D1 Jan. 23, 2020, 1:02 p.m. OK GNU C++17 TESTS 29 15 204800 1500
61595891 LegendaryKnight D1 Oct. 1, 2019, 8:49 a.m. OK GNU C++17 TESTS 29 15 204800 1500
60502845 rajan_ladani D1 Sept. 13, 2019, 7:36 p.m. OK GNU C++17 TESTS 29 15 204800 1500
60329387 Terror D1 Sept. 10, 2019, 4:46 a.m. OK GNU C++17 TESTS 29 15 204800 1500
60412636 reanimatorzon D1 Sept. 11, 2019, 11:16 p.m. OK Go TESTS 29 31 0 1500
60075181 Icceey D1 Sept. 5, 2019, 12:23 p.m. OK Go TESTS 29 31 0 1500
68102251 exopeng D1 Jan. 3, 2020, 4:22 a.m. OK Java 11 TESTS 29 171 0 1500
66005720 machhra D1 Nov. 29, 2019, 9:33 p.m. OK Java 11 TESTS 29 233 0 1500
68140316 exopeng D1 Jan. 3, 2020, 9:46 p.m. OK Java 11 TESTS 29 249 0 1500
68022637 KreedM D1 Jan. 1, 2020, 1:37 a.m. OK Java 11 TESTS 29 249 0 1500
59859338 Rajkin_Hossain D1 Sept. 1, 2019, 2:41 p.m. OK Java 8 TESTS 29 109 0 1500
67698618 igor_kz D1 Dec. 27, 2019, 1:45 p.m. OK Java 8 TESTS 29 109 0 1500
63212984 Warbler D1 Oct. 23, 2019, 4:52 a.m. OK Java 8 TESTS 29 109 0 1500
61441121 potatmen D1 Sept. 28, 2019, 6:49 p.m. OK Java 8 TESTS 29 109 0 1500
61436650 serafimkoo D1 Sept. 28, 2019, 4:55 p.m. OK Java 8 TESTS 29 109 0 1500
60478024 ykt836 D1 Sept. 13, 2019, 9:10 a.m. OK Java 8 TESTS 29 109 0 1500
60268895 bhautik_77 D1 Sept. 8, 2019, 2:34 p.m. OK Java 8 TESTS 29 109 0 1500
60267677 4D5F525F47 D1 Sept. 8, 2019, 2:05 p.m. OK Java 8 TESTS 29 109 0 1500
60128451 hhh12345 D1 Sept. 5, 2019, 4:37 p.m. OK Java 8 TESTS 29 109 0 1500
59978409 kirik13 D1 Sept. 4, 2019, 7:06 a.m. OK Java 8 TESTS 29 109 0 1500
60460264 RIPBruh._. D1 Sept. 12, 2019, 8:10 p.m. OK Kotlin TESTS 29 140 102400 1500
60032424 yakamoto D1 Sept. 4, 2019, 3:46 p.m. OK Kotlin TESTS 29 405 15667200 1500
63921951 Tan42 D1 Oct. 31, 2019, 11:58 a.m. OK Mono C# TESTS 29 77 512000 1500
63116712 NEvOl D1 Oct. 22, 2019, 9:36 a.m. OK Mono C# TESTS 29 77 9113600 1500
62439441 KhozmoS D1 Oct. 12, 2019, 6:45 p.m. OK Mono C# TESTS 29 78 3584000 1500
60711124 vjudge4 D1 Sept. 17, 2019, 8:22 a.m. OK MS C++ TESTS 29 30 1638400 1500
59949816 WocBug D1 Sept. 3, 2019, 2:09 p.m. OK MS C++ TESTS 29 31 819200 1500
61680594 vjudge4 D1 Oct. 2, 2019, 12:40 a.m. OK MS C++ TESTS 29 31 1638400 1500
60608454 vjudge5 D1 Sept. 15, 2019, 10:18 a.m. OK MS C++ TESTS 29 31 1638400 1500
60607660 vjudge5 D1 Sept. 15, 2019, 10:02 a.m. OK MS C++ TESTS 29 31 1638400 1500
60607426 vjudge3 D1 Sept. 15, 2019, 9:58 a.m. OK MS C++ TESTS 29 31 1638400 1500
60159082 vjudge5 D1 Sept. 6, 2019, 8:13 a.m. OK MS C++ TESTS 29 31 1638400 1500
60609831 vjudge5 D1 Sept. 15, 2019, 10:41 a.m. OK MS C++ TESTS 29 31 1638400 1500
60610216 vjudge1 D1 Sept. 15, 2019, 10:43 a.m. OK MS C++ TESTS 29 31 1638400 1500
60616830 vjudge1 D1 Sept. 15, 2019, 11:05 a.m. OK MS C++ TESTS 29 31 1638400 1500
61875348 Kirja_ES D1 Oct. 4, 2019, 7:54 p.m. OK MS C++ 2017 TESTS 29 15 819200 1500
60743526 kdnooij D1 Sept. 17, 2019, 10:24 p.m. OK MS C++ 2017 TESTS 29 31 0 1500
59889204 yomyom0824 D1 Sept. 2, 2019, 9:34 a.m. OK MS C++ 2017 TESTS 29 31 0 1500
59881912 risa243 D1 Sept. 2, 2019, 5:33 a.m. OK MS C++ 2017 TESTS 29 31 0 1500
59865530 GK_Ebbaka D1 Sept. 1, 2019, 5 p.m. OK MS C++ 2017 TESTS 29 31 0 1500
59820844 K_Hudyakov D1 Aug. 31, 2019, 5:16 p.m. OK MS C++ 2017 TESTS 29 31 102400 1500
61045604 vjudge1 D1 Sept. 22, 2019, 4:12 a.m. OK MS C++ 2017 TESTS 29 31 102400 1500
60932153 heartsker D1 Sept. 20, 2019, 2:06 p.m. OK MS C++ 2017 TESTS 29 31 204800 1500
59934068 MrLolthe1st D1 Sept. 3, 2019, 8:41 a.m. OK MS C++ 2017 TESTS 29 31 204800 1500
64523471 yuanyuan2048 D1 Nov. 8, 2019, 1:02 p.m. OK MS C++ 2017 TESTS 29 31 1024000 1500
59875619 evanli2014 D1 Sept. 1, 2019, 11:07 p.m. OK Node.js TESTS 29 202 2662400 1500
59941889 ssk497 D1 Sept. 3, 2019, 11:44 a.m. OK PyPy 2 TESTS 29 202 8396800 1500
59850044 smart_hard D1 Sept. 1, 2019, 11:06 a.m. OK PyPy 3 TESTS 29 124 0 1500
59852841 Akash_123 D1 Sept. 1, 2019, 12:18 p.m. OK PyPy 3 TESTS 29 139 1843200 1500
66466252 manish.17 D1 Dec. 7, 2019, 4:37 p.m. OK PyPy 3 TESTS 29 140 0 1500
60189988 scheduler D1 Sept. 6, 2019, 8:41 p.m. OK PyPy 3 TESTS 29 140 0 1500
59954500 xodeChemist D1 Sept. 3, 2019, 3:39 p.m. OK PyPy 3 TESTS 29 140 0 1500
59852989 Akash_123 D1 Sept. 1, 2019, 12:21 p.m. OK PyPy 3 TESTS 29 140 1433600 1500
68064196 Waiting D1 Jan. 2, 2020, 6:39 a.m. OK PyPy 3 TESTS 29 140 1638400 1500
60045066 scheduler D1 Sept. 4, 2019, 8 p.m. OK PyPy 3 TESTS 29 140 1843200 1500
59852687 Akash_123 D1 Sept. 1, 2019, 12:13 p.m. OK PyPy 3 TESTS 29 140 1843200 1500
62409977 r_dmv D1 Oct. 12, 2019, 10:07 a.m. OK PyPy 3 TESTS 29 140 2252800 1500
61388973 daniel.carlos D1 Sept. 27, 2019, 8:22 p.m. OK Python 2 TESTS 29 202 0 1500
59885166 Madhur1906 D1 Sept. 2, 2019, 7:32 a.m. OK Python 2 TESTS 29 218 10956800 1500
59849658 kaif_7 D1 Sept. 1, 2019, 10:57 a.m. OK Python 2 TESTS 29 358 28979200 1500
64189423 the_pythor D1 Nov. 4, 2019, 7:01 a.m. OK Python 3 TESTS 29 109 0 1500
59942950 gaurav6225 D1 Sept. 3, 2019, 12:05 p.m. OK Python 3 TESTS 29 109 0 1500
59832877 werllenwang D1 Sept. 1, 2019, 1:18 a.m. OK Python 3 TESTS 29 109 307200 1500
60448575 giorgigona D1 Sept. 12, 2019, 3:03 p.m. OK Python 3 TESTS 29 124 0 1500
60363346 staiyzia D1 Sept. 10, 2019, 7:23 p.m. OK Python 3 TESTS 29 124 0 1500
60049548 faroukfaiz D1 Sept. 4, 2019, 11:12 p.m. OK Python 3 TESTS 29 124 0 1500
59891551 denis.nasyrov D1 Sept. 2, 2019, 10:36 a.m. OK Python 3 TESTS 29 124 0 1500
60334169 namanjain2912 D1 Sept. 10, 2019, 7:39 a.m. OK Python 3 TESTS 29 124 409600 1500
59889768 user_0001 D1 Sept. 2, 2019, 9:50 a.m. OK Python 3 TESTS 29 124 409600 1500
60964636 StefanSig D1 Sept. 21, 2019, 6:37 a.m. OK Python 3 TESTS 29 124 716800 1500
59900211 Andrey_R D1 Sept. 2, 2019, 1:25 p.m. OK Ruby TESTS 29 109 16588800 1500
60694488 stripe D1 Sept. 16, 2019, 6:51 p.m. OK Rust TESTS 29 31 0 1500
60456033 tpoeiras D1 Sept. 12, 2019, 5:58 p.m. OK Rust TESTS 29 31 0 1500
61303249 chinmaykousik1 D1 Sept. 26, 2019, 6:04 a.m. OK Rust TESTS 29 31 102400 1500
59836056 arzk D1 Sept. 1, 2019, 4:10 a.m. OK Rust TESTS 29 46 0 1500

remove filters

Back to search problems