Educational Codeforces Round 57 (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
1096 Educational Codeforces Round 57 (Rated for Div. 2) FINISHED False 7200 185815499 Dec. 28, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 10638 ) B Substring Removal PROGRAMMING combinatorics math strings 1400

B'You are given a string s of length n consisting only of lowercase Latin letters. A substring of a string is a contiguous subsequence of that string. So, string "forces" is substring of string "codeforces", but string "coder" is not. Your task is to calculate the number of ways to remove exactly one substring from this string in such a way that all remaining characters are equal (the number of distinct characters either zero or one). It is guaranteed that there is at least two different characters in s . Note that you can remove the whole string and it is correct. Also note that you should remove at least one character. Since the answer can be rather large (not very large though) print it modulo 998244353 . If you are Python programmer, consider using PyPy instead of Python when you submit your code. The first line of the input contains one integer n ( 2 <= n <= 2 cdot 10^5 ) -- the length of the string s . The second line of the input contains the string s of length n consisting only of lowercase Latin letters. It is guaranteed that there is at least two different characters in s . Print one integer -- the number of ways modulo 998244353 to remove exactly one substring from s in such way that all remaining characters are equal. Let s[l; r] be the substring of s from the position l to the position r inclusive. Then in the first example you can remove the following substrings: In the second example you can remove the following substrings: In the third example you can remove the following substrings: '...

Tutorials

Разбор Educational Codeforces Round 57

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
56741284 vjudge1 B July 9, 2019, 7:49 a.m. OK Clang++17 Diagnostics TESTS 50 46 307200 1400
49676983 Mohamad_AboDan B Feb. 9, 2019, 8:28 p.m. OK Clang++17 Diagnostics TESTS 50 62 15155200 1400
47660695 zawr B Dec. 28, 2018, 6:50 p.m. OK Clang++17 Diagnostics TESTS 50 77 15360000 1400
47779931 ragaja_14 B Dec. 31, 2018, 7:22 a.m. OK Clang++17 Diagnostics TESTS 50 77 15360000 1400
48317293 Codess B Jan. 13, 2019, 7:16 a.m. OK Clang++17 Diagnostics TESTS 50 93 15155200 1400
47724131 OneDay_ B Dec. 30, 2018, 1:14 p.m. OK Clang++17 Diagnostics TESTS 50 93 15360000 1400
63420767 sash0 B Oct. 26, 2019, 6:19 a.m. OK D TESTS 50 31 4198400 1400
55678072 xcodevn B June 17, 2019, 11:35 a.m. OK D TESTS 50 31 4198400 1400
49396989 PhuongPeu B Feb. 3, 2019, 12:50 p.m. OK FPC TESTS 50 31 614400 1400
47895740 cristi17 B Jan. 4, 2019, 10:17 a.m. OK FPC TESTS 50 31 1331200 1400
47717957 hoangmaicongdat2001 B Dec. 30, 2018, 9:13 a.m. OK FPC TESTS 50 31 1331200 1400
47644378 AHTOH._. B Dec. 28, 2018, 3:42 p.m. OK FPC TESTS 50 46 204800 1400
58394181 naranja011223 B Aug. 6, 2019, 2:55 p.m. OK FPC TESTS 50 46 1024000 1400
68522600 canhtoanxyz B Jan. 10, 2020, 2:48 p.m. OK FPC TESTS 50 46 1433600 1400
47666357 Karasu B Dec. 29, 2018, 12:50 a.m. OK GNU C11 TESTS 50 30 204800 1400
49396611 sayan1706 B Feb. 3, 2019, 12:39 p.m. OK GNU C11 TESTS 50 31 204800 1400
49396790 sayan1706 B Feb. 3, 2019, 12:44 p.m. OK GNU C11 TESTS 50 31 204800 1400
52764082 kaiboy B April 15, 2019, 12:42 a.m. OK GNU C11 TESTS 50 31 204800 1400
66494695 StillLife B Dec. 8, 2019, 9:59 a.m. OK GNU C11 TESTS 50 31 204800 1400
69532593 ndaidemf B Jan. 25, 2020, 5:39 p.m. OK GNU C11 TESTS 50 31 204800 1400
48096514 hawkins123 B Jan. 8, 2019, 5:11 p.m. OK GNU C11 TESTS 50 31 204800 1400
48461036 rainboy B Jan. 16, 2019, 2:41 p.m. OK GNU C11 TESTS 50 31 204800 1400
48793858 0_K B Jan. 23, 2019, 11:56 a.m. OK GNU C11 TESTS 50 31 204800 1400
49396563 sayan1706 B Feb. 3, 2019, 12:38 p.m. OK GNU C11 TESTS 50 31 204800 1400
47716275 Rwjie B Dec. 30, 2018, 7:57 a.m. OK GNU C++11 TESTS 50 30 0 1400
47718021 2inf B Dec. 30, 2018, 9:15 a.m. OK GNU C++11 TESTS 50 30 0 1400
48020049 orangesTO B Jan. 6, 2019, 4:45 a.m. OK GNU C++11 TESTS 50 30 512000 1400
51487449 461807914 B March 19, 2019, 2:09 p.m. OK GNU C++11 TESTS 50 30 512000 1400
69283194 He_Ren B Jan. 22, 2020, 6:55 a.m. OK GNU C++11 TESTS 50 31 0 1400
66458553 chaxy_2000 B Dec. 7, 2019, 2:01 p.m. OK GNU C++11 TESTS 50 31 0 1400
57713646 vjudge2 B July 25, 2019, 1:37 a.m. OK GNU C++11 TESTS 50 31 0 1400
57713634 fanshhh B July 25, 2019, 1:36 a.m. OK GNU C++11 TESTS 50 31 0 1400
54364934 vjudge4 B May 19, 2019, 1:34 a.m. OK GNU C++11 TESTS 50 31 0 1400
54364918 mcddw111 B May 19, 2019, 1:32 a.m. OK GNU C++11 TESTS 50 31 0 1400
47774904 Acnext B Dec. 31, 2018, 2:45 a.m. OK GNU C++14 TESTS 50 15 204800 1400
60358593 rohitrj B Sept. 10, 2019, 5:14 p.m. OK GNU C++14 TESTS 50 15 204800 1400
51887161 tangbinjie B March 27, 2019, 7:03 a.m. OK GNU C++14 TESTS 50 15 204800 1400
47809869 rjq B Jan. 1, 2019, 10:28 a.m. OK GNU C++14 TESTS 50 15 307200 1400
49302430 shamiaomiao B Feb. 1, 2019, 4 a.m. OK GNU C++14 TESTS 50 15 307200 1400
47718823 khairulislamtanim B Dec. 30, 2018, 9:46 a.m. OK GNU C++14 TESTS 50 15 512000 1400
47857506 icecuber B Jan. 3, 2019, 1:13 a.m. OK GNU C++14 TESTS 50 15 512000 1400
63609723 asceL- B Oct. 27, 2019, 4:40 p.m. OK GNU C++14 TESTS 50 15 512000 1400
47893986 Sayl B Jan. 4, 2019, 8:57 a.m. OK GNU C++14 TESTS 50 15 512000 1400
68466045 _banna_ B Jan. 9, 2020, 8:25 p.m. OK GNU C++14 TESTS 50 15 512000 1400
68691865 vjudge4 B Jan. 13, 2020, 6:29 a.m. OK GNU C++17 TESTS 50 15 512000 1400
57124388 landcold7 B July 16, 2019, 3:20 a.m. OK GNU C++17 TESTS 50 15 512000 1400
55535002 Akasaransh B June 13, 2019, 3:52 p.m. OK GNU C++17 TESTS 50 15 512000 1400
51921624 unknownn B March 28, 2019, 4:59 a.m. OK GNU C++17 TESTS 50 15 512000 1400
47725630 aman36 B Dec. 30, 2018, 2:05 p.m. OK GNU C++17 TESTS 50 15 512000 1400
47693866 TheRN B Dec. 29, 2018, 3:54 p.m. OK GNU C++17 TESTS 50 15 512000 1400
47684806 fgt B Dec. 29, 2018, 2:10 p.m. OK GNU C++17 TESTS 50 15 512000 1400
47677403 Komanda B Dec. 29, 2018, 10:01 a.m. OK GNU C++17 TESTS 50 15 512000 1400
47670254 MoMo B Dec. 29, 2018, 5:16 a.m. OK GNU C++17 TESTS 50 15 512000 1400
47667483 m_c_q B Dec. 29, 2018, 2:27 a.m. OK GNU C++17 TESTS 50 15 512000 1400
47959638 chanbakjsd B Jan. 5, 2019, 8:38 a.m. OK Go TESTS 50 46 0 1400
47646312 GoGoBoy B Dec. 28, 2018, 3:52 p.m. OK Go TESTS 50 592 0 1400
47656060 gksato B Dec. 28, 2018, 4:52 p.m. OK Haskell TESTS 50 31 14745600 1400
47655781 fengsuiyan B Dec. 28, 2018, 4:47 p.m. OK Haskell TESTS 50 46 16998400 1400
58506775 atharvat77 B Aug. 9, 2019, 4:49 p.m. OK Java 8 TESTS 50 109 0 1400
50486641 Negm777 B Feb. 25, 2019, 11:50 a.m. OK Java 8 TESTS 50 109 0 1400
49377958 younesbmz B Feb. 2, 2019, 9:37 p.m. OK Java 8 TESTS 50 109 0 1400
49120794 Atomwolfie B Jan. 28, 2019, 7:11 p.m. OK Java 8 TESTS 50 109 0 1400
48573606 tusharjape007 B Jan. 19, 2019, 1:04 p.m. OK Java 8 TESTS 50 109 0 1400
48431632 manish_98 B Jan. 15, 2019, 5:46 p.m. OK Java 8 TESTS 50 109 0 1400
48420585 StOlEn_KiNg B Jan. 15, 2019, 12:40 p.m. OK Java 8 TESTS 50 109 0 1400
48265853 jayliner66 B Jan. 11, 2019, 8:06 p.m. OK Java 8 TESTS 50 109 0 1400
48164654 henryhuypham B Jan. 9, 2019, 10:51 p.m. OK Java 8 TESTS 50 109 0 1400
47969556 chojh1222 B Jan. 5, 2019, 1:54 p.m. OK Java 8 TESTS 50 109 0 1400
47671969 Killer45 B Dec. 29, 2018, 6:40 a.m. OK Kotlin TESTS 50 124 0 1400
62375020 david_varela B Oct. 11, 2019, 4:58 p.m. OK Kotlin TESTS 50 155 0 1400
47812360 programmer21 B Jan. 1, 2019, 12:13 p.m. OK Kotlin TESTS 50 171 0 1400
47709213 Nathan.Sproul B Dec. 30, 2018, 12:47 a.m. OK Mono C# TESTS 50 61 716800 1400
47866277 IleksaNott B Jan. 3, 2019, 9:55 a.m. OK Mono C# TESTS 50 62 716800 1400
53840661 treasuryonly B May 7, 2019, 7:17 a.m. OK Mono C# TESTS 50 62 716800 1400
50545926 nemars B Feb. 26, 2019, 9:21 p.m. OK Mono C# TESTS 50 62 716800 1400
48902839 Mandrade B Jan. 24, 2019, 6:50 p.m. OK Mono C# TESTS 50 62 716800 1400
48164213 zazak B Jan. 9, 2019, 10:11 p.m. OK Mono C# TESTS 50 62 716800 1400
47643896 T-D-K B Dec. 28, 2018, 3:40 p.m. OK Mono C# TESTS 50 62 716800 1400
55014337 og.kostya B June 3, 2019, 11:37 a.m. OK Mono C# TESTS 50 62 819200 1400
47656175 eki B Dec. 28, 2018, 4:54 p.m. OK Mono C# TESTS 50 77 3481600 1400
47645483 kyosuke0924 B Dec. 28, 2018, 3:48 p.m. OK Mono C# TESTS 50 77 5324800 1400
57274274 vjudge3 B July 18, 2019, 10:10 a.m. OK MS C++ TESTS 50 31 204800 1400
53216084 vjudge2 B April 24, 2019, 8:52 a.m. OK MS C++ TESTS 50 31 204800 1400
52152099 vjudge4 B April 1, 2019, 12:01 p.m. OK MS C++ TESTS 50 31 204800 1400
66102526 vjudge5 B Dec. 1, 2019, 8:34 a.m. OK MS C++ TESTS 50 31 204800 1400
57278698 vjudge4 B July 18, 2019, 11:54 a.m. OK MS C++ TESTS 50 31 204800 1400
57714006 vjudge3 B July 25, 2019, 1:48 a.m. OK MS C++ TESTS 50 31 204800 1400
57714392 vjudge5 B July 25, 2019, 1:59 a.m. OK MS C++ TESTS 50 31 204800 1400
57714752 vjudge4 B July 25, 2019, 2:09 a.m. OK MS C++ TESTS 50 31 204800 1400
66212270 vjudge5 B Dec. 3, 2019, 7:22 a.m. OK MS C++ TESTS 50 31 204800 1400
66100856 vjudge4 B Dec. 1, 2019, 8:22 a.m. OK MS C++ TESTS 50 31 204800 1400
55110427 hwangganzi B June 5, 2019, 5:54 a.m. OK MS C++ 2017 TESTS 50 31 204800 1400
57725152 ___sss B July 25, 2019, 6:54 a.m. OK MS C++ 2017 TESTS 50 31 204800 1400
58362371 ZSTU-2018329621261 B Aug. 6, 2019, 1:38 a.m. OK MS C++ 2017 TESTS 50 31 204800 1400
61412822 Ayvery B Sept. 28, 2019, 9:17 a.m. OK MS C++ 2017 TESTS 50 31 409600 1400
59401481 yorky B Aug. 24, 2019, 12:19 p.m. OK MS C++ 2017 TESTS 50 31 614400 1400
59596984 siwei B Aug. 28, 2019, 2:42 a.m. OK MS C++ 2017 TESTS 50 31 614400 1400
64450494 Mad112233 B Nov. 7, 2019, 6:54 a.m. OK MS C++ 2017 TESTS 50 31 614400 1400
51349105 dslom B March 15, 2019, 8:22 p.m. OK MS C++ 2017 TESTS 50 31 614400 1400
53857092 TanPhat B May 7, 2019, 4:56 p.m. OK MS C++ 2017 TESTS 50 31 614400 1400
57332173 xsc B July 19, 2019, 2:38 p.m. OK MS C++ 2017 TESTS 50 31 614400 1400
47644214 astrologia.magia.gadania B Dec. 28, 2018, 3:41 p.m. OK Node.js TESTS 50 202 4608000 1400
47646782 sk0 B Dec. 28, 2018, 3:54 p.m. OK Ocaml TESTS 50 31 0 1400
47658038 sk0 B Dec. 28, 2018, 5:30 p.m. OK Ocaml TESTS 50 31 2252800 1400
47715358 OpKos B Dec. 30, 2018, 7:15 a.m. OK PascalABC.NET TESTS 50 62 1638400 1400
51659790 mm944 B March 22, 2019, 1:39 a.m. OK PascalABC.NET TESTS 50 327 102400 1400
47662345 mayakin B Dec. 28, 2018, 7:53 p.m. OK PHP TESTS 50 62 0 1400
48052367 Onesh0t B Jan. 7, 2019, 10 a.m. OK PyPy 2 TESTS 50 124 819200 1400
47657430 bertrandovide B Dec. 28, 2018, 5:17 p.m. OK PyPy 2 TESTS 50 124 819200 1400
47652778 alwaysavani B Dec. 28, 2018, 4:26 p.m. OK PyPy 2 TESTS 50 124 4198400 1400
47644374 akifpatel B Dec. 28, 2018, 3:42 p.m. OK PyPy 2 TESTS 50 140 819200 1400
47649138 Binga B Dec. 28, 2018, 4:07 p.m. OK PyPy 2 TESTS 50 140 1126400 1400
48521470 soumyasarkar1998 B Jan. 18, 2019, 6:50 a.m. OK PyPy 2 TESTS 50 140 1228800 1400
54357185 chaudhary_19 B May 18, 2019, 6:14 p.m. OK PyPy 2 TESTS 50 140 1843200 1400
51683209 gaidash B March 22, 2019, 1:32 p.m. OK PyPy 2 TESTS 50 171 4198400 1400
47666255 masonsbro B Dec. 29, 2018, 12:40 a.m. OK PyPy 2 TESTS 50 186 819200 1400
61770774 iamprayush B Oct. 3, 2019, 10:06 a.m. OK PyPy 2 TESTS 50 187 6041600 1400
47841524 polinasam B Jan. 2, 2019, 12:15 p.m. OK PyPy 3 TESTS 50 124 2150400 1400
48503091 Alireza_Keshavarz B Jan. 17, 2019, 4:12 p.m. OK PyPy 3 TESTS 50 139 2457600 1400
47803538 kaname_madoka123 B Jan. 1, 2019, 4:07 a.m. OK PyPy 3 TESTS 50 139 2867200 1400
50816563 div12gau B March 5, 2019, 11:45 a.m. OK PyPy 3 TESTS 50 140 1638400 1400
47657355 woung717 B Dec. 28, 2018, 5:15 p.m. OK PyPy 3 TESTS 50 140 1638400 1400
49657001 ashok123 B Feb. 9, 2019, 10:29 a.m. OK PyPy 3 TESTS 50 140 1945600 1400
55112496 tchr B June 5, 2019, 7:03 a.m. OK PyPy 3 TESTS 50 140 2048000 1400
51029138 Leendertz B March 8, 2019, 1:01 p.m. OK PyPy 3 TESTS 50 140 2048000 1400
49755871 mola.mola B Feb. 11, 2019, 6:21 a.m. OK PyPy 3 TESTS 50 140 2048000 1400
48780743 vjudge2 B Jan. 23, 2019, 6:43 a.m. OK PyPy 3 TESTS 50 140 2048000 1400
53530823 vjudge1 B April 29, 2019, 8:08 p.m. OK Python 2 TESTS 50 171 614400 1400
47716025 Wizmann B Dec. 30, 2018, 7:46 a.m. OK Python 2 TESTS 50 186 409600 1400
47893647 daminglu B Jan. 4, 2019, 8:43 a.m. OK Python 2 TESTS 50 186 512000 1400
47644742 recurze B Dec. 28, 2018, 3:44 p.m. OK Python 2 TESTS 50 186 614400 1400
48365862 scambret B Jan. 13, 2019, 10:01 p.m. OK Python 2 TESTS 50 186 921600 1400
47671132 anshuman16423 B Dec. 29, 2018, 6:03 a.m. OK Python 2 TESTS 50 187 409600 1400
47841840 franckmy B Jan. 2, 2019, 12:27 p.m. OK Python 2 TESTS 50 187 614400 1400
47811628 SoSooding B Jan. 1, 2019, 11:45 a.m. OK Python 2 TESTS 50 187 1536000 1400
47834257 Abdelmalek B Jan. 2, 2019, 9:08 a.m. OK Python 2 TESTS 50 202 614400 1400
47657952 biltharesatyendra B Dec. 28, 2018, 5:28 p.m. OK Python 2 TESTS 50 202 614400 1400
47644835 III_Wolverine_III B Dec. 28, 2018, 3:44 p.m. OK Python 3 TESTS 50 124 512000 1400
53315229 365050244 B April 26, 2019, 9:46 a.m. OK Python 3 TESTS 50 124 716800 1400
51685012 echikawa B March 22, 2019, 2:12 p.m. OK Python 3 TESTS 50 139 512000 1400
47938732 bhavana4842 B Jan. 4, 2019, 5:02 p.m. OK Python 3 TESTS 50 139 512000 1400
47694514 Alliwll B Dec. 29, 2018, 4:17 p.m. OK Python 3 TESTS 50 139 512000 1400
47675202 laljfi B Dec. 29, 2018, 8:42 a.m. OK Python 3 TESTS 50 139 512000 1400
48452539 Andras675 B Jan. 16, 2019, 11:17 a.m. OK Python 3 TESTS 50 140 409600 1400
61839963 zapdospops B Oct. 4, 2019, 9:18 a.m. OK Python 3 TESTS 50 140 409600 1400
56017243 pseudonam B June 24, 2019, 10:27 p.m. OK Python 3 TESTS 50 140 409600 1400
47872817 Boltz B Jan. 3, 2019, 1:46 p.m. OK Python 3 TESTS 50 140 409600 1400
47677960 koprus77 B Dec. 29, 2018, 10:23 a.m. OK Ruby TESTS 50 93 614400 1400
47643727 megachuhancer B Dec. 28, 2018, 3:39 p.m. OK Ruby TESTS 50 124 512000 1400
48388998 corvvs_ B Jan. 14, 2019, 2:24 p.m. OK Ruby TESTS 50 186 17612800 1400
47856977 marcio.diaz B Jan. 3, 2019, 12:03 a.m. OK Rust TESTS 50 30 1945600 1400
47693747 Orfest B Dec. 29, 2018, 3:49 p.m. OK Rust TESTS 50 31 512000 1400
47720171 hatoo B Dec. 30, 2018, 10:45 a.m. OK Rust TESTS 50 31 1843200 1400
47648380 cachinnating-cockatoo B Dec. 28, 2018, 4:03 p.m. OK Scala TESTS 50 529 5222400 1400

remove filters

Back to search problems