Codeforces Round 574 (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
1195 Codeforces Round 574 (Div. 2) FINISHED False 7200 168449099 July 17, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 13160 ) A Drinks Choosing PROGRAMMING greedy math 1100

B"Old timers of Summer Informatics School can remember previous camps in which each student was given a drink of his choice on the vechorka (late-evening meal). Or may be the story was more complicated? There are n students living in a building, and for each of them the favorite drink a_i is known. So you know n integers a_1, a_2, ... , a_n , where a_i ( 1 <= a_i <= k ) is the type of the favorite drink of the i -th student. The drink types are numbered from 1 to k . There are infinite number of drink sets. Each set consists of exactly two portions of the same drink. In other words, there are k types of drink sets, the j -th type contains two portions of the drink j . The available number of sets of each of the k types is infinite. You know that students will receive the minimum possible number of sets to give all students exactly one drink. Obviously, the number of sets will be exactly lceil frac{n}{2} rceil , where lceil x rceil is x rounded up. After students receive the sets, they will distribute their portions by their choice: each student will get exactly one portion. Note, that if n is odd then one portion will remain unused and the students' teacher will drink it. What is the maximum number of students that can get their favorite drink if lceil frac{n}{2} rceil sets will be chosen optimally and students will distribute portions between themselves optimally? The first line of the input contains two integers n and k ( 1 <= n, k <= 1 ,000 ) -- the number of students in the building and the number of different drinks. The next n lines contain student's favorite drinks. The i -th line contains a single integer from 1 to k -- the type of the favorite drink of the i -th student. Print exactly one integer -- the maximum number of students that can get a favorite drink. In the first example, students c"...

Tutorials

Разбор Codeforces Round #574 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
58054080 Manirathnamgodi A July 31, 2019, 4:05 a.m. OK Clang++17 Diagnostics TESTS 26 46 0 1100
57321320 bilotiavaibhav A July 19, 2019, 10:09 a.m. OK Clang++17 Diagnostics TESTS 26 46 0 1100
57933949 hatsuyuki15 A July 29, 2019, 9:47 a.m. OK D TESTS 26 31 0 1100
58343812 amene A Aug. 5, 2019, 2:11 p.m. OK FPC TESTS 26 31 0 1100
57239122 HoangVu123 A July 17, 2019, 4:34 p.m. OK FPC TESTS 26 31 0 1100
57295437 romanporsh A July 18, 2019, 6:57 p.m. OK FPC TESTS 26 31 0 1100
58812345 minhquaningenious A Aug. 14, 2019, 11:18 a.m. OK FPC TESTS 26 31 102400 1100
64156902 Fidisk A Nov. 3, 2019, 1:06 p.m. OK FPC TESTS 26 31 716800 1100
57368411 Ahmed.Anwar A July 20, 2019, 9:57 a.m. OK GNU C11 TESTS 26 15 0 1100
57318855 MdJahid A July 19, 2019, 9:11 a.m. OK GNU C11 TESTS 26 15 0 1100
57233316 gregr A July 17, 2019, 4:11 p.m. OK GNU C11 TESTS 26 30 0 1100
65518038 yigezhe A Nov. 22, 2019, 6:58 a.m. OK GNU C11 TESTS 26 30 0 1100
57796161 jayedfahad A July 26, 2019, 11:29 a.m. OK GNU C11 TESTS 26 30 0 1100
57663053 Montaha A July 24, 2019, 3:07 p.m. OK GNU C11 TESTS 26 30 0 1100
57368331 Ahmed.Anwar A July 20, 2019, 9:56 a.m. OK GNU C11 TESTS 26 30 0 1100
57327284 SomonindroRoy A July 19, 2019, 12:40 p.m. OK GNU C11 TESTS 26 30 0 1100
57270372 the_anomaly A July 18, 2019, 8:42 a.m. OK GNU C11 TESTS 26 30 0 1100
57237376 mstaadmi A July 17, 2019, 4:29 p.m. OK GNU C11 TESTS 26 30 0 1100
57966930 rahul_agrawal A July 30, 2019, 3:17 a.m. OK GNU C++11 TESTS 26 15 0 1100
60244704 dysyn1314 A Sept. 8, 2019, 1:20 a.m. OK GNU C++11 TESTS 26 15 0 1100
57732012 catmanMeow A July 25, 2019, 8:51 a.m. OK GNU C++11 TESTS 26 15 0 1100
57580385 Khanhhuy_19 A July 23, 2019, 8:39 a.m. OK GNU C++11 TESTS 26 15 0 1100
57468622 akjdps A July 21, 2019, 4:52 p.m. OK GNU C++11 TESTS 26 15 0 1100
57436837 sicauxeon A July 21, 2019, 5:16 a.m. OK GNU C++11 TESTS 26 15 0 1100
57359290 Jesselrj A July 20, 2019, 7:15 a.m. OK GNU C++11 TESTS 26 15 0 1100
57318298 med_amine A July 19, 2019, 9 a.m. OK GNU C++11 TESTS 26 15 0 1100
57313065 vjudge5 A July 19, 2019, 7:13 a.m. OK GNU C++11 TESTS 26 15 0 1100
57303526 zlr11 A July 19, 2019, 2:04 a.m. OK GNU C++11 TESTS 26 15 0 1100
69266411 kramit93 A Jan. 21, 2020, 6:46 p.m. OK GNU C++14 TESTS 26 15 0 1100
59842486 p.ferrari A Sept. 1, 2019, 7:56 a.m. OK GNU C++14 TESTS 26 15 0 1100
60343762 FuckInfinite A Sept. 10, 2019, 11:50 a.m. OK GNU C++14 TESTS 26 15 0 1100
61101322 Theofratus A Sept. 23, 2019, 6:56 a.m. OK GNU C++14 TESTS 26 15 0 1100
63826253 Nha_Thanh A Oct. 30, 2019, 1:29 p.m. OK GNU C++14 TESTS 26 15 0 1100
64119587 -renaissance- A Nov. 2, 2019, 11:43 p.m. OK GNU C++14 TESTS 26 15 0 1100
64603852 MarcoMeijer A Nov. 9, 2019, 7:33 p.m. OK GNU C++14 TESTS 26 15 0 1100
66295461 Myrat.A A Dec. 5, 2019, 3:55 a.m. OK GNU C++14 TESTS 26 15 0 1100
66403724 kushal2619 A Dec. 6, 2019, 1:03 p.m. OK GNU C++14 TESTS 26 15 0 1100
67169186 Dhuan_hi_Dhuan A Dec. 18, 2019, 4:39 p.m. OK GNU C++14 TESTS 26 15 0 1100
68220608 FatemehMohammadi A Jan. 5, 2020, 4:25 a.m. OK GNU C++17 TESTS 26 15 0 1100
65721230 rtbmnie A Nov. 25, 2019, 7:11 p.m. OK GNU C++17 TESTS 26 15 0 1100
64530133 CosminMorar A Nov. 8, 2019, 3:08 p.m. OK GNU C++17 TESTS 26 15 0 1100
64319603 2021_become_LGM kiomi A Nov. 5, 2019, 3:11 p.m. OK GNU C++17 TESTS 26 15 0 1100
69439342 ImtiazIftu A Jan. 23, 2020, 8:32 p.m. OK GNU C++17 TESTS 26 15 0 1100
62636077 Fysty A Oct. 15, 2019, 4:51 p.m. OK GNU C++17 TESTS 26 15 0 1100
61596038 iam_ljk A Oct. 1, 2019, 8:52 a.m. OK GNU C++17 TESTS 26 15 0 1100
60343991 gangpener A Sept. 10, 2019, 11:55 a.m. OK GNU C++17 TESTS 26 15 0 1100
60308249 juvenal A Sept. 9, 2019, 2:46 p.m. OK GNU C++17 TESTS 26 15 0 1100
60297363 coyorkdow A Sept. 9, 2019, 10:44 a.m. OK GNU C++17 TESTS 26 15 0 1100
57409401 efimmanevich A July 20, 2019, 4:58 p.m. OK Go TESTS 26 31 0 1100
59706934 reanimatorzon A Aug. 30, 2019, 1:04 p.m. OK Go TESTS 26 31 0 1100
59623897 sighduck A Aug. 28, 2019, 3:10 p.m. OK Go TESTS 26 31 0 1100
58104686 TangentDay A Aug. 1, 2019, 3:25 a.m. OK Go TESTS 26 31 0 1100
57871286 predicate A July 28, 2019, 2:01 a.m. OK Go TESTS 26 31 0 1100
57282386 suryanshv23 A July 18, 2019, 1:15 p.m. OK Go TESTS 26 31 0 1100
59165854 bartek19121995 A Aug. 20, 2019, 3:28 p.m. OK Go TESTS 26 46 0 1100
57871385 predicate A July 28, 2019, 2:06 a.m. OK Go TESTS 26 46 0 1100
57402081 efimmanevich A July 20, 2019, 4:24 p.m. OK Go TESTS 26 46 0 1100
69177287 warrioramrit A Jan. 20, 2020, 8:35 a.m. OK Java 11 TESTS 26 171 0 1100
68634390 TheDarkKnight03 A Jan. 12, 2020, 5:04 a.m. OK Java 11 TESTS 26 171 0 1100
68359020 satya_p54 A Jan. 7, 2020, 1:20 p.m. OK Java 11 TESTS 26 171 0 1100
69858935 GiantTornado A Jan. 30, 2020, 5:52 p.m. OK Java 11 TESTS 26 187 0 1100
67456381 tarunrahuja A Dec. 23, 2019, 7:05 a.m. OK Java 11 TESTS 26 202 0 1100
59878023 MahmoudJobeel A Sept. 2, 2019, 2:04 a.m. OK Java 8 TESTS 26 108 0 1100
57329403 YousseF_Diaa A July 19, 2019, 1:30 p.m. OK Java 8 TESTS 26 108 0 1100
57263558 jigar_786 A July 18, 2019, 6:16 a.m. OK Java 8 TESTS 26 108 0 1100
57252448 Sleep A July 18, 2019, 12:30 a.m. OK Java 8 TESTS 26 108 0 1100
69859360 less_than_gray A Jan. 30, 2020, 6:01 p.m. OK Java 8 TESTS 26 109 0 1100
68209825 akshVerma A Jan. 4, 2020, 6:49 p.m. OK Java 8 TESTS 26 109 0 1100
66423630 bluesky111 A Dec. 6, 2019, 8:04 p.m. OK Java 8 TESTS 26 109 0 1100
61440050 TaGGy A Sept. 28, 2019, 6:20 p.m. OK Java 8 TESTS 26 109 0 1100
59927191 ak_1999 A Sept. 3, 2019, 4:53 a.m. OK Java 8 TESTS 26 109 0 1100
59914701 svr8 A Sept. 2, 2019, 6:39 p.m. OK Java 8 TESTS 26 109 0 1100
57533793 borls A July 22, 2019, 3:31 p.m. OK JavaScript TESTS 26 31 1024000 1100
57532084 borls A July 22, 2019, 3:25 p.m. OK JavaScript TESTS 26 31 1024000 1100
57242433 BlackLunx A July 17, 2019, 6 p.m. OK JavaScript TESTS 26 46 0 1100
57464189 -arg A July 21, 2019, 2:53 p.m. OK Kotlin TESTS 26 140 0 1100
57260020 mendel_vv A July 18, 2019, 4:36 a.m. OK Kotlin TESTS 26 140 102400 1100
57255280 Spheniscine A July 18, 2019, 2:10 a.m. OK Kotlin TESTS 26 140 204800 1100
57246243 dkozak94 A July 17, 2019, 7:33 p.m. OK Kotlin TESTS 26 140 204800 1100
57296293 Flame239 A July 18, 2019, 7:27 p.m. OK Kotlin TESTS 26 155 204800 1100
57250839 Tlatoani A July 17, 2019, 10:47 p.m. OK Kotlin TESTS 26 171 0 1100
57527080 wbars A July 22, 2019, 3:08 p.m. OK Kotlin TESTS 26 171 409600 1100
57791666 stef_ang A July 26, 2019, 9:41 a.m. OK Kotlin TESTS 26 171 921600 1100
57793770 janicekartika A July 26, 2019, 10:37 a.m. OK Kotlin TESTS 26 171 1433600 1100
57261815 og.kostya A July 18, 2019, 5:35 a.m. OK Mono C# TESTS 26 46 0 1100
65211078 nastya1199 A Nov. 16, 2019, 5:57 p.m. OK Mono C# TESTS 26 46 0 1100
59638703 trolina32 A Aug. 28, 2019, 11:14 p.m. OK Mono C# TESTS 26 46 0 1100
57338753 ds88 A July 19, 2019, 5:24 p.m. OK Mono C# TESTS 26 61 0 1100
58124257 TRR A Aug. 1, 2019, 12:01 p.m. OK Mono C# TESTS 26 61 0 1100
57280141 Dimon2305 A July 18, 2019, 12:26 p.m. OK Mono C# TESTS 26 61 0 1100
57247178 ansergeyg A July 17, 2019, 8:02 p.m. OK Mono C# TESTS 26 62 0 1100
58621906 Salatik231166 A Aug. 11, 2019, 4:09 p.m. OK Mono C# TESTS 26 77 3584000 1100
58622090 Salatik231166 A Aug. 11, 2019, 4:12 p.m. OK Mono C# TESTS 26 77 3584000 1100
57348356 vjudge4 A July 20, 2019, 1:40 a.m. OK MS C++ TESTS 26 30 0 1100
57485329 vjudge1 A July 22, 2019, 5 a.m. OK MS C++ TESTS 26 30 0 1100
57490560 vjudge4 A July 22, 2019, 6:56 a.m. OK MS C++ TESTS 26 30 0 1100
57242693 vjudge3 A July 17, 2019, 6:05 p.m. OK MS C++ TESTS 26 30 102400 1100
61552613 vjudge2 A Sept. 30, 2019, 12:59 p.m. OK MS C++ TESTS 26 30 102400 1100
69412872 vjudge5 A Jan. 23, 2020, 12:12 p.m. OK MS C++ TESTS 26 30 102400 1100
59386317 yznl A Aug. 24, 2019, 6:32 a.m. OK MS C++ TESTS 26 30 409600 1100
61454934 vjudge3 A Sept. 29, 2019, 5:45 a.m. OK MS C++ TESTS 26 31 0 1100
61457149 vjudge4 A Sept. 29, 2019, 6:51 a.m. OK MS C++ TESTS 26 31 0 1100
66019453 cxol A Nov. 30, 2019, 6:49 a.m. OK MS C++ TESTS 26 31 0 1100
59261685 MajorLenox A Aug. 22, 2019, 8:53 a.m. OK MS C++ 2017 TESTS 26 30 0 1100
65825592 UAV A Nov. 27, 2019, 12:24 p.m. OK MS C++ 2017 TESTS 26 30 0 1100
62937063 Jiang142857 A Oct. 19, 2019, 2:24 p.m. OK MS C++ 2017 TESTS 26 30 0 1100
58494546 Yanhui Cuc-center HelloWorld1024 A Aug. 9, 2019, 11:34 a.m. OK MS C++ 2017 TESTS 26 30 0 1100
57255331 ccsu_xka A July 18, 2019, 2:11 a.m. OK MS C++ 2017 TESTS 26 30 0 1100
57241705 2018030402032 A July 17, 2019, 5:48 p.m. OK MS C++ 2017 TESTS 26 30 8089600 1100
60503932 Vfrost26 A Sept. 13, 2019, 8:14 p.m. OK MS C++ 2017 TESTS 26 31 0 1100
65825349 UAV A Nov. 27, 2019, 12:19 p.m. OK MS C++ 2017 TESTS 26 31 0 1100
60063849 newdeal A Sept. 5, 2019, 8:15 a.m. OK MS C++ 2017 TESTS 26 31 0 1100
68688811 suun A Jan. 13, 2020, 5:04 a.m. OK MS C++ 2017 TESTS 26 31 0 1100
57257557 dadafaWang A July 18, 2019, 3:08 a.m. OK Node.js TESTS 26 202 1638400 1100
57569804 lazyc97 A July 23, 2019, 4:44 a.m. OK Ocaml TESTS 26 15 0 1100
57552187 lazyc97 A July 22, 2019, 5:57 p.m. OK Ocaml TESTS 26 31 0 1100
57239102 PAG A July 17, 2019, 4:34 p.m. OK PascalABC.NET TESTS 26 187 0 1100
57243023 batyrbek.zhunis A July 17, 2019, 6:11 p.m. OK PHP TESTS 26 31 0 1100
57240992 erbolat0311 A July 17, 2019, 5:38 p.m. OK PHP TESTS 26 46 0 1100
57243665 mayakin A July 17, 2019, 6:25 p.m. OK PHP TESTS 26 46 0 1100
58684285 yumtam A Aug. 12, 2019, 9:07 p.m. OK PyPy 2 TESTS 26 124 0 1100
57631356 jolt.tks A July 24, 2019, 8:51 a.m. OK PyPy 2 TESTS 26 140 0 1100
57234125 snape_here A July 17, 2019, 4:15 p.m. OK PyPy 2 TESTS 26 140 0 1100
57308501 danielfleischman A July 19, 2019, 5:24 a.m. OK PyPy 2 TESTS 26 156 0 1100
57300476 -Morass- A July 18, 2019, 10:53 p.m. OK PyPy 2 TESTS 26 170 614400 1100
58553312 anshuman16423 A Aug. 10, 2019, 10:18 p.m. OK PyPy 2 TESTS 26 202 0 1100
58830700 ssk497 A Aug. 14, 2019, 5:47 p.m. OK PyPy 2 TESTS 26 233 8908800 1100
68358103 sureshsinghspd A Jan. 7, 2020, 12:58 p.m. OK PyPy 3 TESTS 26 140 0 1100
57906094 petya47 A July 28, 2019, 5:41 p.m. OK PyPy 3 TESTS 26 140 0 1100
57495048 Mint_Dentifrice A July 22, 2019, 8:17 a.m. OK PyPy 3 TESTS 26 140 0 1100
59631494 Pratibha_ A Aug. 28, 2019, 6:21 p.m. OK PyPy 3 TESTS 26 155 1433600 1100
66377671 spykecb A Dec. 6, 2019, 3:57 a.m. OK PyPy 3 TESTS 26 155 1433600 1100
65484843 SinKing A Nov. 21, 2019, 12:57 p.m. OK PyPy 3 TESTS 26 155 1433600 1100
62578682 Gustavslatvijalatvija123 A Oct. 14, 2019, 4:39 p.m. OK PyPy 3 TESTS 26 155 1433600 1100
60272838 simplerick A Sept. 8, 2019, 4:20 p.m. OK PyPy 3 TESTS 26 155 1433600 1100
59387120 HighLights A Aug. 24, 2019, 6:54 a.m. OK PyPy 3 TESTS 26 155 1433600 1100
58992607 Saftap A Aug. 18, 2019, 9:52 a.m. OK PyPy 3 TESTS 26 155 1433600 1100
57418009 Helli.code A July 20, 2019, 5:51 p.m. OK Python 2 TESTS 26 171 0 1100
69888795 bsr011 A Jan. 31, 2020, 9:13 a.m. OK Python 2 TESTS 26 171 102400 1100
57643504 Luxo A July 24, 2019, 1:25 p.m. OK Python 2 TESTS 26 186 0 1100
62918723 ghoshashis545 A Oct. 19, 2019, 9:24 a.m. OK Python 3 TESTS 26 108 0 1100
57458964 spikh A July 21, 2019, 12:47 p.m. OK Python 3 TESTS 26 108 0 1100
57418648 portale A July 20, 2019, 5:55 p.m. OK Python 3 TESTS 26 108 0 1100
57257821 bhavik07 A July 18, 2019, 3:16 a.m. OK Python 3 TESTS 26 108 0 1100
57241328 vinayak_sharma A July 17, 2019, 5:42 p.m. OK Python 3 TESTS 26 108 0 1100
57238099 saurabh9761s A July 17, 2019, 4:32 p.m. OK Python 3 TESTS 26 108 0 1100
57232830 Just__Nick A July 17, 2019, 4:09 p.m. OK Python 3 TESTS 26 108 0 1100
69447542 vjudge4 A Jan. 24, 2020, 4:12 a.m. OK Python 3 TESTS 26 109 0 1100
68990014 cp_noob A Jan. 17, 2020, 1:50 p.m. OK Python 3 TESTS 26 109 0 1100
65598322 shivam_hbtu A Nov. 23, 2019, 4:50 p.m. OK Python 3 TESTS 26 109 0 1100
57991002 Lancern A July 30, 2019, 1:14 p.m. OK Rust TESTS 26 31 0 1100
57339134 kobae964 A July 19, 2019, 5:36 p.m. OK Rust TESTS 26 31 307200 1100
57265449 dyominov A July 18, 2019, 6:58 a.m. OK Scala TESTS 26 420 0 1100

remove filters

Back to search problems