Codeforces Round 773 (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
1642 Codeforces Round 773 (Div. 2) FINISHED False 7200 91655363 Feb. 23, 2022, 10:10 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 17155 ) B Power Walking PROGRAMMING greedy

B'Sam is a kindergartener, and there are n children in his group. He decided to create a team with some of his children to play "brawl:go 2". Sam has n power-ups, the i -th has type a_i . A child 's strength is equal to the number of different types among power-ups he has. For a team of size k , Sam will distribute all n power-ups to k children in such a way that each of the k children receives at least one power-up, and each power-up is given to someone. For each integer k from 1 to n , find the minimum sum of strengths of a team of k children Sam can get. Each test contains multiple test cases. The first line contains a single integer t ( 1 <= t <= 3 cdot 10^5 ) -- the number of test cases. Description of the test cases follows. The first line of each test case contains a single integer n ( 1 <= n <= 3 cdot 10^5 ). The second line contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= 10^9 ) -- types of Sam 's power-ups. It is guaranteed that the sum of n over all test cases does not exceed 3 cdot 10^5 . For every test case print n integers. The k -th integer should be equal to the minimum sum of strengths of children in the team of size k that Sam can get. One of the ways to give power-ups to minimise the sum of strengths in the first test case: One of the ways to give power-ups to minimise the sum of strengths in the second test case: '...

Tutorials

Codeforces Round #773 editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
147527183 jkilopu B Feb. 24, 2022, 2:49 a.m. OK GNU C++14 TESTS 6 61 34816000
147537701 wakaranai B Feb. 24, 2022, 6 a.m. OK GNU C++14 TESTS 7 124 1228800
147529522 xudong B Feb. 24, 2022, 3:41 a.m. OK GNU C++14 TESTS 7 124 1228800
147526461 jcccc B Feb. 24, 2022, 2:31 a.m. OK GNU C++14 TESTS 6 124 1228800
147524885 yybs B Feb. 24, 2022, 1:47 a.m. OK GNU C++14 TESTS 6 124 1228800
147509704 rachel0411 B Feb. 23, 2022, 7:28 p.m. OK GNU C++14 TESTS 6 124 1228800
147499295 impavan B Feb. 23, 2022, 5:20 p.m. OK GNU C++14 TESTS 6 124 1228800
147478356 daxian1024 B Feb. 23, 2022, 1:55 p.m. OK GNU C++14 TESTS 6 124 1228800
147475525 Obsession_de_Population B Feb. 23, 2022, 1:32 p.m. OK GNU C++14 TESTS 6 124 1228800
147477771 c20230658 B Feb. 23, 2022, 1:51 p.m. OK GNU C++14 TESTS 6 124 1228800
147477693 izaj B Feb. 23, 2022, 1:50 p.m. OK GNU C++17 TESTS 6 124 1228800
147530809 PunkerBunk B Feb. 24, 2022, 4:07 a.m. OK GNU C++17 TESTS 7 124 1228800
147529422 niqiqi B Feb. 24, 2022, 3:39 a.m. OK GNU C++17 TESTS 7 124 1228800
147516023 Goshix B Feb. 23, 2022, 9:22 p.m. OK GNU C++17 TESTS 6 124 1228800
147515110 AshrafYousry B Feb. 23, 2022, 9:01 p.m. OK GNU C++17 TESTS 6 124 1228800
147515062 AshrafYousry B Feb. 23, 2022, 9 p.m. OK GNU C++17 TESTS 6 124 1228800
147502168 SilverWing05 B Feb. 23, 2022, 5:52 p.m. OK GNU C++17 TESTS 6 124 1228800
147500259 avnish01012002 B Feb. 23, 2022, 5:31 p.m. OK GNU C++17 TESTS 6 124 1228800
147484598 Skywk B Feb. 23, 2022, 2:51 p.m. OK GNU C++17 TESTS 6 124 1228800
147469601 shadownb B Feb. 23, 2022, 12:52 p.m. OK GNU C++17 TESTS 6 124 1228800
147497164 XqNUOgE5 B Feb. 23, 2022, 4:56 p.m. OK GNU C++17 (64) TESTS 6 93 1228800
147533675 LAB B Feb. 24, 2022, 4:59 a.m. OK GNU C++17 (64) TESTS 7 93 1228800
147504964 mesbah19 B Feb. 23, 2022, 6:20 p.m. OK GNU C++17 (64) TESTS 6 93 1228800
147503034 KKT_89 B Feb. 23, 2022, 6 p.m. OK GNU C++17 (64) TESTS 6 93 1228800
147488388 neolith B Feb. 23, 2022, 3:25 p.m. OK GNU C++17 (64) TESTS 6 93 1228800
147473216 unoexp B Feb. 23, 2022, 1:16 p.m. OK GNU C++17 (64) TESTS 6 93 2457600
147461978 GreyMatter14 B Feb. 23, 2022, noon OK GNU C++17 (64) TESTS 6 93 6656000
147476752 Dog_food_is_me B Feb. 23, 2022, 1:42 p.m. OK GNU C++17 (64) TESTS 6 108 15564800
147468148 asd12 B Feb. 23, 2022, 12:45 p.m. OK GNU C++17 (64) TESTS 6 109 3993600
147514050 jose_0222 B Feb. 23, 2022, 8:38 p.m. OK GNU C++17 (64) TESTS 6 109 16076800
147486739 Porag_2742 B Feb. 23, 2022, 3:10 p.m. OK GNU C++20 (64) TESTS 6 77 1228800
147505853 7misha B Feb. 23, 2022, 6:31 p.m. OK GNU C++20 (64) TESTS 6 77 1228800
147502930 AhmedMaher10 B Feb. 23, 2022, 5:59 p.m. OK GNU C++20 (64) TESTS 6 77 1228800
147469563 xprezzzboi B Feb. 23, 2022, 12:52 p.m. OK GNU C++20 (64) TESTS 6 77 2457600
147535335 KIMCHIWARRIOR B Feb. 24, 2022, 5:26 a.m. OK GNU C++20 (64) TESTS 7 77 2457600
147471303 pyaari_billi B Feb. 23, 2022, 1:03 p.m. OK GNU C++20 (64) TESTS 6 77 5427200
147488661 nebula B Feb. 23, 2022, 3:28 p.m. OK GNU C++20 (64) TESTS 6 78 1228800
147490061 A_G B Feb. 23, 2022, 3:40 p.m. OK GNU C++20 (64) TESTS 6 78 1228800
147484791 avinash204 B Feb. 23, 2022, 2:52 p.m. OK GNU C++20 (64) TESTS 6 78 2355200
147530827 rjain1 B Feb. 24, 2022, 4:07 a.m. OK GNU C++20 (64) TESTS 7 78 2457600
147458460 Isfandiyor B Feb. 23, 2022, 11:48 a.m. OK Java 11 TESTS 6 327 4300800
147531677 reverenc B Feb. 24, 2022, 4:23 a.m. OK Java 11 TESTS 7 358 15257600
147458681 x21svage B Feb. 23, 2022, 11:49 a.m. OK Java 11 TESTS 6 373 16793600
147489305 Taha_Firoz B Feb. 23, 2022, 3:33 p.m. OK Java 11 TESTS 6 374 7475200
147514963 mareshkau B Feb. 23, 2022, 8:57 p.m. OK Java 11 TESTS 6 374 20582400
147474462 eshan18.09 B Feb. 23, 2022, 1:24 p.m. OK Java 11 TESTS 6 405 9011200
147515052 mareshkau B Feb. 23, 2022, 9 p.m. OK Java 11 TESTS 6 405 17203200
147530985 __Serendipity B Feb. 24, 2022, 4:10 a.m. OK Java 11 TESTS 7 405 17408000
147529472 dhruvil_8803 B Feb. 24, 2022, 3:40 a.m. OK Java 11 TESTS 7 405 17408000
147536786 singhshivsm20001 B Feb. 24, 2022, 5:47 a.m. OK Java 11 TESTS 7 405 18841600
147462954 Yehia8 B Feb. 23, 2022, 12:03 p.m. OK Java 8 TESTS 6 249 13107200
147488446 Shady_X B Feb. 23, 2022, 3:26 p.m. OK Java 8 TESTS 6 265 13414400
147488728 Diaa12360 B Feb. 23, 2022, 3:28 p.m. OK Java 8 TESTS 6 280 18534400
147535097 swishx B Feb. 24, 2022, 5:22 a.m. OK Java 8 TESTS 7 295 11468800
147494209 gssakash B Feb. 23, 2022, 4:22 p.m. OK Java 8 TESTS 6 295 18739200
147488252 Daly105 B Feb. 23, 2022, 3:24 p.m. OK Java 8 TESTS 6 311 16281600
147477608 ak_ankit B Feb. 23, 2022, 1:49 p.m. OK Java 8 TESTS 6 311 16281600
147536612 P_Key26dec B Feb. 24, 2022, 5:45 a.m. OK Java 8 TESTS 7 311 45056000
147489605 kocko B Feb. 23, 2022, 3:36 p.m. OK Java 8 TESTS 6 342 16281600
147523284 WangRuiCong B Feb. 24, 2022, 1:01 a.m. OK Java 8 TESTS 6 358 16179200
147502919 wbars B Feb. 23, 2022, 5:59 p.m. OK Kotlin 1.4 TESTS 6 951 19763200
147514426 nesco B Feb. 23, 2022, 8:46 p.m. OK Kotlin 1.4 TESTS 6 1340 34611200
147476086 LeoPro B Feb. 23, 2022, 1:37 p.m. OK Kotlin 1.5 TESTS 6 561 33484800
147458814 Superlau B Feb. 23, 2022, 11:50 a.m. OK MS C++ 2017 TESTS 6 436 12800000
147469202 Levi__Ackerman B Feb. 23, 2022, 12:50 p.m. OK MS C++ 2017 TESTS 6 561 2457600
147484559 dominotim B Feb. 23, 2022, 2:51 p.m. OK MS C++ 2017 TESTS 6 561 12083200
147522390 xgk2006805yjy B Feb. 24, 2022, 12:36 a.m. OK MS C++ 2017 TESTS 6 576 9625600
147532222 _Rimjhim_36 B Feb. 24, 2022, 4:34 a.m. OK MS C++ 2017 TESTS 7 592 12595200
147459185 Dakericy B Feb. 23, 2022, 11:51 a.m. OK MS C++ 2017 TESTS 6 592 13824000
147521071 M7md3sam070 B Feb. 23, 2022, 11:54 p.m. OK MS C++ 2017 TESTS 6 608 15052800
147458317 DmtrPpl B Feb. 23, 2022, 11:48 a.m. OK MS C++ 2017 TESTS 6 639 12083200
147459032 Ir0nic_Joker B Feb. 23, 2022, 11:50 a.m. OK MS C++ 2017 TESTS 6 685 12083200
147505338 suraj B Feb. 23, 2022, 6:25 p.m. OK .NET Core C# TESTS 6 264 52940800
147479635 rsFalse B Feb. 23, 2022, 2:07 p.m. OK Perl TESTS 6 389 56012800
147478912 rsFalse B Feb. 23, 2022, 2 p.m. OK Perl TESTS 6 530 83148800
147534015 sigilius B Feb. 24, 2022, 5:05 a.m. OK PyPy 3 TESTS 7 358 38707200
147507902 KanishkGoel B Feb. 23, 2022, 6:59 p.m. OK PyPy 3 TESTS 6 482 35635200
147514215 Pheonix23 B Feb. 23, 2022, 8:42 p.m. OK PyPy 3 TESTS 6 529 36659200
147468510 ambs_ B Feb. 23, 2022, 12:47 p.m. OK PyPy 3 TESTS 6 545 33280000
147521295 MistaAsh B Feb. 24, 2022, 12:01 a.m. OK PyPy 3 TESTS 6 576 34406400
147487002 wizardrabbit B Feb. 23, 2022, 3:13 p.m. OK PyPy 3 TESTS 6 592 28876800
147501844 crapcode B Feb. 23, 2022, 5:49 p.m. OK PyPy 3 TESTS 6 607 33280000
147521202 MistaAsh B Feb. 23, 2022, 11:58 p.m. OK PyPy 3 TESTS 6 607 35430400
147486374 Abdalkhalig B Feb. 23, 2022, 3:07 p.m. OK PyPy 3 TESTS 6 639 26931200
147496911 majay1638 B Feb. 23, 2022, 4:53 p.m. OK PyPy 3 TESTS 6 670 26624000
147497514 nitish420 B Feb. 23, 2022, 4:59 p.m. OK PyPy 3-64 TESTS 6 186 51814400
147531778 aman_m42 B Feb. 24, 2022, 4:25 a.m. OK PyPy 3-64 TESTS 7 264 41574400
147496166 NKUCristiano B Feb. 23, 2022, 4:44 p.m. OK PyPy 3-64 TESTS 6 264 56422400
147473235 coder_sounak B Feb. 23, 2022, 1:16 p.m. OK PyPy 3-64 TESTS 6 389 53452800
147493310 shuklautkarsh7007 B Feb. 23, 2022, 4:12 p.m. OK PyPy 3-64 TESTS 6 420 45977600
147468324 titan23 B Feb. 23, 2022, 12:46 p.m. OK PyPy 3-64 TESTS 6 468 41779200
147491901 _icy_ B Feb. 23, 2022, 3:57 p.m. OK PyPy 3-64 TESTS 6 514 43827200
147477067 NiwhsA B Feb. 23, 2022, 1:45 p.m. OK PyPy 3-64 TESTS 6 514 44851200
147508162 del-user-774348 B Feb. 23, 2022, 7:03 p.m. OK PyPy 3-64 TESTS 6 529 42496000
147486707 mathdude42 B Feb. 23, 2022, 3:10 p.m. OK PyPy 3-64 TESTS 6 530 45670400
147500443 OLOGY B Feb. 23, 2022, 5:33 p.m. OK Python 2 TESTS 6 373 26419200
147472163 orazbek B Feb. 23, 2022, 1:08 p.m. OK Python 3 TESTS 6 592 23654400
147494139 rajn5181 B Feb. 23, 2022, 4:21 p.m. OK Python 3 TESTS 6 638 22835200
147463065 beksultanomirzak.2001 B Feb. 23, 2022, 12:04 p.m. OK Python 3 TESTS 6 733 21708800
147493935 rajn5181 B Feb. 23, 2022, 4:19 p.m. OK Python 3 TESTS 6 748 22835200
147464264 tanmaysharma17 B Feb. 23, 2022, 12:07 p.m. OK Python 3 TESTS 6 763 21708800
147460598 tanishq2507 B Feb. 23, 2022, 11:56 a.m. OK Python 3 TESTS 6 857 22425600
147490919 chokolateboy77 B Feb. 23, 2022, 3:48 p.m. OK Python 3 TESTS 6 889 22732800
147460215 NenadDapic B Feb. 23, 2022, 11:54 a.m. OK Python 3 TESTS 6 889 28364800
147467320 blackswan9k B Feb. 23, 2022, 12:42 p.m. OK Python 3 TESTS 6 904 22732800
147509286 swapnilsingh421 B Feb. 23, 2022, 7:21 p.m. OK Python 3 TESTS 6 920 22016000
147474556 MoSooN B Feb. 23, 2022, 1:25 p.m. OK Rust 2021 TESTS 6 389 13721600
147484466 clause B Feb. 23, 2022, 2:50 p.m. OK Rust 2021 TESTS 6 514 11161600

remove filters

Back to search problems