Educational Codeforces Round 87 (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
1354 Educational Codeforces Round 87 (Rated for Div. 2) FINISHED False 7200 142115999 May 17, 2020, 9:20 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 31255 ) B Ternary String PROGRAMMING binary search dp implementation two pointers 1200

B'You are given a string s such that each its character is either 1, 2, or 3. You have to choose the shortest contiguous substring of s such that it contains each of these three characters at least once. A contiguous substring of string s is a string that can be obtained from s by removing some (possibly zero) characters from the beginning of s and some (possibly zero) characters from the end of s . The first line contains one integer t ( 1 <= t <= 20000 ) -- the number of test cases. Each test case consists of one line containing the string s ( 1 <= |s| <= 200000 ). It is guaranteed that each character of s is either 1, 2, or 3. The sum of lengths of all strings in all test cases does not exceed 200000 . For each test case, print one integer -- the length of the shortest contiguous substring of s containing all three types of characters at least once. If there is no such substring, print 0 instead. Consider the example test: In the first test case, the substring 123 can be used. In the second test case, the substring 213 can be used. In the third test case, the substring 1223 can be used. In the fourth test case, the substring 3221 can be used. In the fifth test case, there is no character 3 in s . In the sixth test case, there is no character 1 in s . In the seventh test case, the substring 3112 can be used. '...

Tutorials

77593

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
81399830 looper222 B May 25, 2020, 3:56 p.m. OK Clang++17 Diagnostics TESTS 46 280 14745600 1200
81693901 Raeee B May 28, 2020, 10:10 a.m. OK Clang++17 Diagnostics TESTS 46 467 14848000 1200
80884145 noob_acmp B May 21, 2020, 7:35 p.m. OK Delphi TESTS 46 202 716800 1200
80649886 eugalt B May 19, 2020, 2:51 a.m. OK GNU C11 TESTS 46 30 204800 1200
80730608 eugalt B May 19, 2020, 11:33 p.m. OK GNU C11 TESTS 46 31 204800 1200
80731503 eugalt B May 20, 2020, 12:17 a.m. OK GNU C11 TESTS 46 31 204800 1200
80639362 eugalt B May 18, 2020, 8:47 p.m. OK GNU C11 TESTS 46 31 204800 1200
80650627 eugalt B May 19, 2020, 3:11 a.m. OK GNU C11 TESTS 46 31 204800 1200
80730584 eugalt B May 19, 2020, 11:31 p.m. OK GNU C11 TESTS 46 31 204800 1200
80650061 eugalt B May 19, 2020, 2:56 a.m. OK GNU C11 TESTS 46 31 512000 1200
80537014 Beku.sh B May 17, 2020, 4:10 p.m. OK GNU C11 TESTS 46 78 3891200 1200
80907729 SUNNY24 B May 22, 2020, 6:34 a.m. OK GNU C11 TESTS 46 93 204800 1200
81384416 hrishabh_200 B May 25, 2020, 12:53 p.m. OK GNU C11 TESTS 46 93 204800 1200
80662070 trueBatty B May 19, 2020, 6:51 a.m. OK GNU C++11 TESTS 46 30 2867200 1200
80593529 zhengqy2005 B May 18, 2020, 10:49 a.m. OK GNU C++11 TESTS 46 30 3891200 1200
80650664 xiazixi B May 19, 2020, 3:11 a.m. OK GNU C++11 TESTS 46 31 0 1200
80986864 Vexalwig_Goodwcoffin B May 23, 2020, 5:51 a.m. OK GNU C++11 TESTS 46 31 0 1200
81590935 num73 B May 27, 2020, 7:05 a.m. OK GNU C++11 TESTS 46 31 204800 1200
81459745 Forever_Pursuit B May 26, 2020, 10:23 a.m. OK GNU C++11 TESTS 46 31 204800 1200
81442760 Forever_Pursuit B May 26, 2020, 6:34 a.m. OK GNU C++11 TESTS 46 31 204800 1200
81373878 luogu_bot4 B May 25, 2020, 10:48 a.m. OK GNU C++11 TESTS 46 31 204800 1200
81606652 mhdx_ B May 27, 2020, 10:23 a.m. OK GNU C++11 TESTS 46 31 204800 1200
81601289 WULI B May 27, 2020, 9:12 a.m. OK GNU C++11 TESTS 46 31 204800 1200
80985868 WJMDBMR B May 23, 2020, 5:34 a.m. OK GNU C++14 TESTS 46 31 204800 1200
81580020 Podomong B May 27, 2020, 4:31 a.m. OK GNU C++14 TESTS 46 31 204800 1200
80695306 slow_sort B May 19, 2020, 2:04 p.m. OK GNU C++14 TESTS 46 31 204800 1200
80723233 worst_case_handle B May 19, 2020, 7:48 p.m. OK GNU C++14 TESTS 46 31 204800 1200
80847623 Minju B May 21, 2020, 11:40 a.m. OK GNU C++14 TESTS 46 31 204800 1200
81006865 tokitsukaze B May 23, 2020, 10:50 a.m. OK GNU C++14 TESTS 46 31 307200 1200
80933117 742949301 B May 22, 2020, 12:23 p.m. OK GNU C++14 TESTS 46 31 409600 1200
81585116 vjudge3 B May 27, 2020, 5:53 a.m. OK GNU C++14 TESTS 46 31 409600 1200
80735915 TSwiftie B May 20, 2020, 2:45 a.m. OK GNU C++14 TESTS 46 31 409600 1200
81697012 harishm B May 28, 2020, 10:51 a.m. OK GNU C++14 TESTS 46 31 512000 1200
80948208 liyunfan1223 B May 22, 2020, 3:33 p.m. OK GNU C++17 TESTS 46 31 204800 1200
81669262 Louhc B May 28, 2020, 4:35 a.m. OK GNU C++17 TESTS 46 31 204800 1200
81190796 Mamba0Z B May 24, 2020, 12:34 p.m. OK GNU C++17 TESTS 46 31 204800 1200
81150661 wangmx B May 24, 2020, 8:48 a.m. OK GNU C++17 TESTS 46 31 204800 1200
80989342 cym_ B May 23, 2020, 6:29 a.m. OK GNU C++17 TESTS 46 31 204800 1200
80939162 hunni10 B May 22, 2020, 1:55 p.m. OK GNU C++17 TESTS 46 31 204800 1200
80939065 dongbin1999 B May 22, 2020, 1:54 p.m. OK GNU C++17 TESTS 46 31 204800 1200
80812016 idcoder B May 21, 2020, 12:22 a.m. OK GNU C++17 TESTS 46 31 204800 1200
80758003 LeonFeng B May 20, 2020, 9:23 a.m. OK GNU C++17 TESTS 46 31 204800 1200
80753294 Molewus B May 20, 2020, 8:16 a.m. OK GNU C++17 TESTS 46 31 204800 1200
80535953 Kotoblepass B May 17, 2020, 3:56 p.m. OK GNU C++17 (64) TESTS 46 30 4812800 1200
80848236 vjudge5 B May 21, 2020, 11:47 a.m. OK GNU C++17 (64) TESTS 46 31 512000 1200
80869249 _Stefan_ B May 21, 2020, 3:56 p.m. OK GNU C++17 (64) TESTS 46 31 512000 1200
81051475 smax B May 23, 2020, 10:48 p.m. OK GNU C++17 (64) TESTS 46 31 512000 1200
81057309 tyler B May 24, 2020, 3:14 a.m. OK GNU C++17 (64) TESTS 46 31 512000 1200
81352237 AQZZ B May 25, 2020, 6:09 a.m. OK GNU C++17 (64) TESTS 46 31 512000 1200
81419185 AQZZ B May 25, 2020, 8:07 p.m. OK GNU C++17 (64) TESTS 46 31 512000 1200
81695532 coderanant B May 28, 2020, 10:32 a.m. OK GNU C++17 (64) TESTS 46 31 512000 1200
81701399 Ormlis B May 28, 2020, 11:49 a.m. OK GNU C++17 (64) TESTS 46 31 512000 1200
80842331 idontknoww B May 21, 2020, 10:30 a.m. OK GNU C++17 (64) TESTS 46 31 512000 1200
80539269 sonlh07 B May 17, 2020, 4:40 p.m. OK Go TESTS 46 46 10854400 1200
80521470 dblokhin B May 17, 2020, 12:55 p.m. OK Go TESTS 46 108 17100800 1200
80589680 jojo1094 B May 18, 2020, 10 a.m. OK Go TESTS 46 779 10854400 1200
80732665 vasanthaganesh B May 20, 2020, 12:58 a.m. OK Haskell TESTS 46 62 3174400 1200
80674766 B_w_c B May 19, 2020, 9:51 a.m. OK Haskell TESTS 46 77 4300800 1200
80674597 B_w_c B May 19, 2020, 9:49 a.m. OK Haskell TESTS 46 77 4300800 1200
80521972 anuragshirolkar B May 17, 2020, 1:03 p.m. OK Haskell TESTS 46 77 29593600 1200
80627646 Laurens B May 18, 2020, 5:35 p.m. OK Haskell TESTS 46 78 4300800 1200
80662058 mr___hacker____ B May 19, 2020, 6:51 a.m. OK Java 11 TESTS 46 186 0 1200
81403292 namandeept_00 B May 25, 2020, 4:41 p.m. OK Java 11 TESTS 46 187 0 1200
81056121 wabadabakalakaboo B May 24, 2020, 2:32 a.m. OK Java 11 TESTS 46 187 0 1200
80810811 Anonymous B May 20, 2020, 11:21 p.m. OK Java 11 TESTS 46 187 0 1200
80728303 dauom B May 19, 2020, 9:51 p.m. OK Java 11 TESTS 46 187 0 1200
80695457 sf14t B May 19, 2020, 2:05 p.m. OK Java 11 TESTS 46 187 0 1200
80567370 AshrafEzz B May 18, 2020, 4:07 a.m. OK Java 11 TESTS 46 187 23859200 1200
80539632 Clowyy B May 17, 2020, 4:45 p.m. OK Java 11 TESTS 46 187 23859200 1200
81665024 yuruiyin B May 28, 2020, 2:54 a.m. OK Java 11 TESTS 46 202 0 1200
81139712 anhtaihsgs B May 24, 2020, 7:13 a.m. OK Java 11 TESTS 46 202 0 1200
81011460 Kishore_nani B May 23, 2020, 11:50 a.m. OK Java 8 TESTS 46 109 0 1200
81701898 Manan8686 B May 28, 2020, 11:55 a.m. OK Java 8 TESTS 46 109 0 1200
80942734 neeraj96 B May 22, 2020, 2:33 p.m. OK Java 8 TESTS 46 109 0 1200
81222355 stevenz B May 24, 2020, 1:51 p.m. OK Java 8 TESTS 46 124 0 1200
80889463 jxin31415 B May 21, 2020, 9:37 p.m. OK Java 8 TESTS 46 124 0 1200
80793849 aym_05 B May 20, 2020, 5:09 p.m. OK Java 8 TESTS 46 124 0 1200
80720590 sunnycarlos B May 19, 2020, 7:03 p.m. OK Java 8 TESTS 46 124 0 1200
80698692 akram-adel B May 19, 2020, 2:38 p.m. OK Java 8 TESTS 46 124 0 1200
80688419 shivang_1234 B May 19, 2020, 12:47 p.m. OK Java 8 TESTS 46 124 0 1200
80932610 7dan B May 22, 2020, 12:16 p.m. OK Java 8 TESTS 46 124 0 1200
80662088 Spheniscine B May 19, 2020, 6:52 a.m. OK Kotlin TESTS 46 124 0 1200
80655834 Spheniscine B May 19, 2020, 5:14 a.m. OK Kotlin TESTS 46 124 0 1200
80645163 Spheniscine B May 19, 2020, 12:06 a.m. OK Kotlin TESTS 46 124 0 1200
80628561 Spheniscine B May 18, 2020, 5:48 p.m. OK Kotlin TESTS 46 124 0 1200
80628360 Spheniscine B May 18, 2020, 5:45 p.m. OK Kotlin TESTS 46 124 0 1200
80627806 Spheniscine B May 18, 2020, 5:37 p.m. OK Kotlin TESTS 46 124 0 1200
80534569 songsinger B May 17, 2020, 3:38 p.m. OK Kotlin TESTS 46 139 20684800 1200
81174233 cristian1997 B May 24, 2020, 12:16 p.m. OK Kotlin TESTS 46 280 0 1200
80978243 tasnimislam1999 B May 23, 2020, 2:18 a.m. OK Kotlin TESTS 46 280 614400 1200
80571624 Tlatoani B May 18, 2020, 5:40 a.m. OK Kotlin TESTS 46 280 22323200 1200
80725160 dfsamix B May 19, 2020, 8:27 p.m. OK Mono C# TESTS 46 155 1433600 1200
80514176 peterc B May 17, 2020, 11:32 a.m. OK Mono C# TESTS 46 171 10649600 1200
80675421 TRR B May 19, 2020, 10 a.m. OK Mono C# TESTS 46 186 1228800 1200
80724783 dfsamix B May 19, 2020, 8:19 p.m. OK Mono C# TESTS 46 186 1536000 1200
80866431 amit1509kumar B May 21, 2020, 3:23 p.m. OK Mono C# TESTS 46 186 1843200 1200
80711897 krzysiek.slawik B May 19, 2020, 5:08 p.m. OK Mono C# TESTS 46 186 1945600 1200
80639653 amineach51 B May 18, 2020, 8:54 p.m. OK Mono C# TESTS 46 186 2355200 1200
80642412 zahidsheikh B May 18, 2020, 10:14 p.m. OK Mono C# TESTS 46 186 2969600 1200
80642550 zahidsheikh B May 18, 2020, 10:18 p.m. OK Mono C# TESTS 46 187 3072000 1200
81001370 _Trung_Nguyen B May 23, 2020, 9:31 a.m. OK Mono C# TESTS 46 187 8806400 1200
80641973 YTICpoch B May 18, 2020, 9:58 p.m. OK MS C++ TESTS 46 93 2457600 1200
80641360 YTICpoch B May 18, 2020, 9:38 p.m. OK MS C++ TESTS 46 108 2662400 1200
80939337 kim_young_hyun B May 22, 2020, 1:57 p.m. OK MS C++ 2017 TESTS 46 31 2560000 1200
80531658 tarattata1 B May 17, 2020, 3:03 p.m. OK MS C++ 2017 TESTS 46 31 3891200 1200
80599692 Dragoncard B May 18, 2020, 12:05 p.m. OK MS C++ 2017 TESTS 46 31 3891200 1200
80949722 1181316585 B May 22, 2020, 3:53 p.m. OK MS C++ 2017 TESTS 46 46 204800 1200
80939449 vjudge3 B May 22, 2020, 1:58 p.m. OK MS C++ 2017 TESTS 46 46 614400 1200
80834791 TripleJ B May 21, 2020, 8:45 a.m. OK MS C++ 2017 TESTS 46 46 3072000 1200
80612413 Hugh_W B May 18, 2020, 2:40 p.m. OK MS C++ 2017 TESTS 46 77 4300800 1200
81451763 sriganeshr2001 B May 26, 2020, 8:34 a.m. OK MS C++ 2017 TESTS 46 78 921600 1200
81711857 Falca B May 28, 2020, 1:57 p.m. OK MS C++ 2017 TESTS 46 93 614400 1200
80990239 patrick_ubc B May 23, 2020, 6:43 a.m. OK MS C++ 2017 TESTS 46 93 614400 1200
80643497 ALexqanderqwe B May 18, 2020, 10:54 p.m. OK Node.js TESTS 46 343 5632000 1200
80648568 devil9614 B May 19, 2020, 2:13 a.m. OK PyPy 2 TESTS 46 217 3788800 1200
80613318 kit.shiron B May 18, 2020, 2:50 p.m. OK PyPy 2 TESTS 46 217 26009600 1200
81382283 yumtam B May 25, 2020, 12:27 p.m. OK PyPy 2 TESTS 46 436 9011200 1200
80722479 Piokemon B May 19, 2020, 7:34 p.m. OK PyPy 2 TESTS 46 452 7782400 1200
80565945 beethoven97 B May 18, 2020, 3:33 a.m. OK PyPy 2 TESTS 46 483 28774400 1200
80859175 ComptineDunAutreEte B May 21, 2020, 2:01 p.m. OK PyPy 2 TESTS 46 716 8396800 1200
81688041 nikeshthapa255 B May 28, 2020, 8:57 a.m. OK PyPy 3 TESTS 46 202 4300800 1200
80533778 jscn B May 17, 2020, 3:28 p.m. OK PyPy 3 TESTS 46 217 28467200 1200
80984942 amruth_kumar B May 23, 2020, 5:16 a.m. OK PyPy 3 TESTS 46 233 6963200 1200
80800778 jayantjain100 B May 20, 2020, 6:52 p.m. OK PyPy 3 TESTS 46 233 9830400 1200
80531881 runnie B May 17, 2020, 3:05 p.m. OK PyPy 3 TESTS 46 233 43622400 1200
80566649 metaxylene_13 B May 18, 2020, 3:50 a.m. OK PyPy 3 TESTS 46 233 43827200 1200
80978271 576215697 B May 23, 2020, 2:19 a.m. OK PyPy 3 TESTS 46 249 9113600 1200
80543814 qwertz73355a B May 17, 2020, 5:46 p.m. OK PyPy 3 TESTS 46 249 27340800 1200
80515116 alviner B May 17, 2020, 11:39 a.m. OK PyPy 3 TESTS 46 249 28467200 1200
80517999 faking_legend B May 17, 2020, 12:08 p.m. OK PyPy 3 TESTS 46 249 37478400 1200
80859058 ComptineDunAutreEte B May 21, 2020, 2 p.m. OK Python 2 TESTS 46 421 3686400 1200
80659894 eugalt B May 19, 2020, 6:19 a.m. OK Python 3 TESTS 46 280 11468800 1200
80659376 eugalt B May 19, 2020, 6:12 a.m. OK Python 3 TESTS 46 296 10956800 1200
80740223 eugalt B May 20, 2020, 4:36 a.m. OK Python 3 TESTS 46 311 3584000 1200
80606762 Newt04 B May 18, 2020, 1:33 p.m. OK Python 3 TESTS 46 311 7782400 1200
80742264 eugalt B May 20, 2020, 5:23 a.m. OK Python 3 TESTS 46 312 3686400 1200
80516049 CaHutar B May 17, 2020, 11:48 a.m. OK Python 3 TESTS 46 312 7475200 1200
80827525 Saikiran007 B May 21, 2020, 7 a.m. OK Python 3 TESTS 46 327 1024000 1200
80838653 lucifer085 B May 21, 2020, 9:38 a.m. OK Python 3 TESTS 46 327 1126400 1200
80603880 Optimismy B May 18, 2020, 12:58 p.m. OK Python 3 TESTS 46 327 7782400 1200
80532437 MSCMonster B May 17, 2020, 3:12 p.m. OK Python 3 TESTS 46 327 7884800 1200
80611708 cotton100pc B May 18, 2020, 2:32 p.m. OK Rust TESTS 46 31 4812800 1200
81054756 kobae964 B May 24, 2020, 1:36 a.m. OK Rust TESTS 46 46 3686400 1200
80884937 altaway B May 21, 2020, 7:50 p.m. OK Rust TESTS 46 249 819200 1200

remove filters

Back to search problems