Codeforces Round 634 (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
1335 Codeforces Round 634 (Div. 3) FINISHED False 7200 145034699 April 13, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 34931 ) C Two Teams Composing PROGRAMMING binary search greedy implementation sortings 1100

B'You have n students under your control and you have to compose exactly two teams consisting of some subset of your students. Each student had his own skill, the i -th student skill is denoted by an integer a_i (different students can have the same skills). So, about the teams. Firstly, these two teams should have the same size. Two more constraints: Note that it is permissible that some student of the first team has the same skill as a student of the second team. Consider some examples (skills are given): Your task is to find the maximum possible size x for which it is possible to compose a valid pair of teams, where each team size is x (skills in the first team needed to be unique, skills in the second team should be the same between them). A student cannot be part of more than one team. You have to answer t independent test cases. The first line of the input contains one integer t ( 1 <= t <= 10^4 ) -- the number of test cases. Then t test cases follow. The first line of the test case contains one integer n ( 1 <= n <= 2 cdot 10^5 ) -- the number of students. The second line of the test case contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= n ), where a_i is the skill of the i -th student. Different students can have the same skills. It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 ( sum n <= 2 cdot 10^5 ). For each test case, print the answer -- the maximum possible size x for which it is possible to compose a valid pair of teams, where each team size is x . In the first test case of the example, it is possible to construct two teams of size 3 : the first team is [1, 2, 4] and the second team is [4, 4, 4] . Note, that there are some other ways to construct two valid teams of size 3 . '...

Tutorials

75993

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
77237531 vjudge5 C April 19, 2020, 4:13 a.m. OK Clang++17 Diagnostics TESTS 15 140 1024000 1100
77650306 vjudge1 C April 22, 2020, 1:22 p.m. OK Clang++17 Diagnostics TESTS 15 327 0 1100
76767018 rahul5720 C April 15, 2020, 7:05 a.m. OK Clang++17 Diagnostics TESTS 15 795 1126400 1100
76656668 kankichi C April 14, 2020, 4:25 a.m. OK Clang++17 Diagnostics TESTS 15 826 3174400 1100
77879879 SajibBarua C April 24, 2020, 5:49 a.m. OK Clang++17 Diagnostics TESTS 15 951 819200 1100
76692623 Rusu_Daniela C April 14, 2020, 12:40 p.m. OK FPC TESTS 15 77 1740800 1100
77641702 xhhmylxrd C April 22, 2020, 11:54 a.m. OK FPC TESTS 15 92 819200 1100
76647716 Duy_e C April 14, 2020, 1:09 a.m. OK FPC TESTS 15 280 1638400 1100
76648575 Joe2357 C April 14, 2020, 1:32 a.m. OK GNU C11 TESTS 15 62 819200 1100
76959190 anujsinghal C April 16, 2020, 10:43 a.m. OK GNU C11 TESTS 15 62 1843200 1100
77277107 silentkiler029 C April 19, 2020, 1:08 p.m. OK GNU C11 TESTS 15 62 3174400 1100
77443171 PimBin C April 21, 2020, 8:02 a.m. OK GNU C11 TESTS 15 77 2150400 1100
77711955 MrigankaChak C April 23, 2020, 4:37 a.m. OK GNU C11 TESTS 15 78 819200 1100
77748946 nitishcs414 C April 23, 2020, 12:01 p.m. OK GNU C11 TESTS 15 78 819200 1100
76973572 Hungvu11 C April 16, 2020, 1:07 p.m. OK GNU C11 TESTS 15 78 1638400 1100
76749143 Nahidswe C April 15, 2020, 1:34 a.m. OK GNU C11 TESTS 15 78 2355200 1100
77598928 JoseTomas01 C April 22, 2020, 1:04 a.m. OK GNU C11 TESTS 15 78 3174400 1100
77287796 ShofiqurRahman C April 19, 2020, 3:04 p.m. OK GNU C11 TESTS 15 93 819200 1100
76657647 wqst C April 14, 2020, 4:43 a.m. OK GNU C++11 TESTS 15 30 1024000 1100
76656525 luogu_bot4 C April 14, 2020, 4:23 a.m. OK GNU C++11 TESTS 15 31 819200 1100
76645748 DWAE86 C April 14, 2020, 12:12 a.m. OK GNU C++11 TESTS 15 31 819200 1100
76675545 YHHxBULIATANIA C April 14, 2020, 9:52 a.m. OK GNU C++11 TESTS 15 31 1638400 1100
76692401 yuzhechuan C April 14, 2020, 12:38 p.m. OK GNU C++11 TESTS 15 31 1638400 1100
76690777 froggyzhang C April 14, 2020, 12:23 p.m. OK GNU C++11 TESTS 15 31 1638400 1100
76663192 luogu_bot2 C April 14, 2020, 6:39 a.m. OK GNU C++11 TESTS 15 31 3993600 1100
76692411 LOVE_YJZ C April 14, 2020, 12:38 p.m. OK GNU C++11 TESTS 15 31 3993600 1100
76670817 luogu_bot1 C April 14, 2020, 9:08 a.m. OK GNU C++11 TESTS 15 31 3993600 1100
76646154 wyy2004 C April 14, 2020, 12:24 a.m. OK GNU C++11 TESTS 15 31 3993600 1100
76667241 ckx__ruoji C April 14, 2020, 8:14 a.m. OK GNU C++14 TESTS 15 46 819200 1100
76746519 EsraaElzoghby C April 15, 2020, 12:14 a.m. OK GNU C++14 TESTS 15 46 1638400 1100
76695147 boxnos C April 14, 2020, 1:07 p.m. OK GNU C++14 TESTS 15 46 6144000 1100
76903983 yashgupta2224 C April 15, 2020, 8:07 p.m. OK GNU C++14 TESTS 15 61 819200 1100
76717936 jshreyans C April 14, 2020, 4:39 p.m. OK GNU C++14 TESTS 15 61 819200 1100
76918494 Qing_Yang C April 16, 2020, 1:43 a.m. OK GNU C++14 TESTS 15 61 819200 1100
76654829 dharan1011 C April 14, 2020, 3:52 a.m. OK GNU C++14 TESTS 15 61 819200 1100
77084749 eric16 C April 17, 2020, 2:14 p.m. OK GNU C++14 TESTS 15 61 1228800 1100
77186088 ankit9905 C April 18, 2020, 1:23 p.m. OK GNU C++14 TESTS 15 61 1638400 1100
77047023 anandzzz1973 C April 17, 2020, 7:42 a.m. OK GNU C++14 TESTS 15 61 1638400 1100
76693729 AvanRocks C April 14, 2020, 12:52 p.m. OK GNU C++17 TESTS 15 30 819200 1100
76645616 _andyli C April 14, 2020, 12:08 a.m. OK GNU C++17 TESTS 15 31 5836800 1100
77254632 LayCurse C April 19, 2020, 8:24 a.m. OK GNU C++17 TESTS 15 31 99942400 1100
76653745 Datso C April 14, 2020, 3:33 a.m. OK GNU C++17 TESTS 15 46 819200 1100
76792382 hari32147 C April 15, 2020, 12:07 p.m. OK GNU C++17 TESTS 15 46 1638400 1100
77094358 kid_kb C April 17, 2020, 3:35 p.m. OK GNU C++17 TESTS 15 46 1638400 1100
76730563 2bcn C April 14, 2020, 6:55 p.m. OK GNU C++17 TESTS 15 61 819200 1100
76955754 drinkingwater C April 16, 2020, 10:08 a.m. OK GNU C++17 TESTS 15 61 819200 1100
76787226 ay2306 C April 15, 2020, 10:54 a.m. OK GNU C++17 TESTS 15 61 819200 1100
76687241 tuts C April 14, 2020, 11:50 a.m. OK GNU C++17 TESTS 15 61 819200 1100
76694749 hltk C April 14, 2020, 1:03 p.m. OK GNU C++17 (64) TESTS 15 46 819200 1100
77067904 anmol270900 C April 17, 2020, 11:36 a.m. OK GNU C++17 (64) TESTS 15 46 819200 1100
76647540 logicroc C April 14, 2020, 1:03 a.m. OK GNU C++17 (64) TESTS 15 46 819200 1100
76652346 syawl-1017 C April 14, 2020, 3:07 a.m. OK GNU C++17 (64) TESTS 15 46 819200 1100
76668750 _labib C April 14, 2020, 8:36 a.m. OK GNU C++17 (64) TESTS 15 46 819200 1100
76670600 kokwei217 C April 14, 2020, 9:06 a.m. OK GNU C++17 (64) TESTS 15 46 819200 1100
76683253 ir_1st_vil C April 14, 2020, 11:13 a.m. OK GNU C++17 (64) TESTS 15 46 819200 1100
76694461 hltk C April 14, 2020, 1 p.m. OK GNU C++17 (64) TESTS 15 46 819200 1100
76938666 Gornak40 C April 16, 2020, 7:01 a.m. OK GNU C++17 (64) TESTS 15 46 1638400 1100
76956303 DarkWarrior703 C April 16, 2020, 10:14 a.m. OK GNU C++17 (64) TESTS 15 46 2969600 1100
76946465 amit_839 C April 16, 2020, 8:25 a.m. OK Go TESTS 15 77 11673600 1100
77234689 vchilikov C April 19, 2020, 3:12 a.m. OK Go TESTS 15 139 4505600 1100
76930538 amit_839 C April 16, 2020, 5:26 a.m. OK Go TESTS 15 155 7168000 1100
76930726 amit_839 C April 16, 2020, 5:28 a.m. OK Go TESTS 15 171 7065600 1100
77105352 XOR-star C April 17, 2020, 5:15 p.m. OK Haskell TESTS 15 530 29491200 1100
77105011 XOR-star C April 17, 2020, 5:11 p.m. OK Haskell TESTS 15 561 29491200 1100
77160244 tuannam C April 18, 2020, 8:38 a.m. OK Java 11 TESTS 15 186 0 1100
76691604 jakejase2 C April 14, 2020, 12:31 p.m. OK Java 11 TESTS 15 186 0 1100
76697836 yash1402_ C April 14, 2020, 1:30 p.m. OK Java 11 TESTS 15 187 0 1100
76764754 rajparekh2024 C April 15, 2020, 6:39 a.m. OK Java 11 TESTS 15 217 10444800 1100
76798674 devesh08 C April 15, 2020, 1:27 p.m. OK Java 11 TESTS 15 217 10547200 1100
76650260 rgupta917 C April 14, 2020, 2:18 a.m. OK Java 11 TESTS 15 217 12697600 1100
76999149 mikkk C April 16, 2020, 5:05 p.m. OK Java 11 TESTS 15 218 0 1100
76678445 kgcode C April 14, 2020, 10:22 a.m. OK Java 11 TESTS 15 218 10444800 1100
77038377 saurabh0611 C April 17, 2020, 5:48 a.m. OK Java 11 TESTS 15 233 10752000 1100
76775125 p_unit C April 15, 2020, 8:35 a.m. OK Java 11 TESTS 15 233 13619200 1100
76785904 bluesky111 C April 15, 2020, 10:39 a.m. OK Java 8 TESTS 15 109 0 1100
77239343 husein.07 C April 19, 2020, 4:49 a.m. OK Java 8 TESTS 15 124 0 1100
76767366 dyhu083 C April 15, 2020, 7:09 a.m. OK Java 8 TESTS 15 124 0 1100
76764276 Faizan C April 15, 2020, 6:33 a.m. OK Java 8 TESTS 15 124 0 1100
76716349 labdhi C April 14, 2020, 4:23 p.m. OK Java 8 TESTS 15 124 0 1100
76697932 yash1402_ C April 14, 2020, 1:31 p.m. OK Java 8 TESTS 15 124 0 1100
77984023 sumedh.shenoy C April 25, 2020, 6:39 a.m. OK Java 8 TESTS 15 139 2048000 1100
76717981 mann_23 C April 14, 2020, 4:39 p.m. OK Java 8 TESTS 15 140 0 1100
76941734 neeraj96 C April 16, 2020, 7:33 a.m. OK Java 8 TESTS 15 140 2048000 1100
76712926 ZerooCool C April 14, 2020, 3:51 p.m. OK Java 8 TESTS 15 140 2048000 1100
77385077 jhonber C April 20, 2020, 4:46 p.m. OK JavaScript TESTS 15 249 36864000 1100
77133818 Spheniscine C April 18, 2020, 1:09 a.m. OK Kotlin TESTS 15 171 6348800 1100
77058578 Spheniscine C April 17, 2020, 9:58 a.m. OK Kotlin TESTS 15 186 6348800 1100
76710720 Java C April 14, 2020, 3:30 p.m. OK Kotlin TESTS 15 343 16076800 1100
76966340 david_varela C April 16, 2020, 11:56 a.m. OK Kotlin TESTS 15 358 17100800 1100
76652562 camypaper C April 14, 2020, 3:12 a.m. OK Mono C# TESTS 15 108 7475200 1100
77810726 Nirushuu C April 23, 2020, 3:38 p.m. OK Mono C# TESTS 15 108 22323200 1100
77602676 szzz- C April 22, 2020, 2:56 a.m. OK Mono C# TESTS 15 108 27648000 1100
77324127 treasuryonly C April 20, 2020, 3:43 a.m. OK Mono C# TESTS 15 124 27750400 1100
77455984 itt828 C April 21, 2020, 10:42 a.m. OK Mono C# TESTS 15 140 32972800 1100
76728645 Efrocinya C April 14, 2020, 6:33 p.m. OK Mono C# TESTS 15 155 30515200 1100
77195209 pacificus C April 18, 2020, 2:45 p.m. OK Mono C# TESTS 15 186 39116800 1100
77619786 LolLoDaffy C April 22, 2020, 7:56 a.m. OK MS C++ TESTS 15 140 1433600 1100
77046824 YOUNGSUUUU C April 17, 2020, 7:40 a.m. OK MS C++ TESTS 15 155 819200 1100
76723394 animeanand99 C April 14, 2020, 5:38 p.m. OK MS C++ TESTS 15 155 1638400 1100
76791750 vjudge5 C April 15, 2020, 11:59 a.m. OK MS C++ TESTS 15 358 1638400 1100
77469755 vjudge1 C April 21, 2020, 1:08 p.m. OK MS C++ 2017 TESTS 15 62 819200 1100
77709488 BingHui C April 23, 2020, 4:15 a.m. OK MS C++ 2017 TESTS 15 93 819200 1100
76646428 abocide C April 14, 2020, 12:32 a.m. OK MS C++ 2017 TESTS 15 93 4812800 1100
77709729 BingHui C April 23, 2020, 4:21 a.m. OK MS C++ 2017 TESTS 15 108 819200 1100
77072905 vjudge4 C April 17, 2020, 12:25 p.m. OK MS C++ 2017 TESTS 15 109 819200 1100
77201871 Gadi C April 18, 2020, 3:52 p.m. OK MS C++ 2017 TESTS 15 109 6963200 1100
76825856 vjudge4 C April 15, 2020, 2:49 p.m. OK MS C++ 2017 TESTS 15 140 819200 1100
76757332 pnthoai165 C April 15, 2020, 4:47 a.m. OK MS C++ 2017 TESTS 15 171 819200 1100
77225158 branstroitel0811 C April 18, 2020, 9:32 p.m. OK MS C++ 2017 TESTS 15 171 1638400 1100
76993359 ExtraHardCoder C April 16, 2020, 4:06 p.m. OK MS C++ 2017 TESTS 15 186 819200 1100
76732990 Harolinch C April 14, 2020, 7:25 p.m. OK Node.js TESTS 15 358 14950400 1100
76731173 Harolinch C April 14, 2020, 7:02 p.m. OK Node.js TESTS 15 358 26726400 1100
76732035 Harolinch C April 14, 2020, 7:13 p.m. OK Node.js TESTS 15 389 22118400 1100
76772392 mayakin C April 15, 2020, 8:04 a.m. OK PHP TESTS 15 186 26828800 1100
77282003 yumtam C April 19, 2020, 2:02 p.m. OK PyPy 2 TESTS 15 248 18944000 1100
76791359 distinctlyaverage C April 15, 2020, 11:56 a.m. OK PyPy 2 TESTS 15 327 26316800 1100
76775051 astrom.lars C April 15, 2020, 8:34 a.m. OK PyPy 2 TESTS 15 483 17612800 1100
76709660 shehebe C April 14, 2020, 3:20 p.m. OK PyPy 2 TESTS 15 639 22835200 1100
76748476 LethalPuppy C April 15, 2020, 1:14 a.m. OK PyPy 3 TESTS 15 186 16486400 1100
76945258 akshaysolanki941 C April 16, 2020, 8:12 a.m. OK PyPy 3 TESTS 15 234 24883200 1100
76763406 Lamborgini C April 15, 2020, 6:22 a.m. OK PyPy 3 TESTS 15 296 21708800 1100
77357736 wattaihei C April 20, 2020, 12:10 p.m. OK PyPy 3 TESTS 15 311 22118400 1100
76746702 roaris C April 15, 2020, 12:20 a.m. OK PyPy 3 TESTS 15 327 22835200 1100
76716418 Vedanshu C April 14, 2020, 4:24 p.m. OK PyPy 3 TESTS 15 327 24678400 1100
76714953 KirKhal C April 14, 2020, 4:10 p.m. OK PyPy 3 TESTS 15 327 24780800 1100
76801178 yerassyl88 C April 15, 2020, 1:49 p.m. OK PyPy 3 TESTS 15 342 23756800 1100
76737581 apoorvwatsky C April 14, 2020, 8:32 p.m. OK PyPy 3 TESTS 15 342 25497600 1100
76907994 rsat1999 C April 15, 2020, 9:17 p.m. OK PyPy 3 TESTS 15 373 18636800 1100
76673139 ramakanthd92 C April 14, 2020, 9:29 a.m. OK Python 2 TESTS 15 374 19251200 1100
76981204 thuglife69 C April 16, 2020, 2:21 p.m. OK Python 2 TESTS 15 483 13004800 1100
76769355 eugalt C April 15, 2020, 7:31 a.m. OK Python 3 TESTS 15 187 20377600 1100
76768162 eugalt C April 15, 2020, 7:18 a.m. OK Python 3 TESTS 15 202 20377600 1100
77296448 salaxieb C April 19, 2020, 4:48 p.m. OK Python 3 TESTS 15 233 16179200 1100
76679695 heisco C April 14, 2020, 10:34 a.m. OK Python 3 TESTS 15 233 16179200 1100
76725399 Pratyush1606 C April 14, 2020, 5:58 p.m. OK Python 3 TESTS 15 234 19251200 1100
77413548 briancho C April 20, 2020, 10:09 p.m. OK Python 3 TESTS 15 249 15974400 1100
77854752 gaha C April 23, 2020, 9:04 p.m. OK Python 3 TESTS 15 249 18227200 1100
76995401 subhajitdas C April 16, 2020, 4:25 p.m. OK Python 3 TESTS 15 249 20377600 1100
76930335 bbnsandhu C April 16, 2020, 5:23 a.m. OK Python 3 TESTS 15 264 19968000 1100
76994293 subhajitdas C April 16, 2020, 4:14 p.m. OK Python 3 TESTS 15 264 20377600 1100
77420617 CPX99 C April 21, 2020, 2:16 a.m. OK Ruby TESTS 15 280 31846400 1100
76648535 Verjok C April 14, 2020, 1:31 a.m. OK Ruby TESTS 15 296 27750400 1100
76652543 sansen C April 14, 2020, 3:11 a.m. OK Rust TESTS 15 31 3174400 1100
77180055 manta1130 C April 18, 2020, 12:18 p.m. OK Rust TESTS 15 46 5324800 1100
77386430 fatemender C April 20, 2020, 5:04 p.m. OK Rust TESTS 15 171 10035200 1100
76933686 yudedako C April 16, 2020, 6:06 a.m. OK Scala TESTS 15 1091 59801600 1100

remove filters

Back to search problems