Codeforces Round 566 (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
1182 Codeforces Round 566 (Div. 2) FINISHED False 7200 176921662 June 11, 2019, 1:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4445 ) C Beautiful Lyrics PROGRAMMING data structures greedy strings 1700

B'You are given n words, each of which consists of lowercase alphabet letters. Each word contains at least one vowel. You are going to choose some of the given words and make as many beautiful lyrics as possible. Each lyric consists of two lines. Each line consists of two words separated by whitespace. A lyric is beautiful if and only if it satisfies all conditions below. Also, letters "a", "e", "o", "i", and "u" are vowels. Note that "y" is never vowel. For example of a beautiful lyric, "whatsup yowowowow" For example of a not beautiful lyric, "iam mcdic" How many beautiful lyrics can you write from given words? Note that you cannot use a word more times than it is given to you. For example, if a word is given three times, you can use it at most three times. The first line contains single integer n ( 1 <= n <= 10^{5} ) -- the number of words. The i -th of the next n lines contains string s_{i} consisting lowercase alphabet letters -- the i -th word. It is guaranteed that the sum of the total word length is equal or less than 10^{6} . Each word contains at least one vowel. In the first line, print m -- the number of maximum possible beautiful lyrics. In next 2m lines, print m beautiful lyrics (two lines per lyric). If there are multiple answers, print any. In the first example, those beautiful lyrics are one of the possible answers. Let 's look at the first lyric on the sample output of the first example. "about proud hooray round" forms a beautiful lyric because "about" and "hooray" have same number of vowels, "proud" and "round" have same number of vowels, and both lines have same last vowel. On the other hand, you cannot form any beautiful lyric with the word "codeforces". In the second example, you cannot form any beautiful lyric from given words. In the third example, you can use the word "same" up to three times. '...

Tutorials

67614

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
55458836 daut-dlang C June 11, 2019, 2:46 p.m. OK D TESTS 36 140 22425600 1700
55523285 Denor C June 13, 2019, 9:46 a.m. OK Delphi TESTS 37 124 5427200 1700
55605331 rainboy C June 15, 2019, 10:13 p.m. OK GNU C11 TESTS 37 249 8192000 1700
55717465 ktk54x C June 18, 2019, 1:28 p.m. OK GNU C11 TESTS 37 264 7987200 1700
55475126 sansen C June 11, 2019, 10:20 p.m. OK GNU C11 TESTS 36 265 4710400 1700
55511820 wucstdio C June 13, 2019, 12:06 a.m. OK GNU C++11 TESTS 37 46 6246400 1700
55512763 luogu_bot3 C June 13, 2019, 1:48 a.m. OK GNU C++11 TESTS 37 46 6246400 1700
55476324 msuwakow C June 12, 2019, 12:12 a.m. OK GNU C++11 TESTS 36 46 10035200 1700
55610512 ReaLNero1 C June 16, 2019, 5:22 a.m. OK GNU C++11 TESTS 37 46 12800000 1700
55467572 searchstar C June 11, 2019, 5:06 p.m. OK GNU C++11 TESTS 36 46 12800000 1700
55455024 spoi C June 11, 2019, 2:21 p.m. OK GNU C++11 TESTS 36 61 7065600 1700
55545111 zzzzqq C June 14, 2019, 1:12 a.m. OK GNU C++11 TESTS 37 61 32358400 1700
55492960 wzeb C June 12, 2019, 11:03 a.m. OK GNU C++11 TESTS 36 62 4096000 1700
55457120 lwhlwh C June 11, 2019, 2:35 p.m. OK GNU C++11 TESTS 36 62 4710400 1700
60312682 lizhijian C Sept. 9, 2019, 4:31 p.m. OK GNU C++11 TESTS 37 62 5120000 1700
55480792 AKS1996 C June 12, 2019, 4:58 a.m. OK GNU C++14 TESTS 36 46 8499200 1700
58327905 vjudge4 C Aug. 5, 2019, 8:24 a.m. OK GNU C++14 TESTS 37 61 3584000 1700
58329635 vjudge3 C Aug. 5, 2019, 8:56 a.m. OK GNU C++14 TESTS 37 61 3584000 1700
55685459 BungakuShoujo C June 17, 2019, 3:15 p.m. OK GNU C++14 TESTS 37 61 5017600 1700
55454498 codewiz C June 11, 2019, 2:18 p.m. OK GNU C++14 TESTS 36 62 4096000 1700
58414235 n_dao107 C Aug. 7, 2019, 3:41 a.m. OK GNU C++14 TESTS 37 62 4710400 1700
55527358 le9018468 C June 13, 2019, 11:50 a.m. OK GNU C++14 TESTS 37 62 4915200 1700
56840862 bluefi C July 11, 2019, 11:26 a.m. OK GNU C++14 TESTS 37 62 5120000 1700
55461349 manas_uni C June 11, 2019, 3:01 p.m. OK GNU C++14 TESTS 36 62 5120000 1700
55549728 Origenes C June 14, 2019, 6:15 a.m. OK GNU C++14 TESTS 37 62 5222400 1700
55457587 xsot C June 11, 2019, 2:38 p.m. OK GNU C++17 TESTS 36 61 4915200 1700
55480547 Shirley_lf C June 12, 2019, 4:45 a.m. OK GNU C++17 TESTS 36 61 6758400 1700
55980360 2bcn C June 23, 2019, 8:25 p.m. OK GNU C++17 TESTS 37 62 3584000 1700
55457035 oToToT C June 11, 2019, 2:34 p.m. OK GNU C++17 TESTS 36 62 4505600 1700
55514379 _nicktz1408_ C June 13, 2019, 3:47 a.m. OK GNU C++17 TESTS 37 62 4710400 1700
55739393 SustainedScreaming C June 19, 2019, 6:36 a.m. OK GNU C++17 TESTS 37 62 4710400 1700
55596396 The_Unlucky_Guy C June 15, 2019, 3:16 p.m. OK GNU C++17 TESTS 37 62 4710400 1700
55473220 WNG C June 11, 2019, 8:18 p.m. OK GNU C++17 TESTS 36 62 4710400 1700
55471516 kronos C June 11, 2019, 7:07 p.m. OK GNU C++17 TESTS 36 62 4710400 1700
56585609 fengsq C July 5, 2019, 4:34 p.m. OK GNU C++17 TESTS 37 62 4812800 1700
59381228 sighduck C Aug. 24, 2019, 3:16 a.m. OK Go TESTS 37 187 23040000 1700
55460343 cojna C June 11, 2019, 2:56 p.m. OK Haskell TESTS 36 234 25292800 1700
55502112 azhar556 C June 12, 2019, 3:38 p.m. OK Java 8 TESTS 36 171 0 1700
55699555 IvanD94 C June 18, 2019, 2:45 a.m. OK Java 8 TESTS 37 171 2457600 1700
55802963 heet_2201 C June 19, 2019, 8:03 p.m. OK Java 8 TESTS 37 171 3072000 1700
55542759 Vishal_dhanani C June 13, 2019, 9:25 p.m. OK Java 8 TESTS 37 186 4505600 1700
55465284 Hapsidra C June 11, 2019, 4:16 p.m. OK Java 8 TESTS 36 186 4710400 1700
55467165 -messi- C June 11, 2019, 4:55 p.m. OK Java 8 TESTS 36 186 7884800 1700
55467249 Serh.kry C June 11, 2019, 4:57 p.m. OK Java 8 TESTS 36 187 4505600 1700
55689900 MubtasimShahriar C June 17, 2019, 5:35 p.m. OK Java 8 TESTS 37 202 3584000 1700
59051376 Jarik C Aug. 18, 2019, 5:24 p.m. OK Java 8 TESTS 37 202 3584000 1700
58144102 SpargelTarzan C Aug. 1, 2019, 7:47 p.m. OK Java 8 TESTS 37 202 4198400 1700
55526827 Tzapil C June 13, 2019, 11:35 a.m. OK JavaScript TESTS 37 171 24473600 1700
55537573 Zealotrahl C June 13, 2019, 5:21 p.m. OK JavaScript TESTS 37 420 21299200 1700
56270112 Spheniscine C June 29, 2019, 11:45 a.m. OK Kotlin TESTS 37 327 5222400 1700
55494844 amirrr C June 12, 2019, 12:01 p.m. OK Kotlin TESTS 36 436 14336000 1700
55460890 max_kibble C June 11, 2019, 2:59 p.m. OK Kotlin TESTS 36 514 16793600 1700
55458408 Protagoras C June 11, 2019, 2:43 p.m. OK Kotlin TESTS 36 670 5529600 1700
55674997 treasuryonly C June 17, 2019, 9:54 a.m. OK Mono C# TESTS 37 109 15257600 1700
56764418 sevimlikedicik C July 9, 2019, 5:29 p.m. OK Mono C# TESTS 37 296 16076800 1700
55456311 eki C June 11, 2019, 2:29 p.m. OK Mono C# TESTS 36 296 68608000 1700
55456041 Jarjar314 C June 11, 2019, 2:28 p.m. OK Mono C# TESTS 36 327 12185600 1700
55965166 MiuraMiuMiu C June 23, 2019, 11:42 a.m. OK Mono C# TESTS 37 342 32563200 1700
55590492 SpinDOS C June 15, 2019, 12:04 p.m. OK Mono C# TESTS 37 545 6348800 1700
55459561 sergmel C June 11, 2019, 2:51 p.m. OK Mono C# TESTS 36 873 17305600 1700
55476607 camypaper C June 12, 2019, 12:37 a.m. OK Mono C# TESTS 36 998 215859200 1700
55456124 tang0404 C June 11, 2019, 2:28 p.m. OK MS C++ TESTS 36 77 41062400 1700
55456441 nikita1998 C June 11, 2019, 2:30 p.m. OK MS C++ TESTS 36 93 17510400 1700
58063106 vjudge3 C July 31, 2019, 8:05 a.m. OK MS C++ TESTS 37 124 7065600 1700
66266471 vjudge5 C Dec. 4, 2019, 10:41 a.m. OK MS C++ TESTS 37 171 37478400 1700
68631519 vjudge2 C Jan. 12, 2020, 3:08 a.m. OK MS C++ TESTS 37 218 7065600 1700
57350239 vjudge1 C July 20, 2019, 2:58 a.m. OK MS C++ TESTS 37 218 54169600 1700
57308689 vjudge3 C July 19, 2019, 5:29 a.m. OK MS C++ TESTS 37 233 5427200 1700
62616512 juneking jiuhuche SZYlindow C Oct. 15, 2019, 11:35 a.m. OK MS C++ TESTS 37 233 15769600 1700
57922618 kevin19984 C July 29, 2019, 5:44 a.m. OK MS C++ TESTS 37 248 6656000 1700
56507886 S.K C July 4, 2019, 9:12 a.m. OK MS C++ TESTS 37 249 6246400 1700
57264844 xsc C July 18, 2019, 6:44 a.m. OK MS C++ 2017 TESTS 37 77 6860800 1700
57587014 Still_Theory C July 23, 2019, 11:02 a.m. OK MS C++ 2017 TESTS 37 78 14643200 1700
55569074 CtrlAlt C June 14, 2019, 5:26 p.m. OK MS C++ 2017 TESTS 37 93 6041600 1700
55455712 youx C June 11, 2019, 2:26 p.m. OK MS C++ 2017 TESTS 36 93 7884800 1700
55456195 Pricolno C June 11, 2019, 2:29 p.m. OK MS C++ 2017 TESTS 36 93 9523200 1700
55460497 Skeef79 C June 11, 2019, 2:56 p.m. OK MS C++ 2017 TESTS 36 109 10240000 1700
55456289 he1fire C June 11, 2019, 2:29 p.m. OK MS C++ 2017 TESTS 36 140 9011200 1700
55461335 j2v C June 11, 2019, 3:01 p.m. OK MS C++ 2017 TESTS 36 140 16896000 1700
55479551 NPUlzh C June 12, 2019, 3:50 a.m. OK MS C++ 2017 TESTS 36 155 93184000 1700
55605815 omerb.zeybek C June 15, 2019, 11:06 p.m. OK MS C++ 2017 TESTS 37 171 7168000 1700
56816750 mayakin C July 10, 2019, 7:41 p.m. OK PHP TESTS 37 982 6246400 1700
55482876 Mukundan314 C June 12, 2019, 6:19 a.m. OK PyPy 2 TESTS 36 264 13926400 1700
55459237 YESMAths C June 11, 2019, 2:49 p.m. OK PyPy 2 TESTS 36 264 24166400 1700
55533170 shafwanur010 C June 13, 2019, 2:46 p.m. OK PyPy 2 TESTS 37 296 13926400 1700
55472147 alexwice C June 11, 2019, 7:31 p.m. OK PyPy 2 TESTS 36 311 25395200 1700
55475793 raj1307 C June 11, 2019, 11:24 p.m. OK PyPy 2 TESTS 36 327 26214400 1700
55475037 IngaleAnkur10 C June 11, 2019, 10:11 p.m. OK PyPy 2 TESTS 36 483 16793600 1700
55471048 daniel.carlos C June 11, 2019, 6:50 p.m. OK PyPy 2 TESTS 36 638 11161600 1700
55537964 shehebe C June 13, 2019, 5:36 p.m. OK PyPy 2 TESTS 37 717 17510400 1700
56455786 thuutin C July 3, 2019, 3:43 a.m. OK PyPy 2 TESTS 37 748 16691200 1700
55503643 exqt C June 12, 2019, 4:31 p.m. OK PyPy 3 TESTS 36 358 13414400 1700
55476022 Pedantic C June 11, 2019, 11:46 p.m. OK PyPy 3 TESTS 36 373 14336000 1700
55460245 Paixao C June 11, 2019, 2:55 p.m. OK PyPy 3 TESTS 36 421 13004800 1700
62514738 vyassamir C Oct. 13, 2019, 2:06 p.m. OK PyPy 3 TESTS 37 467 16793600 1700
56527765 erickjohnross C July 4, 2019, 6:01 p.m. OK PyPy 3 TESTS 37 467 19558400 1700
55540342 Mr.Inconsistent C June 13, 2019, 7:15 p.m. OK PyPy 3 TESTS 37 561 14233600 1700
69585435 deadguy C Jan. 26, 2020, 7:14 p.m. OK PyPy 3 TESTS 37 732 90828800 1700
56437979 ThePonyCoder C July 2, 2019, 3 p.m. OK PyPy 3 TESTS 37 748 21708800 1700
55475803 nik-in-au C June 11, 2019, 11:25 p.m. OK PyPy 3 TESTS 36 966 21401600 1700
58945328 tushartyagi8750 C Aug. 17, 2019, 8:41 a.m. OK PyPy 3 TESTS 37 982 13312000 1700
55471039 daniel.carlos C June 11, 2019, 6:50 p.m. OK Python 2 TESTS 36 389 9216000 1700
55469040 daniel.carlos C June 11, 2019, 5:47 p.m. OK Python 2 TESTS 36 420 9318400 1700
57811250 Helli.code C July 26, 2019, 5:27 p.m. OK Python 2 TESTS 37 421 6451200 1700
55468017 kingmoshe C June 11, 2019, 5:18 p.m. OK Python 2 TESTS 36 498 19763200 1700
55457465 foreverdiv3 C June 11, 2019, 2:37 p.m. OK Python 2 TESTS 36 530 12595200 1700
55465416 kogorou C June 11, 2019, 4:18 p.m. OK Python 2 TESTS 36 607 14643200 1700
55572335 jrobsonjr C June 14, 2019, 7:45 p.m. OK Python 2 TESTS 37 670 16588800 1700
55462082 Nielius C June 11, 2019, 3:04 p.m. OK Python 3 TESTS 36 436 9625600 1700
55456496 KAin0 C June 11, 2019, 2:31 p.m. OK Python 3 TESTS 36 530 7987200 1700
55463987 joe_joe C June 11, 2019, 3:57 p.m. OK Python 3 TESTS 36 530 8396800 1700
55568992 Chizhonkova C June 14, 2019, 5:22 p.m. OK Python 3 TESTS 37 560 6246400 1700
55989365 petushny C June 24, 2019, 6:40 a.m. OK Python 3 TESTS 37 561 6451200 1700
55471876 mathdude42 C June 11, 2019, 7:20 p.m. OK Python 3 TESTS 36 561 7372800 1700
55460663 Wodewarrior C June 11, 2019, 2:57 p.m. OK Python 3 TESTS 36 561 8192000 1700
55460048 Skwardlow C June 11, 2019, 2:54 p.m. OK Python 3 TESTS 36 576 6451200 1700
55465199 Soul_Catcher C June 11, 2019, 4:14 p.m. OK Python 3 TESTS 36 577 6144000 1700
55517669 lucad C June 13, 2019, 6:29 a.m. OK Python 3 TESTS 37 577 6348800 1700
55522265 andreyrmg C June 13, 2019, 9:10 a.m. OK Rust TESTS 37 483 6144000 1700
55494632 cympfh C June 12, 2019, 11:54 a.m. OK Rust TESTS 36 561 8499200 1700
55457613 Dx18 C June 11, 2019, 2:38 p.m. OK Rust TESTS 36 592 11468800 1700
55454554 arzk C June 11, 2019, 2:18 p.m. OK Rust TESTS 36 592 15769600 1700
55454687 yakamoto C June 11, 2019, 2:19 p.m. OK Scala TESTS 36 826 13107200 1700

remove filters

Back to search problems