Codeforces Round 760 (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
1618 Codeforces Round 760 (Div. 3) FINISHED False 8100 92330699 Dec. 14, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 19083 ) D Array and Operations PROGRAMMING dp greedy math

B"You are given an array a of n integers, and another integer k such that 2k <= n . You have to perform exactly k operations with this array. In one operation, you have to choose two elements of the array (let them be a_i and a_j ; they can be equal or different, but their positions in the array must not be the same), remove them from the array, and add lfloor frac{a_i}{a_j} rfloor to your score, where lfloor frac{x}{y} rfloor is the maximum integer not exceeding frac{x}{y} . Initially, your score is 0 . After you perform exactly k operations, you add all the remaining elements of the array to the score. Calculate the minimum possible score you can get. The first line of the input contains one integer t ( 1 <= t <= 500 ) -- the number of test cases. Each test case consists of two lines. The first line contains two integers n and k ( 1 <= n <= 100 ; 0 <= k <= lfloor frac{n}{2} rfloor ). The second line contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 2 cdot 10^5 ). Print one integer -- the minimum possible score you can get. Let's consider the example test. In the first test case, one way to obtain a score of 2 is the following one: In the second test case, no matter which operations you choose, the resulting score is 16 . In the third test case, one way to obtain a score of 0 is the following one: In the fourth test case, no operations can be performed, so the score is the sum of the elements of the array: 4 + 2 = 6 . "...

Tutorials

Codeforces Round #760 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
139345451 parham_k D Dec. 15, 2021, 2:31 a.m. OK Clang++17 Diagnostics TESTS 3 233 3174400
139338245 vjudge3 D Dec. 15, 2021, 12:57 a.m. OK Clang++17 Diagnostics TESTS 3 265 1024000
139350588 ssvb D Dec. 15, 2021, 4:26 a.m. OK D TESTS 3 15 1945600
139338774 Zollo757347 D Dec. 15, 2021, 1:14 a.m. OK GNU C11 TESTS 3 15 0
139313156 mugiwara_2980 D Dec. 14, 2021, 5:06 p.m. OK GNU C++14 TESTS 3 0 102400
139315887 astro_lion D Dec. 14, 2021, 5:25 p.m. OK GNU C++14 TESTS 3 0 204800
139306197 syyyl D Dec. 14, 2021, 4:45 p.m. OK GNU C++14 TESTS 3 0 409600
139352054 342zhuyongqi D Dec. 15, 2021, 4:50 a.m. OK GNU C++14 TESTS 3 0 3993600
139354091 Vocalise D Dec. 15, 2021, 5:21 a.m. OK GNU C++14 TESTS 3 0 33587200
139354631 Dage. D Dec. 15, 2021, 5:29 a.m. OK GNU C++14 TESTS 3 15 0
139354551 yyf. D Dec. 15, 2021, 5:28 a.m. OK GNU C++14 TESTS 3 15 0
139354033 r_aj1_23 D Dec. 15, 2021, 5:20 a.m. OK GNU C++14 TESTS 3 15 0
139355723 _bella_ciao_ D Dec. 15, 2021, 5:45 a.m. OK GNU C++14 TESTS 3 15 0
139354883 shashwat_nayak D Dec. 15, 2021, 5:33 a.m. OK GNU C++14 TESTS 3 15 0
139347071 Anand_67 D Dec. 15, 2021, 3:12 a.m. OK GNU C++17 TESTS 3 0 0
139328122 hydracody D Dec. 14, 2021, 7:58 p.m. OK GNU C++17 TESTS 3 0 0
139317794 of_raj D Dec. 14, 2021, 5:43 p.m. OK GNU C++17 TESTS 3 0 0
139317487 Dasher001 D Dec. 14, 2021, 5:40 p.m. OK GNU C++17 TESTS 3 0 0
139315956 aman_singh_20 D Dec. 14, 2021, 5:26 p.m. OK GNU C++17 TESTS 3 0 0
139305748 lrb666 D Dec. 14, 2021, 4:44 p.m. OK GNU C++17 TESTS 3 0 0
139332768 ags6699 D Dec. 14, 2021, 9:30 p.m. OK GNU C++17 TESTS 3 0 0
139355667 aman_20 D Dec. 15, 2021, 5:44 a.m. OK GNU C++17 TESTS 3 0 102400
139348735 animesh624 D Dec. 15, 2021, 3:50 a.m. OK GNU C++17 TESTS 3 0 102400
139356156 blasterking D Dec. 15, 2021, 5:50 a.m. OK GNU C++17 TESTS 3 0 102400
139329194 Mac.Rose D Dec. 14, 2021, 8:16 p.m. OK GNU C++17 (64) TESTS 3 0 0
139356042 aps_20 D Dec. 15, 2021, 5:49 a.m. OK GNU C++17 (64) TESTS 3 0 0
139355982 manxv7 D Dec. 15, 2021, 5:48 a.m. OK GNU C++17 (64) TESTS 3 0 0
139354647 DeclareWar D Dec. 15, 2021, 5:29 a.m. OK GNU C++17 (64) TESTS 3 0 0
139351148 CODERGARV D Dec. 15, 2021, 4:35 a.m. OK GNU C++17 (64) TESTS 3 0 0
139348266 Temmie D Dec. 15, 2021, 3:39 a.m. OK GNU C++17 (64) TESTS 3 0 0
139338788 forceac D Dec. 15, 2021, 1:15 a.m. OK GNU C++17 (64) TESTS 3 0 0
139329339 waste_of_space D Dec. 14, 2021, 8:19 p.m. OK GNU C++17 (64) TESTS 3 0 0
139328483 sanjit_15 D Dec. 14, 2021, 8:05 p.m. OK GNU C++17 (64) TESTS 3 0 0
139323250 Evgeny_Novak D Dec. 14, 2021, 6:46 p.m. OK GNU C++17 (64) TESTS 3 0 0
139355567 heisenberg09 D Dec. 15, 2021, 5:42 a.m. OK GNU C++20 (64) TESTS 3 0 0
139351977 Chetas D Dec. 15, 2021, 4:49 a.m. OK GNU C++20 (64) TESTS 3 0 0
139349980 math_id D Dec. 15, 2021, 4:14 a.m. OK GNU C++20 (64) TESTS 3 0 0
139349861 schiftyfive4 D Dec. 15, 2021, 4:12 a.m. OK GNU C++20 (64) TESTS 3 0 0
139349746 abcdefg2001 D Dec. 15, 2021, 4:10 a.m. OK GNU C++20 (64) TESTS 3 0 0
139349067 don2001 D Dec. 15, 2021, 3:57 a.m. OK GNU C++20 (64) TESTS 3 0 0
139348040 Bingoblin D Dec. 15, 2021, 3:34 a.m. OK GNU C++20 (64) TESTS 3 0 0
139347106 20abzal07 D Dec. 15, 2021, 3:13 a.m. OK GNU C++20 (64) TESTS 3 0 0
139347046 noname___ D Dec. 15, 2021, 3:11 a.m. OK GNU C++20 (64) TESTS 3 0 0
139357004 NotANoob D Dec. 15, 2021, 6:02 a.m. OK GNU C++20 (64) TESTS 3 0 0
139323813 LucunJi D Dec. 14, 2021, 6:54 p.m. OK Java 11 TESTS 3 155 0
139344916 sumitchavan D Dec. 15, 2021, 2:14 a.m. OK Java 11 TESTS 3 156 0
139318631 AhmedMaheeb D Dec. 14, 2021, 5:52 p.m. OK Java 11 TESTS 3 170 0
139330088 y_cat D Dec. 14, 2021, 8:31 p.m. OK Java 11 TESTS 3 171 0
139312809 NO__OB D Dec. 14, 2021, 5:04 p.m. OK Java 11 TESTS 3 171 0
139323492 suhas5979 D Dec. 14, 2021, 6:49 p.m. OK Java 11 TESTS 3 186 0
139350205 Sandy_coder2001 D Dec. 15, 2021, 4:18 a.m. OK Java 11 TESTS 3 186 0
139309676 tushar_patil D Dec. 14, 2021, 4:49 p.m. OK Java 11 TESTS 3 186 0
139306140 vinam D Dec. 14, 2021, 4:45 p.m. OK Java 11 TESTS 3 186 0
139305039 sumit.dhull610 D Dec. 14, 2021, 4:43 p.m. OK Java 11 TESTS 3 186 0
139347013 PRIYANSH_TOMAR D Dec. 15, 2021, 3:11 a.m. OK Java 8 TESTS 3 77 0
139354035 ruchir28 D Dec. 15, 2021, 5:20 a.m. OK Java 8 TESTS 3 93 0
139348910 vaibhav_1710 D Dec. 15, 2021, 3:54 a.m. OK Java 8 TESTS 3 93 0
139348133 abhishek_raut1 D Dec. 15, 2021, 3:36 a.m. OK Java 8 TESTS 3 93 0
139346650 sathish1717 D Dec. 15, 2021, 3:02 a.m. OK Java 8 TESTS 3 93 0
139326542 Adi_7861 D Dec. 14, 2021, 7:34 p.m. OK Java 8 TESTS 3 93 0
139315456 I_love_camel_case D Dec. 14, 2021, 5:22 p.m. OK Java 8 TESTS 3 93 0
139312004 SuvajitGhosh D Dec. 14, 2021, 4:59 p.m. OK Java 8 TESTS 3 93 0
139345699 dangvu0502 D Dec. 15, 2021, 2:38 a.m. OK Java 8 TESTS 3 108 0
139314225 akhilesh_2410 D Dec. 14, 2021, 5:12 p.m. OK Java 8 TESTS 3 108 0
139350012 forest D Dec. 15, 2021, 4:15 a.m. OK MS C++ 2017 TESTS 3 31 0
139345969 Shuai. D Dec. 15, 2021, 2:45 a.m. OK MS C++ 2017 TESTS 3 31 0
139322892 CrashMaster D Dec. 14, 2021, 6:42 p.m. OK MS C++ 2017 TESTS 3 186 819200
139313794 1_2_3_4_5_9 D Dec. 14, 2021, 5:09 p.m. OK PyPy 2 TESTS 3 62 1843200
139327955 hxu10 D Dec. 14, 2021, 7:55 p.m. OK PyPy 3 TESTS 3 77 2560000
139320906 xuhao95 D Dec. 14, 2021, 6:17 p.m. OK PyPy 3 TESTS 3 77 2560000
139318561 xuhao95 D Dec. 14, 2021, 5:51 p.m. OK PyPy 3 TESTS 3 108 2560000
139312264 prachir1501 D Dec. 14, 2021, 5:01 p.m. OK PyPy 3 TESTS 3 124 3276800
139329012 Pheonix23 D Dec. 14, 2021, 8:13 p.m. OK PyPy 3 TESTS 3 124 3379200
139315560 rishabhsingh054 D Dec. 14, 2021, 5:22 p.m. OK PyPy 3 TESTS 3 124 3379200
139345470 sr3gm D Dec. 15, 2021, 2:31 a.m. OK PyPy 3 TESTS 3 124 3481600
139325934 Liberator187 D Dec. 14, 2021, 7:25 p.m. OK PyPy 3 TESTS 3 139 4505600
139344683 wolfram_ D Dec. 15, 2021, 2:06 a.m. OK PyPy 3 TESTS 3 140 2867200
139307435 Hot_Potato D Dec. 14, 2021, 4:47 p.m. OK PyPy 3 TESTS 3 171 4300800
139313590 Sir.Alireza D Dec. 14, 2021, 5:08 p.m. OK PyPy 3-64 TESTS 3 124 2457600
139320631 guineapig D Dec. 14, 2021, 6:14 p.m. OK PyPy 3-64 TESTS 3 140 2867200
139351144 epoweripi D Dec. 15, 2021, 4:35 a.m. OK PyPy 3-64 TESTS 3 155 3276800
139313039 konductor11 D Dec. 14, 2021, 5:05 p.m. OK PyPy 3-64 TESTS 3 171 3891200
139308928 raushnn D Dec. 14, 2021, 4:48 p.m. OK PyPy 3-64 TESTS 3 186 3891200
139356407 Himanshu_Kaithal D Dec. 15, 2021, 5:54 a.m. OK PyPy 3-64 TESTS 3 186 3993600
139311246 PerfectoZ D Dec. 14, 2021, 4:55 p.m. OK PyPy 3-64 TESTS 3 187 3379200
139307458 konark99 D Dec. 14, 2021, 4:47 p.m. OK PyPy 3-64 TESTS 3 187 4300800
139316058 generic_placeholder_name D Dec. 14, 2021, 5:27 p.m. OK PyPy 3-64 TESTS 3 202 4300800
139353753 Psuedo D Dec. 15, 2021, 5:16 a.m. OK PyPy 3-64 TESTS 3 202 4608000
139351931 YoungForUzz D Dec. 15, 2021, 4:48 a.m. OK Python 3 TESTS 3 31 0
139356750 dr.stone D Dec. 15, 2021, 5:58 a.m. OK Python 3 TESTS 3 46 0
139319492 tommypranay D Dec. 14, 2021, 6:01 p.m. OK Python 3 TESTS 3 46 0
139352615 oddasparagus11 D Dec. 15, 2021, 4:59 a.m. OK Python 3 TESTS 3 61 0
139322769 Creative10p D Dec. 14, 2021, 6:40 p.m. OK Python 3 TESTS 3 61 0
139314866 Spacelessd D Dec. 14, 2021, 5:17 p.m. OK Python 3 TESTS 3 61 0
139313830 abineth D Dec. 14, 2021, 5:10 p.m. OK Python 3 TESTS 3 61 0
139308766 ankitaggarwal D Dec. 14, 2021, 4:48 p.m. OK Python 3 TESTS 3 61 0
139352771 anuragvaidya D Dec. 15, 2021, 5:02 a.m. OK Python 3 TESTS 3 62 0
139327283 julondonor D Dec. 14, 2021, 7:45 p.m. OK Python 3 TESTS 3 62 0
139327842 sansen D Dec. 14, 2021, 7:53 p.m. OK Rust 2021 TESTS 3 15 1024000
139355933 pili D Dec. 15, 2021, 5:47 a.m. OK Rust 2021 TESTS 3 31 0
139305953 Avanta D Dec. 14, 2021, 4:44 p.m. OK Rust 2021 TESTS 3 93 1024000

remove filters

Back to search problems