Codeforces Round 544 (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
1133 Codeforces Round 544 (Div. 3) FINISHED False 7200 185468087 March 7, 2019, 3:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5666 ) E K Balanced Teams PROGRAMMING dp sortings two pointers 2000

B'You are a coach at your local university. There are n students under your supervision, the programming skill of the i -th student is a_i . You have to form k teams for yet another new programming competition. As you know, the more students are involved in competition the more probable the victory of your university is! So you have to form no more than k (and at least one) non-empty teams so that the total number of students in them is maximized. But you also know that each team should be balanced. It means that the programming skill of each pair of students in each team should differ by no more than 5 . Teams are independent from one another (it means that the difference between programming skills of two students from two different teams does not matter). It is possible that some students not be included in any team at all. Your task is to report the maximum possible total number of students in no more than k (and at least one) non-empty balanced teams. If you are Python programmer, consider using PyPy instead of Python when you submit your code. The first line of the input contains two integers n and k ( 1 <= k <= n <= 5000 ) -- the number of students and the maximum number of teams, correspondingly. The second line of the input contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 10^9 ), where a_i is a programming skill of the i -th student. Print one integer -- the maximum possible total number of students in no more than k (and at least one) non-empty balanced teams. '...

Tutorials

Codeforces Round #544 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
68086592 vjudge2 E Jan. 2, 2020, 4:29 p.m. OK Clang++17 Diagnostics TESTS 83 1762 102604800 2000
68086566 MarwanNabil E Jan. 2, 2020, 4:28 p.m. OK Clang++17 Diagnostics TESTS 83 1793 102604800 2000
54420398 rainboy E May 20, 2019, 3:05 p.m. OK GNU C11 TESTS 83 62 100249600 2000
57192221 vjudge1 E July 17, 2019, 11:03 a.m. OK GNU C++11 TESTS 83 46 100454400 2000
53688723 freenm E May 3, 2019, 3:06 a.m. OK GNU C++11 TESTS 83 46 100454400 2000
51449059 vjudge1 E March 18, 2019, 1:50 p.m. OK GNU C++11 TESTS 83 46 100454400 2000
51267221 mrrubiks E March 13, 2019, 4:09 p.m. OK GNU C++11 TESTS 83 46 100454400 2000
59129280 luogu_bot1 E Aug. 20, 2019, 10:21 a.m. OK GNU C++11 TESTS 83 46 100454400 2000
58704578 zstu2018329621262 E Aug. 13, 2019, 8:59 a.m. OK GNU C++11 TESTS 83 46 104243200 2000
62627108 elbolga E Oct. 15, 2019, 2:22 p.m. OK GNU C++11 TESTS 83 61 28876800 2000
62851815 Kylin_ E Oct. 18, 2019, 7:40 a.m. OK GNU C++11 TESTS 83 61 100249600 2000
51814749 zxz520 E March 25, 2019, 8:25 a.m. OK GNU C++11 TESTS 83 61 100352000 2000
58471545 luogu_bot1 E Aug. 9, 2019, 12:43 a.m. OK GNU C++11 TESTS 83 61 100454400 2000
54864642 MieLLO E May 31, 2019, 5:19 a.m. OK GNU C++14 TESTS 83 61 307200 2000
51859198 Nova E March 26, 2019, 12:27 p.m. OK GNU C++14 TESTS 83 61 100454400 2000
52409079 sunyunqi E April 6, 2019, 1:18 p.m. OK GNU C++14 TESTS 83 62 100249600 2000
53305652 shuai_hui E April 26, 2019, 2:56 a.m. OK GNU C++14 TESTS 83 62 100249600 2000
51533084 dlwocks31 E March 19, 2019, 4:38 p.m. OK GNU C++14 TESTS 83 62 100352000 2000
58363864 yyhslfw E Aug. 6, 2019, 2:32 a.m. OK GNU C++14 TESTS 83 62 100454400 2000
52461980 13553812325 E April 7, 2019, 1:50 p.m. OK GNU C++14 TESTS 83 62 100454400 2000
51859349 Nova E March 26, 2019, 12:30 p.m. OK GNU C++14 TESTS 83 62 100454400 2000
51782843 vjudge5 E March 24, 2019, 9:15 a.m. OK GNU C++14 TESTS 83 62 100454400 2000
51131174 HNO2 E March 10, 2019, 1:46 p.m. OK GNU C++14 TESTS 83 62 100556800 2000
51151850 blkrop E March 11, 2019, 8:18 a.m. OK GNU C++17 TESTS 83 31 307200 2000
51653144 niganiga E March 21, 2019, 7:49 p.m. OK GNU C++17 TESTS 83 46 0 2000
61313024 300id E Sept. 26, 2019, 9:59 a.m. OK GNU C++17 TESTS 83 46 100659200 2000
51618628 Z-Saber E March 21, 2019, 1:25 p.m. OK GNU C++17 TESTS 83 46 100659200 2000
51304911 BBpigeon E March 14, 2019, 4:18 p.m. OK GNU C++17 TESTS 83 46 100659200 2000
61313343 Ketchum E Sept. 26, 2019, 10:08 a.m. OK GNU C++17 TESTS 83 46 100659200 2000
65086292 Ares E Nov. 15, 2019, 5:07 p.m. OK GNU C++17 TESTS 83 46 104345600 2000
63991927 sdhjss0001 E Nov. 1, 2019, 1:24 p.m. OK GNU C++17 TESTS 83 61 100556800 2000
51304643 BBpigeon E March 14, 2019, 4:10 p.m. OK GNU C++17 TESTS 83 61 100659200 2000
51253575 Sheryang E March 13, 2019, 10:01 a.m. OK GNU C++17 TESTS 83 61 104448000 2000
61170548 synapse E Sept. 23, 2019, 4:28 p.m. OK Go TESTS 83 78 0 2000
54421615 Dukkha E May 20, 2019, 3:48 p.m. OK Java 8 TESTS 83 248 0 2000
51252580 xodiac E March 13, 2019, 9:30 a.m. OK Java 8 TESTS 83 249 145715200 2000
51196503 mashinist E March 11, 2019, 7:42 p.m. OK Java 8 TESTS 83 264 142540800 2000
58682328 adeepgarg13 E Aug. 12, 2019, 7:42 p.m. OK Java 8 TESTS 83 264 146022400 2000
51142245 wadissimo E March 10, 2019, 8:08 p.m. OK Java 8 TESTS 83 265 154419200 2000
51794472 mikkk E March 24, 2019, 2:23 p.m. OK Java 8 TESTS 83 280 151859200 2000
51546135 sameep17264 E March 19, 2019, 8:18 p.m. OK Java 8 TESTS 83 280 155033600 2000
51406440 sumit3 E March 17, 2019, 10:06 a.m. OK Java 8 TESTS 83 295 150016000 2000
67496556 FluffyPotato E Dec. 23, 2019, 11:31 p.m. OK Java 8 TESTS 83 296 0 2000
51168937 Jarik E March 11, 2019, 3:30 p.m. OK Java 8 TESTS 83 296 143257600 2000
59644952 Spheniscine E Aug. 29, 2019, 5:05 a.m. OK Kotlin TESTS 83 311 139980800 2000
54350814 Quaternion E May 18, 2019, 2:43 p.m. OK Kotlin TESTS 83 842 1228800 2000
52070961 hongquanntct E March 31, 2019, 7:47 a.m. OK Mono C# TESTS 83 171 101068800 2000
52070798 hongquanntct E March 31, 2019, 7:42 a.m. OK Mono C# TESTS 83 171 101068800 2000
51144349 Mosyagin E March 10, 2019, 10 p.m. OK Mono C# TESTS 83 1247 5427200 2000
51161966 fr0st E March 11, 2019, 12:46 p.m. OK Mono C# TESTS 83 1325 104755200 2000
53819943 vjudge2 E May 6, 2019, 12:37 p.m. OK MS C++ TESTS 83 62 100454400 2000
57188542 vjudge4 E July 17, 2019, 9:33 a.m. OK MS C++ TESTS 83 77 100659200 2000
54648046 vjudge5 E May 26, 2019, 2:54 a.m. OK MS C++ TESTS 83 77 100659200 2000
51205238 qcwlmqy E March 12, 2019, 4:12 a.m. OK MS C++ TESTS 83 93 104345600 2000
51128524 Yanhui E March 10, 2019, 12:45 p.m. OK MS C++ TESTS 83 109 100454400 2000
54648001 DIY E May 26, 2019, 2:52 a.m. OK MS C++ TESTS 83 109 100659200 2000
52307742 vjudge1 E April 4, 2019, 1:06 p.m. OK MS C++ TESTS 83 109 102297600 2000
51616193 vjudge3 E March 21, 2019, 12:32 p.m. OK MS C++ TESTS 83 171 100556800 2000
51616164 ys1468362286 E March 21, 2019, 12:31 p.m. OK MS C++ TESTS 83 186 100556800 2000
57184218 vjudge5 E July 17, 2019, 8:12 a.m. OK MS C++ TESTS 83 343 204492800 2000
58694842 ZSTU-2018329621261 E Aug. 13, 2019, 5:30 a.m. OK MS C++ 2017 TESTS 83 93 100659200 2000
59932209 vjudge4 E Sept. 3, 2019, 7:46 a.m. OK MS C++ 2017 TESTS 83 109 100659200 2000
53107260 SendThemToHell E April 21, 2019, 9:12 p.m. OK MS C++ 2017 TESTS 83 140 205107200 2000
52955514 MishaSm E April 18, 2019, 1:36 p.m. OK MS C++ 2017 TESTS 83 155 100556800 2000
53032878 zzq233 E April 20, 2019, 3:22 a.m. OK MS C++ 2017 TESTS 83 156 200908800 2000
51950511 SyavaSpb E March 28, 2019, 7:50 p.m. OK MS C++ 2017 TESTS 83 171 100659200 2000
51083915 Angelina_Kurepina E March 9, 2019, 12:27 p.m. OK MS C++ 2017 TESTS 83 202 201113600 2000
52082660 R99 E March 31, 2019, 12:52 p.m. OK MS C++ 2017 TESTS 83 311 100454400 2000
51240009 pajenegod E March 12, 2019, 9:01 p.m. OK PyPy 2 TESTS 83 327 101068800 2000
51240293 pajenegod E March 12, 2019, 9:19 p.m. OK PyPy 2 TESTS 83 343 101683200 2000
51240224 pajenegod E March 12, 2019, 9:14 p.m. OK PyPy 2 TESTS 83 343 101683200 2000
51239833 c1729 E March 12, 2019, 8:53 p.m. OK PyPy 2 TESTS 83 358 101683200 2000
51240047 c1729 E March 12, 2019, 9:04 p.m. OK PyPy 2 TESTS 83 374 52019200 2000
51166744 supachai_pay E March 11, 2019, 2:34 p.m. OK PyPy 2 TESTS 83 405 101068800 2000
51240954 pajenegod E March 12, 2019, 9:59 p.m. OK PyPy 2 TESTS 83 467 201420800 2000
51159533 gatsko E March 11, 2019, 11:44 a.m. OK PyPy 2 TESTS 83 670 105062400 2000
51146118 Maruchan E March 11, 2019, 12:36 a.m. OK PyPy 2 TESTS 83 732 101888000 2000
51279528 oscarchichun E March 14, 2019, 2:15 a.m. OK PyPy 2 TESTS 83 967 101376000 2000
51806422 Leendertz E March 24, 2019, 10:18 p.m. OK PyPy 3 TESTS 83 358 7065600 2000
51092413 mikelopster E March 9, 2019, 2:51 p.m. OK PyPy 3 TESTS 83 561 101478400 2000
52534909 beemax E April 9, 2019, 3:08 p.m. OK PyPy 3 TESTS 83 732 102912000 2000
52028036 hrustim25 E March 30, 2019, 4:01 p.m. OK PyPy 3 TESTS 83 764 112947200 2000
51657334 ien49fh E March 21, 2019, 10:42 p.m. OK PyPy 3 TESTS 83 826 10649600 2000
51380877 yfo E March 16, 2019, 4:11 p.m. OK PyPy 3 TESTS 83 982 101580800 2000
51380897 yfo E March 16, 2019, 4:12 p.m. OK PyPy 3 TESTS 83 982 101785600 2000
51303384 The_Lost_Desu E March 14, 2019, 3:32 p.m. OK PyPy 3 TESTS 83 982 112742400 2000
56607152 brosucks E July 6, 2019, 5:26 a.m. OK PyPy 3 TESTS 83 1263 103731200 2000
51303703 mikimowski E March 14, 2019, 3:43 p.m. OK PyPy 3 TESTS 83 1294 112025600 2000
61400452 sansen E Sept. 28, 2019, 4:55 a.m. OK Rust TESTS 83 155 100556800 2000
55407142 kobae964 E June 10, 2019, 5:14 p.m. OK Rust TESTS 83 187 100864000 2000
51337692 yakamoto E March 15, 2019, 2:54 p.m. OK Scala TESTS 83 904 143564800 2000

remove filters

Back to search problems