Codeforces Round 684 (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
1440 Codeforces Round 684 (Div. 2) FINISHED False 8100 131642663 Nov. 17, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 19920 ) B Sum of Medians PROGRAMMING greedy math

B'A median of an array of integers of length n is the number standing on the lceil { frac{n}{2}} rceil (rounding up) position in the non-decreasing ordering of its elements. Positions are numbered starting with 1 . For example, a median of the array [2, 6, 4, 1, 3, 5] is equal to 3 . There exist some other definitions of the median, but in this problem, we will use the described one. Given two integers n and k and non-decreasing array of nk integers. Divide all numbers into k arrays of size n , such that each number belongs to exactly one array. You want the sum of medians of all k arrays to be the maximum possible. Find this maximum possible sum. The first line contains a single integer t ( 1 <= q t <= q 100 ) -- the number of test cases. The next 2t lines contain descriptions of test cases. The first line of the description of each test case contains two integers n , k ( 1 <= q n, k <= q 1000 ). The second line of the description of each test case contains nk integers a_1, a_2, ldots, a_{nk} ( 0 <= q a_i <= q 10^9 ) -- given array. It is guaranteed that the array is non-decreasing: a_1 <= q a_2 <= q ldots <= q a_{nk} . It is guaranteed that the sum of nk for all test cases does not exceed 2 cdot 10^5 . For each test case print a single integer -- the maximum possible sum of medians of all k arrays. The examples of possible divisions into arrays for all test cases of the first test: Test case 1 : [0, 24], [34, 58], [62, 64], [69, 78] . The medians are 0, 34, 62, 69 . Their sum is 165 . Test case 2 : [27, 61], [81, 91] . The medians are 27, 81 . Their sum is 108 . Test case 3 : [2, 91, 92, 95], [4, 36, 53, 82], [16, 18, 21, 27] . The medians are 91, 36, 18 . Their sum is 145 . Test case 4 : [3, 33, 35], [11, 94, 99], [12, 38, 67], [22, 69, 71] . The'...

Tutorials

Codeforces Round #684[Div1 and Div2] Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
98752094 ja1467 B Nov. 17, 2020, 6:14 p.m. OK GNU C11 TESTS 10 46 0
98747597 i_tm_hit_iron B Nov. 17, 2020, 5:30 p.m. OK GNU C11 TESTS 10 46 819200
98733254 hritik27 B Nov. 17, 2020, 4:25 p.m. OK GNU C11 TESTS 10 46 1638400
98776541 2511689622 B Nov. 18, 2020, 5:34 a.m. OK GNU C11 TESTS 10 46 3993600
98778068 fisheep B Nov. 18, 2020, 5:59 a.m. OK GNU C++11 TESTS 10 30 0
98739740 rojer001 B Nov. 17, 2020, 4:41 p.m. OK GNU C++11 TESTS 10 31 614400
98764563 WhiteCmile B Nov. 17, 2020, 11:55 p.m. OK GNU C++11 TESTS 10 31 819200
98769520 C1807 B Nov. 18, 2020, 3:02 a.m. OK GNU C++11 TESTS 10 31 7987200
98764021 _Ionic_Bond B Nov. 17, 2020, 11:26 p.m. OK GNU C++11 TESTS 10 31 8089600
98735501 HUST_DHC B Nov. 17, 2020, 4:30 p.m. OK GNU C++11 TESTS 10 46 819200
98764357 william555 B Nov. 17, 2020, 11:45 p.m. OK GNU C++11 TESTS 10 46 819200
98732527 WhiteStork B Nov. 17, 2020, 4:23 p.m. OK GNU C++11 TESTS 10 46 1228800
98737267 DuLR10 B Nov. 17, 2020, 4:35 p.m. OK GNU C++11 TESTS 10 46 1536000
98769037 clpl B Nov. 18, 2020, 2:50 a.m. OK GNU C++11 TESTS 10 46 1638400
98747612 ftowaha B Nov. 17, 2020, 5:30 p.m. OK GNU C++14 TESTS 10 46 819200
98777329 rupakk B Nov. 18, 2020, 5:47 a.m. OK GNU C++14 TESTS 10 46 819200
98774953 i_love_ananya B Nov. 18, 2020, 5:05 a.m. OK GNU C++14 TESTS 10 46 819200
98751866 craw_fish B Nov. 17, 2020, 6:11 p.m. OK GNU C++14 TESTS 10 46 819200
98750071 bawkarmanish14 B Nov. 17, 2020, 5:50 p.m. OK GNU C++14 TESTS 10 46 819200
98739762 chirantan_2001 B Nov. 17, 2020, 4:41 p.m. OK GNU C++14 TESTS 10 46 819200
98777600 extra_2001 B Nov. 18, 2020, 5:51 a.m. OK GNU C++14 TESTS 10 46 1536000
98750724 code_stacker B Nov. 17, 2020, 5:57 p.m. OK GNU C++14 TESTS 10 46 1638400
98766063 conxincacu B Nov. 18, 2020, 1:10 a.m. OK GNU C++14 TESTS 10 46 1638400
98774020 nat_woa B Nov. 18, 2020, 4:46 a.m. OK GNU C++14 TESTS 10 46 1638400
98765668 David_Yap B Nov. 18, 2020, 12:51 a.m. OK GNU C++17 TESTS 10 46 0
98740213 riskrain B Nov. 17, 2020, 4:42 p.m. OK GNU C++17 TESTS 10 46 0
98754730 tashbulatov_renat B Nov. 17, 2020, 6:53 p.m. OK GNU C++17 TESTS 10 46 819200
98768522 Shameem17 B Nov. 18, 2020, 2:37 a.m. OK GNU C++17 TESTS 10 46 819200
98757741 um_nothing B Nov. 17, 2020, 7:49 p.m. OK GNU C++17 TESTS 10 46 819200
98748545 khealer B Nov. 17, 2020, 5:37 p.m. OK GNU C++17 TESTS 10 46 819200
98748500 bavesh B Nov. 17, 2020, 5:36 p.m. OK GNU C++17 TESTS 10 46 819200
98746514 sjay05 B Nov. 17, 2020, 5:23 p.m. OK GNU C++17 TESTS 10 46 819200
98744034 Mamoun.mohamed B Nov. 17, 2020, 4:49 p.m. OK GNU C++17 TESTS 10 46 819200
98737100 i.trofimow B Nov. 17, 2020, 4:34 p.m. OK GNU C++17 TESTS 10 46 819200
98775804 Anisur_rahaman B Nov. 18, 2020, 5:22 a.m. OK GNU C++17 (64) TESTS 10 31 819200
98758906 Clu3l3ss B Nov. 17, 2020, 8:16 p.m. OK GNU C++17 (64) TESTS 10 31 819200
98753629 rniya B Nov. 17, 2020, 6:36 p.m. OK GNU C++17 (64) TESTS 10 31 819200
98769979 Ameliorate B Nov. 18, 2020, 3:14 a.m. OK GNU C++17 (64) TESTS 10 31 921600
98777466 alif_cse_ju B Nov. 18, 2020, 5:49 a.m. OK GNU C++17 (64) TESTS 10 31 1331200
98765925 Joker_Gamer B Nov. 18, 2020, 1:04 a.m. OK GNU C++17 (64) TESTS 10 31 1638400
98747351 hacker0079 B Nov. 17, 2020, 5:28 p.m. OK GNU C++17 (64) TESTS 10 31 1638400
98750795 poikniok B Nov. 17, 2020, 5:58 p.m. OK GNU C++17 (64) TESTS 10 31 1638400
98732415 Loke_0 B Nov. 17, 2020, 4:22 p.m. OK GNU C++17 (64) TESTS 10 31 2150400
98758607 AceKing B Nov. 17, 2020, 8:08 p.m. OK GNU C++17 (64) TESTS 10 31 3993600
98768134 codelegend B Nov. 18, 2020, 2:26 a.m. OK Haskell TESTS 10 561 11571200
98747986 gssakash B Nov. 17, 2020, 5:33 p.m. OK Java 11 TESTS 10 171 0
98771196 prafful49 B Nov. 18, 2020, 3:43 a.m. OK Java 11 TESTS 10 187 0
98746101 kunalkatiyar9 B Nov. 17, 2020, 5:21 p.m. OK Java 11 TESTS 10 187 0
98746223 nirvana_rsc B Nov. 17, 2020, 5:22 p.m. OK Java 11 TESTS 10 202 0
98774598 _3019_ B Nov. 18, 2020, 4:58 a.m. OK Java 11 TESTS 10 202 0
98774534 _3019_ B Nov. 18, 2020, 4:56 a.m. OK Java 11 TESTS 10 202 0
98748977 sanju2504 B Nov. 17, 2020, 5:40 p.m. OK Java 11 TESTS 10 202 0
98736772 tusharrr B Nov. 17, 2020, 4:34 p.m. OK Java 11 TESTS 10 202 0
98769870 mohitn B Nov. 18, 2020, 3:12 a.m. OK Java 11 TESTS 10 217 0
98732687 Mhmmd.itani B Nov. 17, 2020, 4:23 p.m. OK Java 11 TESTS 10 217 0
98750516 ujjwalavishek B Nov. 17, 2020, 5:55 p.m. OK Java 8 TESTS 10 108 0
98775555 Keyur21 B Nov. 18, 2020, 5:17 a.m. OK Java 8 TESTS 10 109 0
98749316 overwrite B Nov. 17, 2020, 5:43 p.m. OK Java 8 TESTS 10 109 0
98748224 overwrite B Nov. 17, 2020, 5:34 p.m. OK Java 8 TESTS 10 109 0
98740617 deepaksach B Nov. 17, 2020, 4:43 p.m. OK Java 8 TESTS 10 109 0
98765596 nitsshukla B Nov. 18, 2020, 12:47 a.m. OK Java 8 TESTS 10 124 0
98749372 overwrite B Nov. 17, 2020, 5:44 p.m. OK Java 8 TESTS 10 124 0
98747290 MartyByrde B Nov. 17, 2020, 5:27 p.m. OK Java 8 TESTS 10 124 0
98739533 kirubankamaraj B Nov. 17, 2020, 4:40 p.m. OK Java 8 TESTS 10 124 0
98770737 csn3rd B Nov. 18, 2020, 3:33 a.m. OK Java 8 TESTS 10 124 2764800
98737670 1yanov B Nov. 17, 2020, 4:36 p.m. OK JavaScript TESTS 10 46 16793600
98731656 FutureAnge1 B Nov. 17, 2020, 4:20 p.m. OK JavaScript TESTS 10 46 16793600
98749858 Hyrulia B Nov. 17, 2020, 5:48 p.m. OK Kotlin TESTS 10 156 5222400
98762514 3bab B Nov. 17, 2020, 10:11 p.m. OK Kotlin TESTS 10 249 16998400
98755288 koper B Nov. 17, 2020, 7:02 p.m. OK Kotlin TESTS 10 265 18739200
98752220 horvat.kamca B Nov. 17, 2020, 6:15 p.m. OK Kotlin TESTS 10 280 18739200
98752375 horvat.kamca B Nov. 17, 2020, 6:18 p.m. OK Kotlin TESTS 10 296 18739200
98776415 BrClaud B Nov. 18, 2020, 5:32 a.m. OK MS C++ 2017 TESTS 10 62 819200
98732311 tawfekhesham B Nov. 17, 2020, 4:22 p.m. OK MS C++ 2017 TESTS 10 155 4812800
98747635 Gravekper B Nov. 17, 2020, 5:30 p.m. OK MS C++ 2017 TESTS 10 171 819200
98739911 chilly_willy B Nov. 17, 2020, 4:41 p.m. OK MS C++ 2017 TESTS 10 171 1638400
98753714 mstf.nakhaei B Nov. 17, 2020, 6:37 p.m. OK MS C++ 2017 TESTS 10 171 3174400
98738652 CrazyDr B Nov. 17, 2020, 4:38 p.m. OK PHP TESTS 10 46 18432000
98745980 guptakhushi345 B Nov. 17, 2020, 5:21 p.m. OK PyPy 2 TESTS 10 108 12902400
98762133 lebron87 B Nov. 17, 2020, 9:54 p.m. OK PyPy 2 TESTS 10 155 12800000
98740197 kaleabasfaw2010 B Nov. 17, 2020, 4:42 p.m. OK PyPy 3 TESTS 10 186 15462400
98750355 apurva3455 B Nov. 17, 2020, 5:53 p.m. OK PyPy 3 TESTS 10 186 16281600
98770629 _justMe B Nov. 18, 2020, 3:30 a.m. OK PyPy 3 TESTS 10 187 15360000
98776783 caow B Nov. 18, 2020, 5:38 a.m. OK PyPy 3 TESTS 10 202 15564800
98748658 code_code_code B Nov. 17, 2020, 5:38 p.m. OK PyPy 3 TESTS 10 248 11571200
98737891 chethan_123 B Nov. 17, 2020, 4:36 p.m. OK PyPy 3 TESTS 10 264 19046400
98731228 naman5811 B Nov. 17, 2020, 4:19 p.m. OK PyPy 3 TESTS 10 264 19251200
98758507 sourabhgol1999 B Nov. 17, 2020, 8:05 p.m. OK PyPy 3 TESTS 10 265 11673600
98774192 Vsein B Nov. 18, 2020, 4:49 a.m. OK PyPy 3 TESTS 10 265 13824000
98765979 EugeneJudo B Nov. 18, 2020, 1:07 a.m. OK PyPy 3 TESTS 10 265 19251200
98753480 elistark B Nov. 17, 2020, 6:34 p.m. OK Python 2 TESTS 10 265 11059200
98748689 code_code_code B Nov. 17, 2020, 5:38 p.m. OK Python 3 TESTS 10 109 12800000
98731397 vmrodrigues505 B Nov. 17, 2020, 4:20 p.m. OK Python 3 TESTS 10 109 12902400
98759512 dominator666 B Nov. 17, 2020, 8:29 p.m. OK Python 3 TESTS 10 124 16793600
98778319 jaideepsingh312000 B Nov. 18, 2020, 6:03 a.m. OK Python 3 TESTS 10 139 16793600
98774669 vips27 B Nov. 18, 2020, 4:59 a.m. OK Python 3 TESTS 10 139 16793600
98772497 gamitejpratapsingh998 B Nov. 18, 2020, 4:13 a.m. OK Python 3 TESTS 10 139 16793600
98736104 dikshajoshi1800 B Nov. 17, 2020, 4:32 p.m. OK Python 3 TESTS 10 139 16793600
98752524 sh1194 B Nov. 17, 2020, 6:19 p.m. OK Python 3 TESTS 10 139 16896000
98774813 sohel0707 B Nov. 18, 2020, 5:02 a.m. OK Python 3 TESTS 10 140 16793600
98771184 Rashi30 B Nov. 18, 2020, 3:43 a.m. OK Python 3 TESTS 10 140 16793600
98772550 ryad0m B Nov. 18, 2020, 4:14 a.m. OK Rust TESTS 10 46 7065600
98752919 kobae964 B Nov. 17, 2020, 6:25 p.m. OK Rust TESTS 10 77 1843200

remove filters

Back to search problems