Educational Codeforces Round 24

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
818 Educational Codeforces Round 24 FINISHED False 8100 238776924 June 29, 2017, 3:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3548 ) D Multicolored Cars PROGRAMMING data structures implementation 1700

B"Alice and Bob got very bored during a long car trip so they decided to play a game. From the window they can see cars of different colors running past them. Cars are going one after another. The game rules are like this. Firstly Alice chooses some color A, then Bob chooses some color B (A xe2 x80 x89 xe2 x89 xa0 xe2 x80 x89B). After each car they update the number of cars of their chosen color that have run past them. Let's define this numbers after i-th car cntA(i) and cntB(i). Bob knows all the colors of cars that they will encounter and order of their appearance. Alice have already chosen her color A and Bob now wants to choose such color B that he will win the game (draw is not a win). Help him find this color. If there are multiple solutions, print any of them. If there is no such color then print -1. The first line contains two integer numbers n and A (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105, xe2 x80 x891 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89A xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89106) xe2 x80 x93 number of cars and the color chosen by Alice. The second line contains n integer numbers c1, xe2 x80 x89c2, xe2 x80 x89..., xe2 x80 x89cn (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ci xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89106) -- colors of the cars that Alice and Bob will encounter in the order of their appearance. Output such color B (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89B xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89106) that if Bob chooses it then he will win the game. If there are multiple solutions, print any of them. If there is no such color then print -1. It is guaranteed that if there exists any solution then there exists solution with (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89B xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89106). Let's consider availability of colors in the first example: In the third example every color is acceptable except for 10. "...

Tutorials

52991

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
44408428 ACMWGR D Oct. 16, 2018, 3:46 p.m. OK Clang++17 Diagnostics TESTS 95 452 4505600 1700
28155077 nanae1914 D June 29, 2017, 5:37 p.m. OK D TESTS 95 46 14540800 1700
28165122 fluffyowl D June 30, 2017, 6:17 a.m. OK D TESTS 95 701 137216000 1700
28188951 ruban D July 1, 2017, 9:52 a.m. OK Delphi TESTS 95 46 86732800 1700
28729982 hieutony15935 D July 20, 2017, 4:53 p.m. OK FPC TESTS 95 31 5632000 1700
28195327 hieutony159357 D July 1, 2017, 4:41 p.m. OK FPC TESTS 95 31 5632000 1700
28195119 hieutony159357 D July 1, 2017, 4:28 p.m. OK FPC TESTS 95 31 5632000 1700
28194262 slavik228 D July 1, 2017, 3:30 p.m. OK FPC TESTS 95 31 9625600 1700
28167243 Grom9941 D June 30, 2017, 8:14 a.m. OK FPC TESTS 95 31 9625600 1700
28170783 tin2016_ndhanh D June 30, 2017, 11:43 a.m. OK FPC TESTS 95 46 5632000 1700
28146292 VladProg D June 29, 2017, 3:43 p.m. OK FPC TESTS 95 46 5632000 1700
29181648 KagamiharaNadeshiko D Aug. 4, 2017, 2:52 a.m. OK FPC TESTS 95 46 7680000 1700
28362908 1.o4 D July 8, 2017, 7:11 a.m. OK FPC TESTS 95 46 10649600 1700
28170378 long240808 D June 30, 2017, 11:19 a.m. OK FPC TESTS 95 46 18636800 1700
29449604 KinKong1 D Aug. 14, 2017, 6:12 a.m. OK GNU C TESTS 95 31 5939200 1700
28204820 fsociety00 D July 2, 2017, 6:53 a.m. OK GNU C TESTS 95 31 5939200 1700
28167855 sarkysaurabh D June 30, 2017, 8:45 a.m. OK GNU C TESTS 95 31 5939200 1700
28151254 MajAK D June 29, 2017, 4:36 p.m. OK GNU C TESTS 95 31 6246400 1700
28289628 mananb31 D July 4, 2017, 9:06 p.m. OK GNU C TESTS 95 46 5939200 1700
28151001 rainboy D June 29, 2017, 4:33 p.m. OK GNU C TESTS 95 46 6348800 1700
28286188 abhishekans21 D July 4, 2017, 5:23 p.m. OK GNU C TESTS 95 46 9932800 1700
28192394 q843705423 D July 1, 2017, 1:22 p.m. OK GNU C TESTS 95 46 13926400 1700
28162205 sahuang D June 30, 2017, 2:49 a.m. OK GNU C TESTS 95 46 14336000 1700
28549807 Robbinb1993 D July 14, 2017, 1:43 p.m. OK GNU C++ TESTS 95 15 6144000 1700
40980694 ReaLNero1 D July 30, 2018, 5:39 p.m. OK GNU C++ TESTS 95 31 3993600 1700
29705534 Wishawk D Aug. 23, 2017, 11:23 a.m. OK GNU C++ TESTS 95 31 5427200 1700
28893242 NEU_ACM D July 26, 2017, 3:56 a.m. OK GNU C++ TESTS 95 31 5939200 1700
28189134 adyrek D July 1, 2017, 10:03 a.m. OK GNU C++ TESTS 95 31 5939200 1700
28171154 gutkrutz D June 30, 2017, 12:04 p.m. OK GNU C++ TESTS 95 31 5939200 1700
28171085 gutkrutz D June 30, 2017, 12:01 p.m. OK GNU C++ TESTS 95 31 5939200 1700
28170776 gutkrutz D June 30, 2017, 11:43 a.m. OK GNU C++ TESTS 95 31 5939200 1700
28169590 teitoku D June 30, 2017, 10:27 a.m. OK GNU C++ TESTS 95 31 5939200 1700
35811051 vjudge1 D March 1, 2018, 12:22 p.m. OK GNU C++ TESTS 95 31 6041600 1700
54382373 vjudge3 D May 19, 2019, 11:33 a.m. OK GNU C11 TESTS 95 46 3993600 1700
28160323 Hamsterw D June 30, 2017, 12:36 a.m. OK GNU C++11 TESTS 95 30 13926400 1700
63721056 Kylin_ D Oct. 29, 2019, 11:23 a.m. OK GNU C++11 TESTS 95 31 3788800 1700
30130253 vjudge5 D Sept. 6, 2017, 11:43 a.m. OK GNU C++11 TESTS 95 31 3993600 1700
28155636 ernestfan D June 29, 2017, 6 p.m. OK GNU C++11 TESTS 95 31 5939200 1700
35918800 maggch D March 4, 2018, 11:59 a.m. OK GNU C++11 TESTS 95 31 6041600 1700
28897570 NEU_ACM D July 26, 2017, 7:46 a.m. OK GNU C++11 TESTS 95 31 6144000 1700
28329993 MetB D July 6, 2017, 3:03 p.m. OK GNU C++11 TESTS 95 31 6144000 1700
28323165 Aliser D July 6, 2017, 10:03 a.m. OK GNU C++11 TESTS 95 31 6144000 1700
28204839 HaabyHings D July 2, 2017, 6:54 a.m. OK GNU C++11 TESTS 95 31 6144000 1700
29044749 Ph0en1x D July 31, 2017, 10:04 a.m. OK GNU C++11 TESTS 95 31 6144000 1700
30756028 ffern D Sept. 26, 2017, 3:58 p.m. OK GNU C++14 TESTS 95 31 5017600 1700
28206111 CaNDidaTE_FaSTer D July 2, 2017, 8:13 a.m. OK GNU C++14 TESTS 95 31 5939200 1700
28205898 avi224 D July 2, 2017, 8:01 a.m. OK GNU C++14 TESTS 95 31 5939200 1700
29037416 _FSMM D July 31, 2017, 6:02 a.m. OK GNU C++14 TESTS 95 31 5939200 1700
28175656 albeXL D June 30, 2017, 3:11 p.m. OK GNU C++14 TESTS 95 31 5939200 1700
28191099 TearinFree D July 1, 2017, 12:03 p.m. OK GNU C++14 TESTS 95 31 5939200 1700
28146146 natsugiri D June 29, 2017, 3:42 p.m. OK GNU C++14 TESTS 95 31 6348800 1700
28280812 lgs D July 4, 2017, 12:52 p.m. OK GNU C++14 TESTS 95 31 6963200 1700
28897949 ELDAN D July 26, 2017, 8:01 a.m. OK GNU C++14 TESTS 95 31 6963200 1700
28173727 Jester D June 30, 2017, 1:56 p.m. OK GNU C++14 TESTS 95 31 6963200 1700
65208070 yuhta D Nov. 16, 2019, 4:36 p.m. OK GNU C++17 TESTS 95 46 3993600 1700
61052094 vjudge4 D Sept. 22, 2019, 6:51 a.m. OK GNU C++17 TESTS 95 46 3993600 1700
60847596 vjudge1 D Sept. 19, 2019, 1:02 p.m. OK GNU C++17 TESTS 95 46 3993600 1700
57918357 sdibt3 D July 29, 2019, 2:59 a.m. OK GNU C++17 TESTS 95 46 3993600 1700
55061171 AK. D June 3, 2019, 10:52 p.m. OK GNU C++17 TESTS 95 46 3993600 1700
47007639 Photon_ D Dec. 14, 2018, 2:45 p.m. OK GNU C++17 TESTS 95 46 3993600 1700
42765287 zser D Sept. 11, 2018, 12:55 p.m. OK GNU C++17 TESTS 95 46 3993600 1700
39018188 vjudge1 D June 7, 2018, 11:47 a.m. OK GNU C++17 TESTS 95 46 3993600 1700
67966636 Dishoom88 D Dec. 30, 2019, 1:34 p.m. OK GNU C++17 TESTS 95 46 3993600 1700
60204188 airad D Sept. 7, 2019, 7:25 a.m. OK GNU C++17 TESTS 95 46 4096000 1700
28331877 sl0th D July 6, 2017, 4:28 p.m. OK Haskell TESTS 95 46 61849600 1700
29335841 codeonwort D Aug. 10, 2017, 5:55 p.m. OK Haskell TESTS 95 561 141721600 1700
29335799 codeonwort D Aug. 10, 2017, 5:54 p.m. OK Haskell TESTS 95 701 165888000 1700
69301812 ankyy_0103 D Jan. 22, 2020, 2:02 p.m. OK Java 11 TESTS 95 265 8089600 1700
68366072 its_aks_ulure D Jan. 7, 2020, 4:01 p.m. OK Java 11 TESTS 95 327 19046400 1700
28190314 Psp_98 D July 1, 2017, 11:16 a.m. OK Java 8 TESTS 95 109 20275200 1700
28254558 hitesh.bothra D July 3, 2017, 12:03 p.m. OK Java 8 TESTS 95 124 20582400 1700
28157770 saitama_rox D June 29, 2017, 8:16 p.m. OK Java 8 TESTS 95 139 20582400 1700
40769781 ViciousCoder D July 26, 2018, 8:03 a.m. OK Java 8 TESTS 95 140 6963200 1700
40769729 CyberTruck D July 26, 2018, 8:01 a.m. OK Java 8 TESTS 95 140 6963200 1700
28170216 Adit_Shah D June 30, 2017, 11:11 a.m. OK Java 8 TESTS 95 140 20275200 1700
28420734 PrakharJain D July 11, 2017, 5:48 a.m. OK Java 8 TESTS 95 140 20582400 1700
28420538 PrakharJain D July 11, 2017, 5:35 a.m. OK Java 8 TESTS 95 140 20582400 1700
28184857 Alexxx D July 1, 2017, 5:59 a.m. OK Java 8 TESTS 95 140 20582400 1700
28164338 da_201612051 D June 30, 2017, 5:30 a.m. OK Java 8 TESTS 95 140 20582400 1700
45395159 Cotheq D Nov. 7, 2018, 3:29 a.m. OK Kotlin TESTS 95 280 3686400 1700
28177198 Voudy D June 30, 2017, 4:46 p.m. OK Kotlin TESTS 95 280 28467200 1700
29130605 vovak D Aug. 2, 2017, 12:56 p.m. OK Kotlin TESTS 95 389 42496000 1700
28257464 mukhkh D July 3, 2017, 1:58 p.m. OK Mono C# TESTS 95 62 22732800 1700
28168922 CrafterKolyan D June 30, 2017, 9:42 a.m. OK Mono C# TESTS 95 77 24064000 1700
28148839 leign D June 29, 2017, 4:09 p.m. OK Mono C# TESTS 95 93 23654400 1700
28384551 ME_AJUUUUUDAAA D July 9, 2017, 9:34 a.m. OK Mono C# TESTS 95 217 51302400 1700
28145490 og.kostya D June 29, 2017, 3:36 p.m. OK MS C# TESTS 95 62 18534400 1700
28259585 tym32167 D July 3, 2017, 3:32 p.m. OK MS C# TESTS 95 77 26828800 1700
28237177 ShowStopper728 D July 2, 2017, 8:53 p.m. OK MS C# TESTS 95 93 26112000 1700
28261091 IleksaNott D July 3, 2017, 5 p.m. OK MS C# TESTS 95 155 88985600 1700
28261054 IleksaNott D July 3, 2017, 4:59 p.m. OK MS C# TESTS 95 155 89702400 1700
28149322 AnatolyTolstobrov D June 29, 2017, 4:14 p.m. OK MS C# TESTS 95 233 47718400 1700
28152121 __fjm D June 29, 2017, 4:48 p.m. OK MS C++ TESTS 95 31 7065600 1700
32606161 JKSamir D Nov. 23, 2017, 10:23 p.m. OK MS C++ TESTS 95 31 7475200 1700
29546385 16310120309 D Aug. 18, 2017, 8:29 a.m. OK MS C++ TESTS 95 31 16179200 1700
35844935 huahua D March 2, 2018, 3:42 p.m. OK MS C++ TESTS 95 31 86220800 1700
54378273 vjudge5 D May 19, 2019, 9:43 a.m. OK MS C++ TESTS 95 46 3993600 1700
28149902 jiangjiashi D June 29, 2017, 4:20 p.m. OK MS C++ TESTS 95 46 7065600 1700
59072640 vjudge4 D Aug. 19, 2019, 5:37 a.m. OK MS C++ TESTS 95 46 7987200 1700
59088613 vjudge1 D Aug. 19, 2019, 11:58 a.m. OK MS C++ TESTS 95 46 7987200 1700
28152823 Mithridat D June 29, 2017, 4:57 p.m. OK MS C++ TESTS 95 46 10137600 1700
60434878 vjudge4 D Sept. 12, 2019, 10:30 a.m. OK MS C++ TESTS 95 46 16076800 1700
28979052 mayakin D July 29, 2017, 10:21 p.m. OK PHP TESTS 95 218 30720000 1700
28157633 thuglife69 D June 29, 2017, 8:04 p.m. OK PyPy 2 TESTS 95 124 34201600 1700
28153921 sid_m97 D June 29, 2017, 5:12 p.m. OK PyPy 2 TESTS 95 124 35225600 1700
28147753 Cypi D June 29, 2017, 3:58 p.m. OK PyPy 2 TESTS 95 139 32051200 1700
45139094 Onesh0t D Oct. 31, 2018, 1:41 p.m. OK PyPy 2 TESTS 95 171 11673600 1700
40072389 aeternalis1 D July 8, 2018, 12:38 a.m. OK PyPy 2 TESTS 95 311 36249600 1700
32499829 yugle7 D Nov. 20, 2017, 12:51 p.m. OK PyPy 3 TESTS 95 202 10752000 1700
66561741 lowoncode D Dec. 9, 2019, 7:15 p.m. OK PyPy 3 TESTS 95 248 27852800 1700
57959908 BryanValeriano D July 29, 2019, 9:17 p.m. OK PyPy 3 TESTS 95 249 14028800 1700
28153341 DragonCoderZ D June 29, 2017, 5:04 p.m. OK PyPy 3 TESTS 95 249 33382400 1700
32500082 yugle7 D Nov. 20, 2017, 12:59 p.m. OK PyPy 3 TESTS 95 265 10649600 1700
28279010 Naoki_M D July 4, 2017, 11:38 a.m. OK PyPy 3 TESTS 95 311 47001600 1700
28180978 Blencer D June 30, 2017, 10:37 p.m. OK PyPy 3 TESTS 95 404 89804800 1700
29845802 ishepard D Aug. 28, 2017, 12:57 p.m. OK Python 2 TESTS 95 187 11059200 1700
28153984 akshesh D June 29, 2017, 5:13 p.m. OK Python 2 TESTS 95 202 11776000 1700
31154165 WNG D Oct. 8, 2017, 8:33 p.m. OK Python 2 TESTS 95 217 9318400 1700
47437578 wartortle D Dec. 23, 2018, 8:13 p.m. OK Python 2 TESTS 95 249 13721600 1700
28151384 Wizmann D June 29, 2017, 4:38 p.m. OK Python 2 TESTS 95 265 28979200 1700
28210125 batman98 D July 2, 2017, 12:26 p.m. OK Python 2 TESTS 95 311 31641600 1700
56479856 vjudge4 D July 3, 2019, 3:30 p.m. OK Python 2 TESTS 95 327 9625600 1700
56228472 rainerh D June 28, 2019, 1:28 p.m. OK Python 2 TESTS 95 343 12595200 1700
56228505 vjudge4 D June 28, 2019, 1:28 p.m. OK Python 2 TESTS 95 358 12595200 1700
56549369 vjudge5 D July 5, 2019, 9:01 a.m. OK Python 2 TESTS 95 654 52428800 1700
34564524 tima.akhkyamov.02 D Jan. 26, 2018, 4:45 a.m. OK Python 3 TESTS 95 155 14540800 1700
34541734 Kartofan180 D Jan. 25, 2018, 9:30 a.m. OK Python 3 TESTS 95 155 14540800 1700
34536412 TalyonLoce D Jan. 25, 2018, 5:38 a.m. OK Python 3 TESTS 95 155 14643200 1700
34569001 kairat.baiboriev D Jan. 26, 2018, 8:03 a.m. OK Python 3 TESTS 95 156 14643200 1700
28193888 pylol D July 1, 2017, 3:04 p.m. OK Python 3 TESTS 95 156 16486400 1700
34541579 bogdan2003 D Jan. 25, 2018, 9:24 a.m. OK Python 3 TESTS 95 171 14540800 1700
34624820 quolean D Jan. 28, 2018, 6:10 a.m. OK Python 3 TESTS 95 171 14745600 1700
54257521 vjudge5 D May 16, 2019, 9:13 p.m. OK Python 3 TESTS 95 187 9011200 1700
34536793 Barnoul D Jan. 25, 2018, 6:01 a.m. OK Python 3 TESTS 95 187 15155200 1700
38132510 seyfullahuysal D May 12, 2018, 8:24 a.m. OK Python 3 TESTS 95 187 16281600 1700

remove filters

Back to search problems