Codeforces Round 561 (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
1166 Codeforces Round 561 (Div. 2) FINISHED False 7200 179333687 May 17, 2019, 3:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 14441 ) A Silent Classroom PROGRAMMING combinatorics greedy 900

B'There are n students in the first grade of Nlogonia high school. The principal wishes to split the students into two classrooms (each student must be in exactly one of the classrooms). Two distinct students whose name starts with the same letter will be chatty if they are put in the same classroom (because they must have a lot in common). Let x be the number of such pairs of students in a split. Pairs (a, b) and (b, a) are the same and counted only once. For example, if there are 6 students: "olivia", "jacob", "tanya", "jack", "oliver" and "jessica", then: You are given the list of the n names. What is the minimum x we can obtain by splitting the students into classrooms? Note that it is valid to place all of the students in one of the classrooms, leaving the other one empty. The first line contains a single integer n ( 1 <= q n <= q 100 ) -- the number of students. After this n lines follow. The i -th line contains the name of the i -th student. It is guaranteed each name is a string of lowercase English letters of length at most 20 . Note that multiple students may share the same name. The output must consist of a single integer x -- the minimum possible number of chatty pairs. In the first sample the minimum number of pairs is 1 . This can be achieved, for example, by putting everyone except jose in one classroom, and jose in the other, so jorge and jerry form the only chatty pair. In the second sample the minimum number of pairs is 2 . This can be achieved, for example, by putting kambei, gorobei, shichiroji and kyuzo in one room and putting heihachi, katsushiro and kikuchiyo in the other room. In this case the two pairs are kambei and kyuzo, and katsushiro and kikuchiyo. In the third sample the minimum number of pairs is 4 . This can be achieved by placing three of the students named mike in one classroom and the other two students in another classroom. Th'...

Tutorials

Codeforces Round #561 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
60742311 Ghozlan A Sept. 17, 2019, 9:09 p.m. OK Clang++17 Diagnostics TESTS 23 46 0 900
54405839 Tieway59 A May 20, 2019, 6:10 a.m. OK Clang++17 Diagnostics TESTS 23 46 0 900
54407434 DTUPIS A May 20, 2019, 7:21 a.m. OK Clang++17 Diagnostics TESTS 23 46 0 900
54431577 octocoder A May 21, 2019, 12:09 a.m. OK Clang++17 Diagnostics TESTS 23 46 0 900
56236164 dshaman92 A June 28, 2019, 4:20 p.m. OK Clang++17 Diagnostics TESTS 23 46 0 900
54331616 sk99735548660 A May 18, 2019, 6:12 a.m. OK Clang++17 Diagnostics TESTS 23 46 0 900
55702507 denkora A June 18, 2019, 5:34 a.m. OK Clang++17 Diagnostics TESTS 23 46 1024000 900
55424202 xcodevn A June 11, 2019, 8:08 a.m. OK D TESTS 23 31 0 900
54324756 luogu_bot5 A May 18, 2019, 1:39 a.m. OK FPC TESTS 23 30 102400 900
62765504 72nuaq A Oct. 17, 2019, 8:30 a.m. OK FPC TESTS 23 30 102400 900
54337020 JinDT A May 18, 2019, 8:35 a.m. OK FPC TESTS 23 30 307200 900
54328108 giahung.nguyentrong A May 18, 2019, 4:10 a.m. OK FPC TESTS 23 31 102400 900
61007073 ghosthunterk A Sept. 21, 2019, 11:24 a.m. OK FPC TESTS 23 31 102400 900
67598316 duydec1 A Dec. 25, 2019, 11:01 a.m. OK FPC TESTS 23 31 102400 900
54948321 SpamBot A June 1, 2019, 5:30 p.m. OK FPC TESTS 23 31 102400 900
54391094 ErwinRommel A May 19, 2019, 4:22 p.m. OK FPC TESTS 23 31 102400 900
54511412 Craspedacusta A May 23, 2019, 7:20 a.m. OK FPC TESTS 23 46 102400 900
54315996 shanto_muk A May 17, 2019, 6:26 p.m. OK GNU C11 TESTS 23 15 0 900
54421375 hyta4982 A May 20, 2019, 3:39 p.m. OK GNU C11 TESTS 23 15 0 900
54523300 sabbir006 A May 23, 2019, 1:16 p.m. OK GNU C11 TESTS 23 15 0 900
54404296 dhamaka99 A May 20, 2019, 4:44 a.m. OK GNU C11 TESTS 23 15 0 900
54412160 i_o__o_i A May 20, 2019, 10:28 a.m. OK GNU C11 TESTS 23 15 0 900
54948784 As_if71 A June 1, 2019, 6:07 p.m. OK GNU C11 TESTS 23 30 0 900
55697168 cs234_shrey A June 17, 2019, 11:54 p.m. OK GNU C11 TESTS 23 30 0 900
55807025 33Sakib33 A June 19, 2019, 11:46 p.m. OK GNU C11 TESTS 23 30 0 900
58820846 akash19jain A Aug. 14, 2019, 2:02 p.m. OK GNU C11 TESTS 23 30 0 900
66406106 LaZy_BaD_bOy A Dec. 6, 2019, 1:44 p.m. OK GNU C11 TESTS 23 30 0 900
54830027 DeD_TihoN A May 30, 2019, 8:30 a.m. OK GNU C++11 TESTS 23 15 0 900
54989263 Noureldin A June 2, 2019, 5:38 p.m. OK GNU C++11 TESTS 23 15 0 900
55605394 irwin.hetmmet A June 15, 2019, 10:20 p.m. OK GNU C++11 TESTS 23 15 0 900
55605421 jorge.valles A June 15, 2019, 10:23 p.m. OK GNU C++11 TESTS 23 15 0 900
56192186 Giuco A June 28, 2019, 8:13 a.m. OK GNU C++11 TESTS 23 15 0 900
56704815 Clapie A July 8, 2019, 10:40 a.m. OK GNU C++11 TESTS 23 15 0 900
58057091 vjudge4 A July 31, 2019, 5:49 a.m. OK GNU C++11 TESTS 23 15 0 900
58432195 Leppin A Aug. 7, 2019, 12:21 p.m. OK GNU C++11 TESTS 23 15 0 900
65478518 swineherd A Nov. 21, 2019, 10:56 a.m. OK GNU C++11 TESTS 23 15 0 900
67634809 vjudge5 A Dec. 26, 2019, 6:19 a.m. OK GNU C++11 TESTS 23 15 0 900
63683458 KingReza A Oct. 28, 2019, 9:04 p.m. OK GNU C++14 TESTS 23 15 0 900
68720042 killer4639 A Jan. 13, 2020, 3:54 p.m. OK GNU C++14 TESTS 23 15 0 900
68301571 nxtnxt A Jan. 6, 2020, 6:53 a.m. OK GNU C++14 TESTS 23 15 0 900
67319530 vindicate_code A Dec. 21, 2019, 7:28 a.m. OK GNU C++14 TESTS 23 15 0 900
67303878 akkipoonia A Dec. 20, 2019, 8:02 p.m. OK GNU C++14 TESTS 23 15 0 900
66258155 iwriaw A Dec. 4, 2019, 7:07 a.m. OK GNU C++14 TESTS 23 15 0 900
65624105 mh755628 A Nov. 24, 2019, 7:17 a.m. OK GNU C++14 TESTS 23 15 0 900
63736646 Zer0or0ne A Oct. 29, 2019, 3:31 p.m. OK GNU C++14 TESTS 23 15 0 900
63122035 lclpsoz A Oct. 22, 2019, 11:37 a.m. OK GNU C++14 TESTS 23 15 0 900
62633125 chiraga196 A Oct. 15, 2019, 4:01 p.m. OK GNU C++14 TESTS 23 15 0 900
65802875 Asrapogorgon A Nov. 27, 2019, 8:18 a.m. OK GNU C++17 TESTS 23 15 0 900
66654631 deepakgrg3011 A Dec. 11, 2019, 9:24 p.m. OK GNU C++17 TESTS 23 15 0 900
66659858 zodgin A Dec. 12, 2019, 3:37 a.m. OK GNU C++17 TESTS 23 15 0 900
67301088 Utsav_goyal A Dec. 20, 2019, 6:45 p.m. OK GNU C++17 TESTS 23 15 0 900
67602342 vjudge4 A Dec. 25, 2019, 12:23 p.m. OK GNU C++17 TESTS 23 15 0 900
67668926 imnasim3.1415 A Dec. 26, 2019, 7:11 p.m. OK GNU C++17 TESTS 23 15 0 900
68012448 nayan_000 A Dec. 31, 2019, 4:32 p.m. OK GNU C++17 TESTS 23 15 0 900
68288113 iheb32 A Jan. 5, 2020, 7:29 p.m. OK GNU C++17 TESTS 23 15 0 900
68337894 ozy1220 A Jan. 7, 2020, 12:11 a.m. OK GNU C++17 TESTS 23 15 0 900
68946024 Prem1802065p A Jan. 16, 2020, 4:11 p.m. OK GNU C++17 TESTS 23 15 0 900
54663316 corelof A May 26, 2019, 11:53 a.m. OK Go TESTS 23 30 0 900
54329323 Jack5505 A May 18, 2019, 4:56 a.m. OK Go TESTS 23 30 0 900
55040040 keitax A June 3, 2019, 3:06 p.m. OK Go TESTS 23 31 0 900
54796430 3pointer A May 29, 2019, 9:51 a.m. OK Go TESTS 23 31 0 900
54480805 tony_stark1 A May 22, 2019, 10:57 a.m. OK Go TESTS 23 31 0 900
54390279 wilcot A May 19, 2019, 3:48 p.m. OK Go TESTS 23 31 0 900
68430289 ktateish A Jan. 9, 2020, 6:30 a.m. OK Go TESTS 23 46 0 900
55142637 abdolsamad A June 5, 2019, 3:05 p.m. OK Go TESTS 23 46 0 900
54445920 I_UsedTo_Love_You A May 21, 2019, 11:16 a.m. OK Go TESTS 23 46 0 900
54354833 kimbbakar A May 18, 2019, 4:57 p.m. OK Go TESTS 23 46 0 900
57909097 jmazon A July 28, 2019, 7:02 p.m. OK Haskell TESTS 23 30 102400 900
54508745 mihassan A May 23, 2019, 5:53 a.m. OK Haskell TESTS 23 30 102400 900
54508633 mihassan A May 23, 2019, 5:49 a.m. OK Haskell TESTS 23 30 102400 900
54878970 codemania A May 31, 2019, 1:16 p.m. OK Haskell TESTS 23 46 102400 900
54490529 mihassan A May 22, 2019, 3:13 p.m. OK Haskell TESTS 23 46 102400 900
54371697 code_report A May 19, 2019, 6:51 a.m. OK Haskell TESTS 23 46 102400 900
54324209 jedikni A May 18, 2019, 1:03 a.m. OK Haskell TESTS 23 46 102400 900
65590044 machhra A Nov. 23, 2019, 1:48 p.m. OK Java 11 TESTS 23 170 0 900
69208830 RetiredProgrammer A Jan. 20, 2020, 7:03 p.m. OK Java 11 TESTS 23 171 0 900
69430594 warrioramrit A Jan. 23, 2020, 5:13 p.m. OK Java 11 TESTS 23 186 0 900
68607689 Nurmangaliyev A Jan. 11, 2020, 2:36 p.m. OK Java 11 TESTS 23 187 0 900
67451563 CodAR A Dec. 23, 2019, 4:35 a.m. OK Java 11 TESTS 23 187 0 900
65396189 vamk18 A Nov. 19, 2019, 7:12 p.m. OK Java 11 TESTS 23 187 0 900
64177014 Zarir A Nov. 3, 2019, 9:33 p.m. OK Java 11 TESTS 23 233 0 900
68394838 bluesky111 A Jan. 8, 2020, 10:31 a.m. OK Java 8 TESTS 23 93 0 900
54429141 icpc_loser A May 20, 2019, 8:49 p.m. OK Java 8 TESTS 23 93 0 900
54633865 amirrr A May 25, 2019, 3:52 p.m. OK Java 8 TESTS 23 108 0 900
54633148 ratn41 A May 25, 2019, 3:29 p.m. OK Java 8 TESTS 23 108 0 900
54553470 wanTedGuY A May 24, 2019, 10:26 a.m. OK Java 8 TESTS 23 108 0 900
54451192 arya5691 A May 21, 2019, 1:36 p.m. OK Java 8 TESTS 23 108 0 900
54440031 dalt A May 21, 2019, 8:07 a.m. OK Java 8 TESTS 23 108 0 900
54351109 avenio99 A May 18, 2019, 2:53 p.m. OK Java 8 TESTS 23 108 0 900
54320894 di_halt A May 17, 2019, 9:05 p.m. OK Java 8 TESTS 23 108 0 900
69272179 gouh9qn A Jan. 21, 2020, 10:07 p.m. OK Java 8 TESTS 23 109 0 900
55010718 masterMint A June 3, 2019, 9:54 a.m. OK JavaScript TESTS 23 31 0 900
56158962 I.A.K.O.V A June 27, 2019, 11:32 a.m. OK Kotlin TESTS 23 109 0 900
68431450 abdurauf1997 A Jan. 9, 2020, 7:03 a.m. OK Kotlin TESTS 23 124 0 900
56599288 Spheniscine A July 5, 2019, 9:53 p.m. OK Kotlin TESTS 23 124 0 900
56550838 Spheniscine A July 5, 2019, 9:40 a.m. OK Kotlin TESTS 23 124 0 900
56158894 I.A.K.O.V A June 27, 2019, 11:31 a.m. OK Kotlin TESTS 23 124 0 900
56060646 mendel_vv A June 26, 2019, 5:14 a.m. OK Kotlin TESTS 23 124 0 900
54724987 Deemo A May 27, 2019, 7:46 p.m. OK Kotlin TESTS 23 124 0 900
54562860 ulna A May 24, 2019, 2:48 p.m. OK Kotlin TESTS 23 124 0 900
54967107 MattM A June 2, 2019, 6:54 a.m. OK Kotlin TESTS 23 140 0 900
54737245 plusplus6408 A May 28, 2019, 5:44 a.m. OK Kotlin TESTS 23 140 0 900
54652227 og.kostya A May 26, 2019, 6:11 a.m. OK Mono C# TESTS 23 46 0 900
55113077 LapsleyJuno SaurumanS lewasupaman A June 5, 2019, 7:21 a.m. OK Mono C# TESTS 23 46 0 900
54351347 MiuraMiuMiu A May 18, 2019, 3:01 p.m. OK Mono C# TESTS 23 46 0 900
54354818 m1_k3 A May 18, 2019, 4:56 p.m. OK Mono C# TESTS 23 46 0 900
54417167 camypaper A May 20, 2019, 1:16 p.m. OK Mono C# TESTS 23 46 0 900
54470169 sshiv A May 22, 2019, 4:46 a.m. OK Mono C# TESTS 23 46 0 900
54482499 fr0st A May 22, 2019, 11:39 a.m. OK Mono C# TESTS 23 46 0 900
54331521 Favarish A May 18, 2019, 6:09 a.m. OK Mono C# TESTS 23 61 0 900
54518291 iamlegend A May 23, 2019, 11:05 a.m. OK Mono C# TESTS 23 62 0 900
58195246 GusztavSzmolik A Aug. 2, 2019, 11:10 p.m. OK Mono C# TESTS 23 62 0 900
56551355 vjudge1 A July 5, 2019, 9:56 a.m. OK MS C++ TESTS 23 30 0 900
58058158 vjudge1 A July 31, 2019, 6:20 a.m. OK MS C++ TESTS 23 30 0 900
58060174 vjudge5 A July 31, 2019, 7:07 a.m. OK MS C++ TESTS 23 30 0 900
58063776 vjudge3 A July 31, 2019, 8:17 a.m. OK MS C++ TESTS 23 30 0 900
58085531 vjudge5 A July 31, 2019, 3:26 p.m. OK MS C++ TESTS 23 30 0 900
59863908 DM1 A Sept. 1, 2019, 4:21 p.m. OK MS C++ TESTS 23 30 0 900
61100293 vjudge3 A Sept. 23, 2019, 6:21 a.m. OK MS C++ TESTS 23 30 0 900
61106004 vjudge4 A Sept. 23, 2019, 9:13 a.m. OK MS C++ TESTS 23 30 0 900
61114804 vjudge1 A Sept. 23, 2019, 12:31 p.m. OK MS C++ TESTS 23 30 0 900
61207076 vjudge2 A Sept. 24, 2019, 10:08 a.m. OK MS C++ TESTS 23 30 0 900
67065951 vjudge2 A Dec. 17, 2019, 11:06 a.m. OK MS C++ 2017 TESTS 23 15 0 900
55272543 parisa.mqdm A June 7, 2019, 5:09 p.m. OK MS C++ 2017 TESTS 23 15 0 900
63875886 AleksanderBalobanov A Oct. 30, 2019, 6:59 p.m. OK MS C++ 2017 TESTS 23 30 0 900
61108223 vjudge3 A Sept. 23, 2019, 10:10 a.m. OK MS C++ 2017 TESTS 23 30 0 900
59219887 V4V A Aug. 21, 2019, 11:50 a.m. OK MS C++ 2017 TESTS 23 30 0 900
58101063 vjudge3 A Aug. 1, 2019, 12:53 a.m. OK MS C++ 2017 TESTS 23 30 0 900
58056293 vjudge5 A July 31, 2019, 5:23 a.m. OK MS C++ 2017 TESTS 23 30 0 900
57310292 vjudge2 A July 19, 2019, 6:10 a.m. OK MS C++ 2017 TESTS 23 30 0 900
54703866 jywj A May 27, 2019, 3:12 a.m. OK MS C++ 2017 TESTS 23 30 0 900
54643051 PetrMakhnev A May 25, 2019, 8:55 p.m. OK MS C++ 2017 TESTS 23 30 0 900
61315604 porhunov26 A Sept. 26, 2019, 10:57 a.m. OK PascalABC.NET TESTS 23 202 0 900
56607295 Gimber A July 6, 2019, 5:31 a.m. OK PascalABC.NET TESTS 23 202 0 900
54315274 aitymov A May 17, 2019, 6:08 p.m. OK PHP TESTS 23 31 409600 900
54801310 lostamok A May 29, 2019, 12:04 p.m. OK PHP TESTS 23 31 512000 900
54801687 lostamok A May 29, 2019, 12:13 p.m. OK PHP TESTS 23 46 0 900
55507483 mayakin A June 12, 2019, 6:56 p.m. OK PHP TESTS 23 46 512000 900
54453472 anancodec A May 21, 2019, 2:40 p.m. OK PyPy 2 TESTS 23 124 0 900
54482578 anancodec A May 22, 2019, 11:41 a.m. OK PyPy 2 TESTS 23 124 0 900
54391237 mdippel A May 19, 2019, 4:27 p.m. OK PyPy 2 TESTS 23 124 0 900
54388551 misterPooL A May 19, 2019, 2:48 p.m. OK PyPy 2 TESTS 23 124 0 900
54314384 c1729 A May 17, 2019, 5:51 p.m. OK PyPy 2 TESTS 23 140 1024000 900
60054897 yumtam A Sept. 5, 2019, 3:25 a.m. OK PyPy 2 TESTS 23 155 1228800 900
67138788 aaa_bbb_ccc A Dec. 18, 2019, 5:46 a.m. OK PyPy 2 TESTS 23 171 0 900
54324683 wangkan2001 A May 18, 2019, 1:34 a.m. OK PyPy 2 TESTS 23 186 0 900
54469741 thenewguy39 A May 22, 2019, 4:19 a.m. OK PyPy 2 TESTS 23 202 0 900
59657910 galim665 A Aug. 29, 2019, 11:15 a.m. OK PyPy 3 TESTS 23 124 0 900
59581696 swguy A Aug. 27, 2019, 4:20 p.m. OK PyPy 3 TESTS 23 124 0 900
54828205 grhkm A May 30, 2019, 7:38 a.m. OK PyPy 3 TESTS 23 124 0 900
54657307 ragibshahriar2002 A May 26, 2019, 9:01 a.m. OK PyPy 3 TESTS 23 124 0 900
54423336 dragos231456 A May 20, 2019, 4:47 p.m. OK PyPy 3 TESTS 23 124 0 900
54375798 nickzuck_007 A May 19, 2019, 8:44 a.m. OK PyPy 3 TESTS 23 124 0 900
54362691 modestas_ A May 18, 2019, 10:07 p.m. OK PyPy 3 TESTS 23 124 0 900
54357878 Kinopitals A May 18, 2019, 6:39 p.m. OK PyPy 3 TESTS 23 124 0 900
54349828 matus A May 18, 2019, 2:13 p.m. OK PyPy 3 TESTS 23 124 0 900
54322382 manuchroma A May 17, 2019, 10:37 p.m. OK PyPy 3 TESTS 23 124 0 900
54734197 29029 A May 28, 2019, 3:34 a.m. OK Python 2 TESTS 23 170 0 900
54409505 franckmy A May 20, 2019, 8:50 a.m. OK Python 2 TESTS 23 170 0 900
54734217 29029 A May 28, 2019, 3:36 a.m. OK Python 2 TESTS 23 171 0 900
54636749 juan2114 A May 25, 2019, 5:26 p.m. OK Python 2 TESTS 23 171 0 900
54540277 AWB29 A May 24, 2019, 12:41 a.m. OK Python 2 TESTS 23 171 0 900
54436929 yajun A May 21, 2019, 6:18 a.m. OK Python 2 TESTS 23 171 0 900
54357827 lyjccmm A May 18, 2019, 6:38 p.m. OK Python 2 TESTS 23 171 0 900
54336479 kaif_7 A May 18, 2019, 8:21 a.m. OK Python 2 TESTS 23 171 0 900
54334542 jolt.tks A May 18, 2019, 7:29 a.m. OK Python 2 TESTS 23 171 0 900
54311739 coderbd A May 17, 2019, 5:03 p.m. OK Python 2 TESTS 23 171 0 900
55107116 piyushohri_1 A June 5, 2019, 3:44 a.m. OK Python 3 TESTS 23 93 0 900
54992470 the_rainmaker A June 2, 2019, 7:51 p.m. OK Python 3 TESTS 23 93 0 900
54441233 7vik A May 21, 2019, 8:46 a.m. OK Python 3 TESTS 23 93 0 900
54435026 b._ilhom A May 21, 2019, 4:38 a.m. OK Python 3 TESTS 23 93 0 900
54362241 ghanshyamb A May 18, 2019, 9:41 p.m. OK Python 3 TESTS 23 93 0 900
54328572 16ucc056 A May 18, 2019, 4:28 a.m. OK Python 3 TESTS 23 93 0 900
68119942 stars_in_the_sky A Jan. 3, 2020, 12:55 p.m. OK Python 3 TESTS 23 108 0 900
66581817 ver_y007 A Dec. 10, 2019, 9:41 a.m. OK Python 3 TESTS 23 108 0 900
58935551 chiragsoni812 A Aug. 17, 2019, 3:54 a.m. OK Python 3 TESTS 23 108 0 900
55603598 shanu_im A June 15, 2019, 8:11 p.m. OK Python 3 TESTS 23 108 0 900
54446443 zirconium329 A May 21, 2019, 11:31 a.m. OK Ruby TESTS 23 62 0 900
54422909 praba_codes A May 20, 2019, 4:32 p.m. OK Ruby TESTS 23 62 0 900
54422814 praba_codes A May 20, 2019, 4:29 p.m. OK Ruby TESTS 23 93 102400 900
54505806 tttuongquang A May 23, 2019, 3:40 a.m. OK Scala TESTS 23 405 0 900

remove filters

Back to search problems