Educational Codeforces Round 6

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
620 Educational Codeforces Round 6 FINISHED False 7200 278434799 Jan. 21, 2016, 3 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6836 ) C Pearls in a Row PROGRAMMING greedy 1500

B'There are n pearls in a row. Let 's enumerate them with integers from 1 to n from the left to the right. The pearl number i has the type ai. Let 's call a sequence of consecutive pearls a segment. Let 's call a segment good if it contains two pearls of the same type. Split the row of the pearls to the maximal number of good segments. Note that each pearl should appear in exactly one segment of the partition. As input/output can reach huge size it is recommended to use fast input/output methods: for example, prefer to use scanf/printf instead of cin/cout in C++, prefer to use BufferedReader/PrintWriter instead of Scanner/System.out in Java. The first line contains integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x893 xc2 xb7105) -- the number of pearls in a row. The second line contains n integers ai (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) xe2 x80 x93 the type of the i-th pearl. On the first line print integer k -- the maximal number of segments in a partition of the row. Each of the next k lines should contain two integers lj, xe2 x80 x89rj (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89lj xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89rj xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n) -- the number of the leftmost and the rightmost pearls in the j-th segment. Note you should print the correct partition of the row of the pearls, so each pearl should be in exactly one segment and all segments should contain two pearls of the same type. If there are several optimal solutions print any of them. You can print the segments in any order. If there are no correct partitions of the row print the number "-1".'...

Tutorials

Editorial of Educational Codeforces Round 6

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
15511033 kno0 C Jan. 23, 2016, 8:37 a.m. OK D TESTS 51 233 22323200 1500
15511094 kno0 C Jan. 23, 2016, 8:41 a.m. OK D TESTS 51 249 22323200 1500
15588979 favstovol C Jan. 26, 2016, 8:07 a.m. OK Delphi TESTS 51 1434 5120000 1500
15555332 irevt C Jan. 24, 2016, 12:38 p.m. OK FPC TESTS 51 280 40038400 1500
15750492 glscale C Feb. 2, 2016, 1:06 p.m. OK FPC TESTS 51 280 53452800 1500
15853427 ez_zkj C Feb. 7, 2016, 7:05 a.m. OK FPC TESTS 51 295 6348800 1500
15477203 111116 C Jan. 21, 2016, 3:49 p.m. OK FPC TESTS 51 295 76288000 1500
15474998 zhaoxinyi C Jan. 21, 2016, 3:28 p.m. OK FPC TESTS 51 296 5120000 1500
15926784 DMHung C Feb. 10, 2016, 9:31 a.m. OK FPC TESTS 51 296 6348800 1500
15479293 DenXman111 C Jan. 21, 2016, 4:14 p.m. OK FPC TESTS 51 296 20172800 1500
15475711 lmhoang C Jan. 21, 2016, 3:34 p.m. OK FPC TESTS 51 311 5120000 1500
15501280 k2nt C Jan. 22, 2016, 4:14 p.m. OK FPC TESTS 51 311 7270400 1500
15475898 Diamond_D_Capricornus C Jan. 21, 2016, 3:36 p.m. OK FPC TESTS 51 312 9011200 1500
20367509 rainboy C Sept. 3, 2016, 5:40 p.m. OK GNU C TESTS 51 140 7168000 1500
15649208 doviethoa C Jan. 29, 2016, 4:32 p.m. OK GNU C TESTS 51 155 6041600 1500
16767939 double301 C March 17, 2016, 4:40 p.m. OK GNU C TESTS 51 171 8396800 1500
17520970 neo11235 C April 26, 2016, 12:03 p.m. OK GNU C TESTS 51 187 20070400 1500
34897300 preliminary C Feb. 3, 2018, 3:06 p.m. OK GNU C TESTS 51 202 13004800 1500
21307665 jackwjk C Oct. 9, 2016, 1:36 a.m. OK GNU C++ TESTS 51 78 10547200 1500
15671120 zhan8855 C Jan. 30, 2016, 3:10 a.m. OK GNU C++ TESTS 51 78 63897600 1500
28281135 vjudge1 C July 4, 2017, 1:06 p.m. OK GNU C++ TESTS 51 109 11673600 1500
15671046 zhan8855 C Jan. 30, 2016, 3:01 a.m. OK GNU C++ TESTS 51 109 63897600 1500
16756353 IHaveBeenBlueFor3Years C March 17, 2016, 1:19 a.m. OK GNU C++ TESTS 51 124 6041600 1500
15495072 SpoonsAN C Jan. 22, 2016, 8:43 a.m. OK GNU C++ TESTS 51 124 6144000 1500
15474161 uestc-zgl C Jan. 21, 2016, 3:22 p.m. OK GNU C++ TESTS 51 124 6246400 1500
15545554 qwb C Jan. 24, 2016, 2:41 a.m. OK GNU C++ TESTS 51 124 6758400 1500
15476297 jiaqiyang C Jan. 21, 2016, 3:39 p.m. OK GNU C++ TESTS 51 124 6758400 1500
16482662 vjudge3 C March 3, 2016, 12:49 p.m. OK GNU C++ TESTS 51 124 7065600 1500
15686522 mehrunesartem C Jan. 30, 2016, 10:32 p.m. OK GNU C++11 TESTS 51 62 7475200 1500
15513872 iSlava C Jan. 23, 2016, 12:21 p.m. OK GNU C++11 TESTS 51 62 7475200 1500
15686518 mehrunesartem C Jan. 30, 2016, 10:32 p.m. OK GNU C++11 TESTS 51 77 7475200 1500
15487331 iSlava C Jan. 21, 2016, 10:58 p.m. OK GNU C++11 TESTS 51 77 7680000 1500
15513891 iSlava C Jan. 23, 2016, 12:23 p.m. OK GNU C++11 TESTS 51 78 7372800 1500
40985297 ReaLNero1 C July 30, 2018, 7:52 p.m. OK GNU C++11 TESTS 51 78 7475200 1500
15686508 mehrunesartem C Jan. 30, 2016, 10:31 p.m. OK GNU C++11 TESTS 51 78 128819200 1500
15480458 lkdmhy C Jan. 21, 2016, 4:29 p.m. OK GNU C++11 TESTS 51 78 128819200 1500
58797051 juruoHBr C Aug. 14, 2019, 5:39 a.m. OK GNU C++11 TESTS 51 92 6041600 1500
15473511 19891101 C Jan. 21, 2016, 3:18 p.m. OK GNU C++11 TESTS 51 93 5427200 1500
68462917 iyaad C Jan. 9, 2020, 6:50 p.m. OK GNU C++14 TESTS 51 140 7270400 1500
55802918 tusg25 C June 19, 2019, 8:01 p.m. OK GNU C++14 TESTS 51 155 6758400 1500
41616387 kzvd4729 C Aug. 15, 2018, 9:25 a.m. OK GNU C++14 TESTS 51 155 7987200 1500
41616315 kzvd4729 C Aug. 15, 2018, 9:22 a.m. OK GNU C++14 TESTS 51 155 12083200 1500
41616291 kzvd4729 C Aug. 15, 2018, 9:21 a.m. OK GNU C++14 TESTS 51 155 12083200 1500
49683327 kal013 C Feb. 10, 2019, 5:04 a.m. OK GNU C++14 TESTS 51 155 14848000 1500
33519797 Ziben C Dec. 22, 2017, 8:05 p.m. OK GNU C++14 TESTS 51 171 11673600 1500
65661620 Anaa_Muza C Nov. 24, 2019, 12:37 p.m. OK GNU C++14 TESTS 51 171 11878400 1500
34106936 Vlad1k C Jan. 12, 2018, 1:09 p.m. OK GNU C++14 TESTS 51 171 12902400 1500
27846049 mds_333 C June 17, 2017, 12:46 p.m. OK GNU C++14 TESTS 51 171 13414400 1500
44758679 MintChocoLove C Oct. 24, 2018, 5:26 a.m. OK GNU C++17 TESTS 51 140 8908800 1500
43413128 kempusss C Sept. 25, 2018, 2:17 p.m. OK GNU C++17 TESTS 51 140 12083200 1500
45193582 xymtxdy C Nov. 2, 2018, 5:11 a.m. OK GNU C++17 TESTS 51 155 5017600 1500
68462736 iyaad C Jan. 9, 2020, 6:46 p.m. OK GNU C++17 TESTS 51 155 7270400 1500
52055239 cyansea C March 30, 2019, 7:50 p.m. OK GNU C++17 TESTS 51 155 7987200 1500
43413405 kempusss C Sept. 25, 2018, 2:24 p.m. OK GNU C++17 TESTS 51 155 7987200 1500
43413320 kempusss C Sept. 25, 2018, 2:21 p.m. OK GNU C++17 TESTS 51 155 7987200 1500
48469720 pustaczek C Jan. 16, 2019, 7:21 p.m. OK GNU C++17 TESTS 51 155 8294400 1500
58569657 bhatnagar.mradul C Aug. 11, 2019, 9:31 a.m. OK GNU C++17 TESTS 51 155 10444800 1500
48470071 LightFelicis C Jan. 16, 2019, 7:35 p.m. OK GNU C++17 TESTS 51 155 10752000 1500
47801294 AndreBtt C Dec. 31, 2018, 11:22 p.m. OK Go TESTS 51 108 14233600 1500
15778364 winogradoff C Feb. 3, 2016, 10:27 p.m. OK Go TESTS 51 202 38707200 1500
15601619 mishagam C Jan. 26, 2016, 9:02 p.m. OK Go TESTS 51 514 40140800 1500
15588309 weedjy C Jan. 26, 2016, 7:22 a.m. OK Go TESTS 51 561 29593600 1500
15476993 mipt.vi002 C Jan. 21, 2016, 3:47 p.m. OK Haskell TESTS 51 530 53760000 1500
19903074 pavel.rosputko C Aug. 16, 2016, 8:27 a.m. OK Haskell TESTS 51 1045 97484800 1500
57321664 morozovvp C July 19, 2019, 10:19 a.m. OK Haskell TESTS 51 1184 74752000 1500
65580889 ankyy_0103 C Nov. 23, 2019, 10:59 a.m. OK Java 11 TESTS 51 358 21811200 1500
64166368 davisrollman C Nov. 3, 2019, 4:26 p.m. OK Java 11 TESTS 51 1372 36454400 1500
15474135 anandpatel9998 C Jan. 21, 2016, 3:22 p.m. OK Java 7 TESTS 51 202 17305600 1500
15483382 CandidateNewbie C Jan. 21, 2016, 5:22 p.m. OK Java 7 TESTS 51 217 17408000 1500
15476001 HMK C Jan. 21, 2016, 3:37 p.m. OK Java 7 TESTS 51 218 14438400 1500
16045144 DukeOfYork C Feb. 16, 2016, 4:17 a.m. OK Java 7 TESTS 51 234 14131200 1500
15479138 akdent C Jan. 21, 2016, 4:12 p.m. OK Java 7 TESTS 51 234 16281600 1500
15567332 siddv C Jan. 25, 2016, 5:39 a.m. OK Java 7 TESTS 51 280 14131200 1500
15496525 AL_DEEB C Jan. 22, 2016, 10:31 a.m. OK Java 7 TESTS 51 280 17203200 1500
15549728 mIchanic C Jan. 24, 2016, 7:44 a.m. OK Java 7 TESTS 51 280 18739200 1500
15481536 SEFI2 C Jan. 21, 2016, 4:44 p.m. OK Java 7 TESTS 51 295 13721600 1500
15480837 tawsif93 C Jan. 21, 2016, 4:34 p.m. OK Java 7 TESTS 51 311 18944000 1500
15484938 uwi C Jan. 21, 2016, 6:41 p.m. OK Java 8 TESTS 51 171 10137600 1500
15497462 holeguma C Jan. 22, 2016, 11:49 a.m. OK Java 8 TESTS 51 217 10137600 1500
15475438 TranCongDuy C Jan. 21, 2016, 3:32 p.m. OK Java 8 TESTS 51 218 40038400 1500
15475675 rahulkhairwar C Jan. 21, 2016, 3:34 p.m. OK Java 8 TESTS 51 233 11059200 1500
15475528 rahulkhairwar C Jan. 21, 2016, 3:33 p.m. OK Java 8 TESTS 51 233 11059200 1500
54578184 abdomisan C May 25, 2019, 2:03 a.m. OK Java 8 TESTS 51 233 11366400 1500
15671082 Ratulf C Jan. 30, 2016, 3:05 a.m. OK Java 8 TESTS 51 233 13721600 1500
15510574 Guliash C Jan. 23, 2016, 8:10 a.m. OK Java 8 TESTS 51 233 16384000 1500
15485093 baobab C Jan. 21, 2016, 6:51 p.m. OK Java 8 TESTS 51 234 13926400 1500
55298354 vaibhavpulastya C June 8, 2019, 10:52 a.m. OK Java 8 TESTS 51 248 17817600 1500
15611589 iskander.samerkhanov C Jan. 27, 2016, 12:45 p.m. OK JavaScript TESTS 51 639 44134400 1500
15610566 iskander.samerkhanov C Jan. 27, 2016, 11:39 a.m. OK JavaScript TESTS 51 670 44134400 1500
16134938 luxstellarum C Feb. 18, 2016, 2:08 a.m. OK JavaScript TESTS 51 748 49459200 1500
15610652 iskander.samerkhanov C Jan. 27, 2016, 11:43 a.m. OK JavaScript TESTS 51 779 44134400 1500
16134946 vjudge5 C Feb. 18, 2016, 2:09 a.m. OK JavaScript TESTS 51 888 49459200 1500
42441608 Slamur C Sept. 3, 2018, 9:11 p.m. OK Kotlin TESTS 51 483 30924800 1500
16485149 zerenopus C March 3, 2016, 3:39 p.m. OK Mono C# TESTS 51 311 46080000 1500
33364785 chopik C Dec. 17, 2017, 10:38 p.m. OK Mono C# TESTS 51 483 57344000 1500
42448797 QuantumKnight C Sept. 4, 2018, 6:21 a.m. OK Mono C# TESTS 51 545 43827200 1500
15483242 olderor C Jan. 21, 2016, 5:17 p.m. OK Mono C# TESTS 51 1606 37683200 1500
15474797 og.kostya C Jan. 21, 2016, 3:27 p.m. OK MS C# TESTS 51 139 14336000 1500
15475642 Beresta C Jan. 21, 2016, 3:34 p.m. OK MS C# TESTS 51 155 26112000 1500
15474905 toraoh C Jan. 21, 2016, 3:28 p.m. OK MS C# TESTS 51 233 42086400 1500
15496493 toraoh C Jan. 22, 2016, 10:28 a.m. OK MS C# TESTS 51 249 42700800 1500
17711242 azukun C May 4, 2016, 5:11 p.m. OK MS C# TESTS 51 249 54784000 1500
15481172 renadeen C Jan. 21, 2016, 4:39 p.m. OK MS C# TESTS 51 280 45260800 1500
15496423 toraoh C Jan. 22, 2016, 10:22 a.m. OK MS C# TESTS 51 311 43724800 1500
15779354 bati06 C Feb. 4, 2016, 12:36 a.m. OK MS C# TESTS 51 498 43724800 1500
15558312 k_egor C Jan. 24, 2016, 3:10 p.m. OK MS C# TESTS 51 514 43110400 1500
15495753 duren C Jan. 22, 2016, 9:31 a.m. OK MS C# TESTS 51 514 54067200 1500
15671311 ZJZNKU C Jan. 30, 2016, 3:30 a.m. OK MS C++ TESTS 51 124 7270400 1500
16708134 scorpiowf C March 14, 2016, 5:24 a.m. OK MS C++ TESTS 51 124 9523200 1500
16058090 qoo2p5 C Feb. 16, 2016, 3:14 p.m. OK MS C++ TESTS 51 140 25292800 1500
15496188 aeremin C Jan. 22, 2016, 10:03 a.m. OK MS C++ TESTS 51 140 26419200 1500
15508894 Wizmann C Jan. 23, 2016, 6:28 a.m. OK MS C++ TESTS 51 155 27750400 1500
15482941 FishKOH C Jan. 21, 2016, 5:07 p.m. OK MS C++ TESTS 51 156 8089600 1500
15483587 Momentum C Jan. 21, 2016, 5:30 p.m. OK MS C++ TESTS 51 171 9625600 1500
15476544 rustan64 C Jan. 21, 2016, 3:42 p.m. OK MS C++ TESTS 51 171 10854400 1500
15490370 zhuyutian C Jan. 22, 2016, 4:24 a.m. OK MS C++ TESTS 51 171 13312000 1500
49104901 vjudge1 C Jan. 28, 2019, 12:45 p.m. OK MS C++ TESTS 51 186 10854400 1500
15476109 Darooha C Jan. 21, 2016, 3:38 p.m. OK Ocaml TESTS 51 202 12288000 1500
15476442 alexey.shchepin C Jan. 21, 2016, 3:41 p.m. OK Ocaml TESTS 51 233 13107200 1500
15476531 zimpha C Jan. 21, 2016, 3:42 p.m. OK Ocaml TESTS 51 312 13209600 1500
15506052 hakanhardenberger C Jan. 23, 2016, 2:01 a.m. OK Ocaml TESTS 51 545 25600000 1500
15570609 __xiaoju__ C Jan. 25, 2016, 9:41 a.m. OK PHP TESTS 51 639 59187200 1500
15503384 mayakin C Jan. 22, 2016, 6:59 p.m. OK PHP TESTS 51 701 61337600 1500
15483764 mayakin C Jan. 21, 2016, 5:36 p.m. OK PHP TESTS 51 717 61337600 1500
16214803 Eeyore C Feb. 19, 2016, 7:18 p.m. OK PyPy 2 TESTS 51 202 31027200 1500
15492447 poikniok C Jan. 22, 2016, 7:02 a.m. OK PyPy 2 TESTS 51 249 37171200 1500
15479610 yougaindra C Jan. 21, 2016, 4:18 p.m. OK PyPy 2 TESTS 51 1029 29081600 1500
15491654 xiaoshua C Jan. 22, 2016, 6:08 a.m. OK PyPy 2 TESTS 51 1122 28672000 1500
19457107 Yash_ C July 28, 2016, 8:13 a.m. OK PyPy 2 TESTS 51 1824 28569600 1500
15560015 duongtnhat C Jan. 24, 2016, 5:04 p.m. OK PyPy 2 TESTS 51 1840 27443200 1500
15476816 kliner C Jan. 21, 2016, 3:45 p.m. OK PyPy 2 TESTS 51 1840 28160000 1500
15619688 nealzane C Jan. 27, 2016, 9:26 p.m. OK PyPy 2 TESTS 51 1840 30105600 1500
22167330 DAVID-Z C Nov. 11, 2016, 5:51 p.m. OK PyPy 2 TESTS 51 1871 26828800 1500
35896120 ______u______ C March 3, 2018, 5:02 p.m. OK PyPy 2 TESTS 51 1918 47923200 1500
46894559 HeyLaCC C Dec. 11, 2018, 8:26 a.m. OK PyPy 3 TESTS 51 576 41574400 1500
50505399 adshin21 C Feb. 25, 2019, 7:24 p.m. OK PyPy 3 TESTS 51 592 43724800 1500
65615256 Dandan1212 C Nov. 24, 2019, 3:04 a.m. OK PyPy 3 TESTS 51 623 32665600 1500
27951651 madn C June 21, 2017, 7:14 p.m. OK PyPy 3 TESTS 51 655 55500800 1500
55978190 scambret C June 23, 2019, 6:52 p.m. OK PyPy 3 TESTS 51 670 29798400 1500
63667449 lowoncode C Oct. 28, 2019, 3:49 p.m. OK PyPy 3 TESTS 51 670 30003200 1500
15497402 Amores C Jan. 22, 2016, 11:43 a.m. OK PyPy 3 TESTS 51 733 25395200 1500
29637540 BuckanovNikita C Aug. 21, 2017, 7:24 a.m. OK PyPy 3 TESTS 51 733 26726400 1500
16025493 cugel C Feb. 14, 2016, 11:58 p.m. OK PyPy 3 TESTS 51 748 32051200 1500
15488704 _rabbit C Jan. 22, 2016, 1:07 a.m. OK PyPy 3 TESTS 51 748 32051200 1500
15763261 dennytwix C Feb. 3, 2016, 6:41 a.m. OK Python 2 TESTS 51 451 21606400 1500
15492449 poikniok C Jan. 22, 2016, 7:03 a.m. OK Python 2 TESTS 51 451 38912000 1500
15693665 Hepic_Antony_Skarlatos C Jan. 31, 2016, 12:02 p.m. OK Python 2 TESTS 51 467 23449600 1500
15822278 rohansumant C Feb. 5, 2016, 9:33 a.m. OK Python 2 TESTS 51 482 16588800 1500
16320971 wateret C Feb. 25, 2016, 6:12 a.m. OK Python 2 TESTS 51 483 16384000 1500
15490840 vigneshjayavel C Jan. 22, 2016, 5:08 a.m. OK Python 2 TESTS 51 483 18636800 1500
15513295 neko01 C Jan. 23, 2016, 11:39 a.m. OK Python 2 TESTS 51 483 18739200 1500
15498134 intspt C Jan. 22, 2016, 12:39 p.m. OK Python 2 TESTS 51 483 18739200 1500
15485832 absolutezero C Jan. 21, 2016, 7:58 p.m. OK Python 2 TESTS 51 483 18739200 1500
15804477 quangminhhlrv C Feb. 4, 2016, 6:08 p.m. OK Python 2 TESTS 51 498 18739200 1500
18163837 orailly C May 31, 2016, 5:03 a.m. OK Python 3 TESTS 51 389 27238400 1500
15950699 MarcoXerox C Feb. 11, 2016, 5:34 a.m. OK Python 3 TESTS 51 405 29798400 1500
15731271 Aurinn C Feb. 1, 2016, 12:58 p.m. OK Python 3 TESTS 51 421 31744000 1500
15590383 Code.coding C Jan. 26, 2016, 9:46 a.m. OK Python 3 TESTS 51 467 32563200 1500
15559589 maos C Jan. 24, 2016, 4:31 p.m. OK Python 3 TESTS 51 514 32563200 1500
27951676 madn C June 21, 2017, 7:16 p.m. OK Python 3 TESTS 51 780 28774400 1500
55855144 DarshanPatel C June 21, 2019, 6:36 a.m. OK Python 3 TESTS 51 795 25702400 1500
55824172 tushartyagi8750 C June 20, 2019, 10:01 a.m. OK Python 3 TESTS 51 873 23142400 1500
56460947 Annvv C July 3, 2019, 6:47 a.m. OK Python 3 TESTS 51 889 23142400 1500
47009995 yashwanthr111 C Dec. 14, 2018, 3:56 p.m. OK Python 3 TESTS 51 889 23449600 1500
15849981 s90412tests C Feb. 6, 2016, 9:30 p.m. OK Ruby TESTS 51 717 69120000 1500
15496648 rise3812 C Jan. 22, 2016, 10:42 a.m. OK Ruby TESTS 51 998 76492800 1500
15768246 reldan C Feb. 3, 2016, 12:30 p.m. OK Scala TESTS 51 889 49459200 1500
15765176 fido C Feb. 3, 2016, 9:20 a.m. OK Scala TESTS 51 1169 12902400 1500

remove filters

Back to search problems