Educational Codeforces Round 76 (Rated for 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
1257 Educational Codeforces Round 76 (Rated for Div. 2) FINISHED False 7200 158167499 Nov. 13, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 16062 ) C Dominated Subarray PROGRAMMING greedy implementation sortings strings two pointers 1200

B"Let's call an array t dominated by value v in the next situation. At first, array t should have at least 2 elements. Now, let's calculate number of occurrences of each number num in t and define it as occ(num) . Then t is dominated (by v ) if (and only if) occ(v) > occ(v') for any other number v' . For example, arrays [1, 2, 3, 4, 5, 2] , [11, 11] and [3, 2, 3, 2, 3] are dominated (by 2 , 11 and 3 respectevitely) but arrays [3] , [1, 2] and [3, 3, 2, 2, 1] are not. Small remark: since any array can be dominated only by one number, we can not specify this number and just say that array is either dominated or not. You are given array a_1, a_2, ... , a_n . Calculate its shortest dominated subarray or say that there are no such subarrays. The subarray of a is a contiguous part of the array a , i. xe2 x80 x89e. the array a_i, a_{i + 1}, ... , a_j for some 1 <= i <= j <= n . The first line contains single integer T ( 1 <= T <= 1000 ) -- the number of test cases. Each test case consists of two lines. The first line contains single integer n ( 1 <= n <= 2 cdot 10^5 ) -- the length of the array a . The second line contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= n ) -- the corresponding values of the array a . It's guaranteed that the total length of all arrays in one test doesn't exceed 2 cdot 10^5 . Print T integers -- one per test case. For each test case print the only integer -- the length of the shortest dominated subarray, or -1 if there are no such subarrays. In the first test case, there are no subarrays of length at least 2 , so the answer is -1 . In the second test case, the whole array is dominated (by 1 ) and it's the only dominated subarray. In the third test case, the subarray a_4, a_5, a_6 is the shortest dominate"...

Tutorials

Educational Codeforces Round 76 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
65150974 AR_Nasim C Nov. 16, 2019, 7:28 a.m. OK Clang++17 Diagnostics TESTS 17 842 1638400 1200
65501432 Juniorandrade C Nov. 21, 2019, 7:08 p.m. OK D TESTS 17 77 512000 1200
65501558 Juniorandrade C Nov. 21, 2019, 7:13 p.m. OK D TESTS 17 78 0 1200
65501468 Juniorandrade C Nov. 21, 2019, 7:10 p.m. OK D TESTS 17 124 22323200 1200
65122177 vjudge5 C Nov. 16, 2019, 2:22 a.m. OK FPC TESTS 17 62 819200 1200
65294962 simoncatcity C Nov. 18, 2019, 11:07 a.m. OK FPC TESTS 17 452 1024000 1200
65107101 kaiboy C Nov. 15, 2019, 7:50 p.m. OK GNU C11 TESTS 17 46 819200 1200
65107369 kaiboy C Nov. 15, 2019, 7:58 p.m. OK GNU C11 TESTS 17 46 819200 1200
65753922 Euphonium C Nov. 26, 2019, 2:11 p.m. OK GNU C11 TESTS 17 46 819200 1200
65131961 NaClOverload C Nov. 16, 2019, 3:58 a.m. OK GNU C11 TESTS 17 46 1024000 1200
67584510 romarioputra C Dec. 25, 2019, 7:42 a.m. OK GNU C11 TESTS 17 46 1638400 1200
65670779 Zafirr C Nov. 24, 2019, 3:50 p.m. OK GNU C11 TESTS 17 46 1638400 1200
65338408 tiaguito C Nov. 19, 2019, 9:54 a.m. OK GNU C11 TESTS 17 46 1638400 1200
64902982 jschr C Nov. 14, 2019, 7:54 p.m. OK GNU C11 TESTS 17 46 1638400 1200
64845022 rainboy C Nov. 13, 2019, 5:19 p.m. OK GNU C11 TESTS 17 61 819200 1200
65614984 Fhasfn C Nov. 24, 2019, 2:51 a.m. OK GNU C11 TESTS 17 62 1638400 1200
66217869 jangjie C Dec. 3, 2019, 9:43 a.m. OK GNU C++11 TESTS 17 30 819200 1200
64908117 Dream-chasing_Juvenile C Nov. 15, 2019, 12:27 a.m. OK GNU C++11 TESTS 17 31 819200 1200
64867877 yalizjc C Nov. 14, 2019, 7:02 a.m. OK GNU C++11 TESTS 17 31 819200 1200
64908309 Frame233 C Nov. 15, 2019, 12:41 a.m. OK GNU C++11 TESTS 17 31 819200 1200
65167184 Ultflash C Nov. 16, 2019, 1:46 p.m. OK GNU C++11 TESTS 17 31 819200 1200
65888663 yuzhechuan C Nov. 28, 2019, 1:42 a.m. OK GNU C++11 TESTS 17 31 819200 1200
64883262 fnoigsh C Nov. 14, 2019, 12:18 p.m. OK GNU C++11 TESTS 17 31 1433600 1200
69703627 MasonMount19 C Jan. 29, 2020, 2:57 a.m. OK GNU C++11 TESTS 17 31 1638400 1200
65870194 luogu_bot3 C Nov. 27, 2019, 3:48 p.m. OK GNU C++11 TESTS 17 31 1638400 1200
69731321 luogu_bot3 C Jan. 29, 2020, 1:36 p.m. OK GNU C++11 TESTS 17 31 1638400 1200
64861513 wleung_bvg C Nov. 14, 2019, 3:28 a.m. OK GNU C++14 TESTS 17 30 2560000 1200
65045016 BeNoble C Nov. 15, 2019, 1:39 p.m. OK GNU C++14 TESTS 17 31 3891200 1200
65330116 201831990439 C Nov. 19, 2019, 5:28 a.m. OK GNU C++14 TESTS 17 46 819200 1200
65275767 Llop C Nov. 18, 2019, 12:48 a.m. OK GNU C++14 TESTS 17 46 819200 1200
65928528 HipHop C Nov. 28, 2019, 7:33 p.m. OK GNU C++14 TESTS 17 46 819200 1200
65483532 Nemo C Nov. 21, 2019, 12:28 p.m. OK GNU C++14 TESTS 17 46 1638400 1200
64907488 albeXL C Nov. 14, 2019, 11:37 p.m. OK GNU C++14 TESTS 17 46 1638400 1200
64989626 _Shravann_ C Nov. 15, 2019, 4:43 a.m. OK GNU C++14 TESTS 17 46 1638400 1200
64909229 dtc03012 C Nov. 15, 2019, 1:40 a.m. OK GNU C++14 TESTS 17 46 1740800 1200
65023548 codearth C Nov. 15, 2019, 6:31 a.m. OK GNU C++14 TESTS 17 46 7987200 1200
65260401 ioyeoa C Nov. 17, 2019, 2:51 p.m. OK GNU C++17 TESTS 17 31 1638400 1200
66269410 .tx C Dec. 4, 2019, 11:45 a.m. OK GNU C++17 TESTS 17 31 1638400 1200
67415424 sicon54 C Dec. 22, 2019, 9:41 a.m. OK GNU C++17 TESTS 17 46 921600 1200
64877140 vjudge5 C Nov. 14, 2019, 10:17 a.m. OK GNU C++17 TESTS 17 46 1536000 1200
65479878 Aphelios C Nov. 21, 2019, 11:20 a.m. OK GNU C++17 TESTS 17 46 1638400 1200
64908979 nickluo C Nov. 15, 2019, 1:22 a.m. OK GNU C++17 TESTS 17 46 5734400 1200
64846339 ismail C Nov. 13, 2019, 5:42 p.m. OK GNU C++17 TESTS 17 46 10547200 1200
65110000 It_Wasnt_Me C Nov. 15, 2019, 9:38 p.m. OK GNU C++17 TESTS 17 61 819200 1200
65240988 1290852513 C Nov. 17, 2019, 8:45 a.m. OK GNU C++17 TESTS 17 61 819200 1200
66142214 juniorcompressor C Dec. 1, 2019, 2:56 p.m. OK GNU C++17 TESTS 17 61 819200 1200
64884194 reanimatorzon C Nov. 14, 2019, 12:35 p.m. OK Go TESTS 17 61 0 1200
66394797 justcode_fk C Dec. 6, 2019, 10:23 a.m. OK Go TESTS 17 62 4505600 1200
65158748 wilcot C Nov. 16, 2019, 10:28 a.m. OK Go TESTS 17 62 4608000 1200
65944101 kat0rik C Nov. 29, 2019, 7:49 a.m. OK Go TESTS 17 78 4608000 1200
65739073 tianhongw C Nov. 26, 2019, 9:17 a.m. OK Go TESTS 17 93 4608000 1200
65454386 fau42 C Nov. 20, 2019, 7:42 p.m. OK Go TESTS 17 93 4608000 1200
65453182 fau42 C Nov. 20, 2019, 7:03 p.m. OK Go TESTS 17 156 4608000 1200
66610131 Laurens C Dec. 10, 2019, 8:55 p.m. OK Haskell TESTS 17 717 33792000 1200
66151561 jespinel C Dec. 1, 2019, 7:15 p.m. OK Haskell TESTS 17 1715 109363200 1200
65463043 lpls1 C Nov. 21, 2019, 3:53 a.m. OK Java 11 TESTS 17 186 0 1200
69292105 cribabby C Jan. 22, 2020, 10:42 a.m. OK Java 11 TESTS 17 187 4403200 1200
64845268 donghae0414 C Nov. 13, 2019, 5:23 p.m. OK Java 11 TESTS 17 202 0 1200
64853857 Anonymous C Nov. 13, 2019, 9:10 p.m. OK Java 11 TESTS 17 218 4812800 1200
65256280 pizzaEater C Nov. 17, 2019, 1:30 p.m. OK Java 11 TESTS 17 249 11059200 1200
64840818 Musin C Nov. 13, 2019, 4:32 p.m. OK Java 11 TESTS 17 264 13516800 1200
64851381 ankyy_0103 C Nov. 13, 2019, 7:47 p.m. OK Java 11 TESTS 17 280 17100800 1200
64846008 tmlu48 C Nov. 13, 2019, 5:35 p.m. OK Java 11 TESTS 17 327 0 1200
66181108 kiberKotleta2009 C Dec. 2, 2019, 12:51 p.m. OK Java 11 TESTS 17 342 25804800 1200
64848076 potatmen C Nov. 13, 2019, 6:21 p.m. OK Java 11 TESTS 17 374 8806400 1200
64860752 bluesky111 C Nov. 14, 2019, 2:58 a.m. OK Java 8 TESTS 17 109 0 1200
69208618 NormalGeek C Jan. 20, 2020, 6:58 p.m. OK Java 8 TESTS 17 124 0 1200
65249225 luchy0120 C Nov. 17, 2019, 11:31 a.m. OK Java 8 TESTS 17 124 0 1200
65134006 derrick20 C Nov. 16, 2019, 5:14 a.m. OK Java 8 TESTS 17 124 0 1200
64903627 Nirav412000 C Nov. 14, 2019, 8:14 p.m. OK Java 8 TESTS 17 124 0 1200
65208269 viktor.krasikov C Nov. 16, 2019, 4:44 p.m. OK Java 8 TESTS 17 139 0 1200
64901428 supriya14 C Nov. 14, 2019, 7:06 p.m. OK Java 8 TESTS 17 139 2048000 1200
64898136 Nutella3000 C Nov. 14, 2019, 5:35 p.m. OK Java 8 TESTS 17 139 2048000 1200
65105148 henryCo C Nov. 15, 2019, 6:57 p.m. OK Java 8 TESTS 17 139 6144000 1200
66616448 Vatsal53 C Dec. 11, 2019, 4:20 a.m. OK Java 8 TESTS 17 140 0 1200
66304746 Killer45 C Dec. 5, 2019, 8:51 a.m. OK Kotlin TESTS 17 140 3174400 1200
64861209 Spheniscine C Nov. 14, 2019, 3:17 a.m. OK Kotlin TESTS 17 155 3686400 1200
64886853 shenqi16 C Nov. 14, 2019, 1:23 p.m. OK Kotlin TESTS 17 217 10547200 1200
64860124 Spheniscine C Nov. 14, 2019, 2:34 a.m. OK Kotlin TESTS 17 264 11468800 1200
64849359 DisPony C Nov. 13, 2019, 6:52 p.m. OK Kotlin TESTS 17 373 18329600 1200
65402523 Black_Fregat C Nov. 20, 2019, midnight OK Kotlin TESTS 17 374 17612800 1200
64845787 Differum C Nov. 13, 2019, 5:32 p.m. OK Kotlin TESTS 17 421 17408000 1200
68887081 david_varela C Jan. 15, 2020, 10:28 p.m. OK Kotlin TESTS 17 436 17203200 1200
65193466 gaoadt C Nov. 16, 2019, 3:38 p.m. OK Kotlin TESTS 17 467 17510400 1200
64842959 predator C Nov. 13, 2019, 4:49 p.m. OK Kotlin TESTS 17 639 40755200 1200
65087202 m1_k3 C Nov. 15, 2019, 5:23 p.m. OK Mono C# TESTS 17 108 716800 1200
64839854 vlad927 C Nov. 13, 2019, 4:29 p.m. OK Mono C# TESTS 17 108 27648000 1200
65683504 niganiga C Nov. 24, 2019, 8:52 p.m. OK Mono C# TESTS 17 109 16281600 1200
69620850 ngtkana C Jan. 27, 2020, 2:28 p.m. OK Mono C# TESTS 17 109 21094400 1200
65604987 HiX C Nov. 23, 2019, 8:08 p.m. OK Mono C# TESTS 17 109 27750400 1200
65055468 hyzhangzhy C Nov. 15, 2019, 2:55 p.m. OK Mono C# TESTS 17 124 33382400 1200
65904098 treasuryonly C Nov. 28, 2019, 10:06 a.m. OK Mono C# TESTS 17 140 33382400 1200
64865983 dev8546 C Nov. 14, 2019, 6:13 a.m. OK Mono C# TESTS 17 311 30208000 1200
65386205 vjudge1 C Nov. 19, 2019, 4:26 p.m. OK MS C++ TESTS 17 46 819200 1200
65282040 vjudge2 C Nov. 18, 2019, 6:22 a.m. OK MS C++ TESTS 17 46 819200 1200
65825444 vjudge3 C Nov. 27, 2019, 12:21 p.m. OK MS C++ TESTS 17 46 819200 1200
69281266 vjudge4 C Jan. 22, 2020, 6:03 a.m. OK MS C++ TESTS 17 46 1638400 1200
69223350 vjudge3 C Jan. 21, 2020, 5:58 a.m. OK MS C++ TESTS 17 46 1638400 1200
65562411 vjudge3 C Nov. 23, 2019, 3:51 a.m. OK MS C++ TESTS 17 46 1638400 1200
65155196 vjudge5 C Nov. 16, 2019, 9:02 a.m. OK MS C++ TESTS 17 46 1638400 1200
65154853 vjudge3 C Nov. 16, 2019, 8:55 a.m. OK MS C++ TESTS 17 46 1638400 1200
65152172 vjudge1 C Nov. 16, 2019, 7:58 a.m. OK MS C++ TESTS 17 46 1638400 1200
65035653 xmgzt C Nov. 15, 2019, 11:32 a.m. OK MS C++ TESTS 17 46 1638400 1200
65422481 vjudge2 C Nov. 20, 2019, 9:27 a.m. OK MS C++ 2017 TESTS 17 62 1638400 1200
65227882 vjudge3 C Nov. 17, 2019, 3:03 a.m. OK MS C++ 2017 TESTS 17 77 819200 1200
65527478 pmitkov C Nov. 22, 2019, 11 a.m. OK MS C++ 2017 TESTS 17 77 1638400 1200
65334817 rendy_ad89 C Nov. 19, 2019, 8:26 a.m. OK MS C++ 2017 TESTS 17 77 1638400 1200
65154029 vjudge4 C Nov. 16, 2019, 8:37 a.m. OK MS C++ 2017 TESTS 17 78 1638400 1200
65122244 5130 C Nov. 16, 2019, 2:25 a.m. OK MS C++ 2017 TESTS 17 78 1638400 1200
69391452 vjudge2 C Jan. 23, 2020, 3:57 a.m. OK MS C++ 2017 TESTS 17 78 16076800 1200
64846351 AleksanderBalobanov C Nov. 13, 2019, 5:43 p.m. OK MS C++ 2017 TESTS 17 92 2457600 1200
69670869 vjudge4 C Jan. 28, 2020, 12:57 p.m. OK MS C++ 2017 TESTS 17 93 1024000 1200
65022947 hwangganzi C Nov. 15, 2019, 6:14 a.m. OK MS C++ 2017 TESTS 17 93 1638400 1200
65458289 Rara. C Nov. 20, 2019, 10:40 p.m. OK Node.js TESTS 17 374 7475200 1200
65458786 Rara. C Nov. 20, 2019, 11:19 p.m. OK Node.js TESTS 17 389 7577600 1200
65458257 Rara. C Nov. 20, 2019, 10:38 p.m. OK Node.js TESTS 17 389 10956800 1200
65458329 Rara. C Nov. 20, 2019, 10:42 p.m. OK Node.js TESTS 17 405 7884800 1200
64846892 mayakin C Nov. 13, 2019, 5:54 p.m. OK PHP TESTS 17 202 35328000 1200
67775166 khadkeshwarkp C Dec. 28, 2019, 8:39 a.m. OK PyPy 2 TESTS 17 218 10752000 1200
64855130 ayxkaeoanz0l C Nov. 13, 2019, 10:07 p.m. OK PyPy 2 TESTS 17 218 16896000 1200
65895980 Madhur1906 C Nov. 28, 2019, 6:12 a.m. OK PyPy 2 TESTS 17 280 11264000 1200
67676727 aaa_bbb_ccc C Dec. 27, 2019, 2:49 a.m. OK PyPy 2 TESTS 17 280 11571200 1200
64839894 a11b11c11 C Nov. 13, 2019, 4:29 p.m. OK PyPy 2 TESTS 17 280 14233600 1200
66454117 IrOty1oX5uSp4 C Dec. 7, 2019, 12:33 p.m. OK PyPy 3 TESTS 17 217 22732800 1200
64840813 FLOP C Nov. 13, 2019, 4:32 p.m. OK PyPy 3 TESTS 17 233 18636800 1200
66454159 IrOty1oX5uSp4 C Dec. 7, 2019, 12:33 p.m. OK PyPy 3 TESTS 17 233 21196800 1200
66454336 IrOty1oX5uSp4 C Dec. 7, 2019, 12:37 p.m. OK PyPy 3 TESTS 17 233 21913600 1200
66454473 IrOty1oX5uSp4 C Dec. 7, 2019, 12:40 p.m. OK PyPy 3 TESTS 17 234 19251200 1200
65132316 satyamcse C Nov. 16, 2019, 4:12 a.m. OK PyPy 3 TESTS 17 249 21196800 1200
65314891 ss7890 C Nov. 18, 2019, 4:51 p.m. OK PyPy 3 TESTS 17 264 14438400 1200
66809429 tushartyagi8750 C Dec. 14, 2019, 12:55 a.m. OK PyPy 3 TESTS 17 264 14540800 1200
64856565 thekushalghosh C Nov. 13, 2019, 11:36 p.m. OK PyPy 3 TESTS 17 264 19046400 1200
65422954 ansar.karzhaspaev C Nov. 20, 2019, 9:38 a.m. OK PyPy 3 TESTS 17 265 14438400 1200
65333149 biltharesatyendra C Nov. 19, 2019, 7:30 a.m. OK Python 2 TESTS 17 389 12595200 1200
64902000 OzOMBIE C Nov. 14, 2019, 7:25 p.m. OK Python 2 TESTS 17 389 21094400 1200
65804977 neuhq_haha C Nov. 27, 2019, 8:30 a.m. OK Python 2 TESTS 17 467 20582400 1200
64846499 SoSooding C Nov. 13, 2019, 5:46 p.m. OK Python 2 TESTS 17 483 19968000 1200
65222687 alexandrerf C Nov. 16, 2019, 10:09 p.m. OK Python 2 TESTS 17 560 26419200 1200
64875874 GeorgeBu C Nov. 14, 2019, 9:49 a.m. OK Python 3 TESTS 17 202 14643200 1200
64850622 Alastarr C Nov. 13, 2019, 7:26 p.m. OK Python 3 TESTS 17 217 14643200 1200
64901657 LintuStorm C Nov. 14, 2019, 7:14 p.m. OK Python 3 TESTS 17 218 13721600 1200
65603585 vjudge5 C Nov. 23, 2019, 7:19 p.m. OK Python 3 TESTS 17 218 14643200 1200
65222323 azozello C Nov. 16, 2019, 9:49 p.m. OK Python 3 TESTS 17 233 14233600 1200
64884274 ryo_n takeuchi839 C Nov. 14, 2019, 12:37 p.m. OK Python 3 TESTS 17 233 14643200 1200
67071696 cs1g C Dec. 17, 2019, 1 p.m. OK Python 3 TESTS 17 233 15872000 1200
65053934 anushkaaa C Nov. 15, 2019, 2:23 p.m. OK Python 3 TESTS 17 248 14540800 1200
65159346 zhbannikovdima C Nov. 16, 2019, 10:42 a.m. OK Python 3 TESTS 17 248 14643200 1200
65624075 iouat_001 C Nov. 24, 2019, 7:17 a.m. OK Python 3 TESTS 17 249 14233600 1200
64845476 WillToPower C Nov. 13, 2019, 5:26 p.m. OK Rust TESTS 17 46 5836800 1200
69456412 akiradeveloper C Jan. 24, 2020, 8:49 a.m. OK Rust TESTS 17 77 11161600 1200
65619756 ichyo C Nov. 24, 2019, 5:45 a.m. OK Rust TESTS 17 139 11264000 1200
65958462 tiagodepalves C Nov. 29, 2019, 1:45 p.m. OK Rust TESTS 17 608 5222400 1200
65957783 vjudge2 C Nov. 29, 2019, 1:31 p.m. OK Rust TESTS 17 638 5529600 1200
65958140 tiagodepalves C Nov. 29, 2019, 1:38 p.m. OK Rust TESTS 17 655 6348800 1200

remove filters

Back to search problems