Educational Codeforces Round 182 (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
2144 Educational Codeforces Round 182 (Rated for Div. 2) FINISHED False 7200 18458723 Sept. 15, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 909 ) F Bracket Groups PROGRAMMING constructive algorithms dp strings

A regular bracket sequence is a bracket sequence that can be transformed into a correct arithmetic sequence. For example: bracket sequences " ()() " and " (()) " are regular (the resulting expressions are: " (1)+(1) " and " ((1+1)+1) "); bracket sequences " )( ", " ( " and " ) " are not. You are given (n) bracket sequences (s_1, s_2, \dots, s_n) (not necessarily regular) and an even integer (k). Your task is to split all of them into groups in such a way that: every bracket sequence belongs to exactly one group; for each group, there exists a regular bracket sequence of length exactly (k) such that every bracket sequence assigned to this group is not a substring of it. What is the smallest number of groups that this can be achieved for? If it's impossible to do for any number of groups, report so. Otherwise, print the groups and any valid regular bracket sequence for each group. If there are multiple answers with the smallest number of groups, print any of them. The first line contains two integers (n) and (k) ((1 \le n \le 50); (2 \le k \le 50); (k) is even). The (i)-th of the next (n) lines contains a bracket sequence (s_i) ((2 \le |s_i| \le k)). It consists only of characters ' ( ' and ' ) '. If it's impossible to split all bracket sequences into groups according to the rules, then print (-1). Otherwise, print the smallest possible number of groups (m) in the first line. Then, (m) blocks of data should follow: The first line of each block should contain a regular bracket sequence of length (k). The second line should contain a single integer (g) — the number of bracket sequences in the current group. The third line should contain (g) integers from (1) to (n) — the indices of the bracket sequences that belong to the current group. None of these bracket sequences should be a substring of the chosen regular bracket sequence. Each index from (1) to (n) should belong

Tutorials

Educational Codeforces Round 182 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
338911811 LastMagician F Sept. 16, 2025, 11:55 a.m. OK C# 13 TESTS 44 124 14950400
338855767 ADSFORME F Sept. 16, 2025, 3 a.m. OK C++17 (GCC 7-32) TESTS 44 62 82636800
338935375 lucnguyen030608 F Sept. 16, 2025, 2:20 p.m. OK C++17 (GCC 7-32) TESTS 44 77 14131200
339016221 wyy0813 F Sept. 17, 2025, 2:52 a.m. OK C++17 (GCC 7-32) TESTS 44 77 20480000
338905787 Aile41 F Sept. 16, 2025, 11:19 a.m. OK C++17 (GCC 7-32) TESTS 44 77 26214400
339023311 wabca F Sept. 17, 2025, 4:22 a.m. OK C++17 (GCC 7-32) TESTS 44 77 90624000
338955125 Alida2005 F Sept. 16, 2025, 4:31 p.m. OK C++17 (GCC 7-32) TESTS 44 92 37171200
338980499 MohamadKian F Sept. 16, 2025, 5:11 p.m. OK C++17 (GCC 7-32) TESTS 44 93 37171200
338851286 Warma F Sept. 16, 2025, 1:37 a.m. OK C++17 (GCC 7-32) TESTS 44 93 73420800
338891608 nikhileswar1026 F Sept. 16, 2025, 9:20 a.m. OK C++17 (GCC 7-32) TESTS 44 124 102400
338842407 nikhileswar1026 F Sept. 15, 2025, 9:54 p.m. OK C++17 (GCC 7-32) TESTS 44 124 102400
338853693 sunrise1024 F Sept. 16, 2025, 2:25 a.m. OK C++20 (GCC 13-64) TESTS 44 61 73420800
338990011 spaceleo F Sept. 16, 2025, 6:31 p.m. OK C++20 (GCC 13-64) TESTS 44 62 6451200
339006941 Mohanad_Nahhal F Sept. 16, 2025, 11:07 p.m. OK C++20 (GCC 13-64) TESTS 44 62 15974400
339007993 Terrorb1ade F Sept. 16, 2025, 11:45 p.m. OK C++20 (GCC 13-64) TESTS 44 62 20582400
338944047 __jk__ F Sept. 16, 2025, 3:17 p.m. OK C++20 (GCC 13-64) TESTS 44 62 26316800
339029794 hshhh_ F Sept. 17, 2025, 5:56 a.m. OK C++20 (GCC 13-64) TESTS 44 62 31129600
338902819 111445 F Sept. 16, 2025, 10:56 a.m. OK C++20 (GCC 13-64) TESTS 44 62 33382400
338894722 ishowguts F Sept. 16, 2025, 9:42 a.m. OK C++20 (GCC 13-64) TESTS 44 62 33996800
338931057 doreen2011 F Sept. 16, 2025, 1:54 p.m. OK C++20 (GCC 13-64) TESTS 44 62 88371200
338943831 ppprobie F Sept. 16, 2025, 3:15 p.m. OK C++20 (GCC 13-64) TESTS 44 62 364748800
338847710 lyteabovenyte F Sept. 16, 2025, 12:16 a.m. OK C++23 (GCC 14-64, msys2) TESTS 44 46 0
339020509 Axial-Tilted F Sept. 17, 2025, 3:42 a.m. OK C++23 (GCC 14-64, msys2) TESTS 44 46 102400
338853844 UFEQ F Sept. 16, 2025, 2:27 a.m. OK C++23 (GCC 14-64, msys2) TESTS 44 46 102400
338865167 xyxi F Sept. 16, 2025, 5:21 a.m. OK C++23 (GCC 14-64, msys2) TESTS 44 46 2150400
339021256 OneCyborg F Sept. 17, 2025, 3:52 a.m. OK C++23 (GCC 14-64, msys2) TESTS 44 46 12288000
338866022 __90m3 F Sept. 16, 2025, 5:30 a.m. OK C++23 (GCC 14-64, msys2) TESTS 44 46 26112000
338852801 zhcmmm F Sept. 16, 2025, 2:09 a.m. OK C++23 (GCC 14-64, msys2) TESTS 44 46 30208000
338985339 Nlll F Sept. 16, 2025, 5:50 p.m. OK C++23 (GCC 14-64, msys2) TESTS 44 46 79564800
338840994 kaiboy F Sept. 15, 2025, 9:25 p.m. OK C++23 (GCC 14-64, msys2) TESTS 44 61 6451200
338919727 LastMagician F Sept. 16, 2025, 12:44 p.m. OK C++23 (GCC 14-64, msys2) TESTS 44 61 8192000
338912252 LastMagician F Sept. 16, 2025, 11:57 a.m. OK GNU C11 TESTS 44 62 11980800
338913332 LastMagician F Sept. 16, 2025, 12:03 p.m. OK Go TESTS 44 77 12492800
338820920 Animesh1008 F Sept. 15, 2025, 5:28 p.m. OK Java 21 TESTS 44 327 20480000
338825968 BOB_005 F Sept. 15, 2025, 6:12 p.m. OK Java 21 TESTS 44 327 21299200
338921571 LastMagician F Sept. 16, 2025, 12:56 p.m. OK Kotlin 2.2 TESTS 44 203 7577600
338907106 LastMagician F Sept. 16, 2025, 11:28 a.m. OK Kotlin 2.2 TESTS 44 217 6553600
338889501 a_b_68687 F Sept. 16, 2025, 9:05 a.m. OK PyPy 3-64 TESTS 44 109 4710400
338913820 LastMagician F Sept. 16, 2025, 12:06 p.m. OK PyPy 3-64 TESTS 44 186 17817600
338817705 artemi__sav F Sept. 15, 2025, 5:04 p.m. OK PyPy 3-64 TESTS 44 187 15462400
338853339 Little_Sheep_Yawn F Sept. 16, 2025, 2:18 a.m. OK PyPy 3-64 TESTS 44 202 22630400
338933435 IcyGirl F Sept. 16, 2025, 2:08 p.m. OK PyPy 3-64 TESTS 44 343 40755200
338986244 smz.26 F Sept. 16, 2025, 5:58 p.m. OK PyPy 3-64 TESTS 44 390 88780800
338822866 codengunhatlop F Sept. 15, 2025, 5:45 p.m. OK Python 3 TESTS 44 140 2764800
338912739 LastMagician F Sept. 16, 2025, noon OK Rust 2024 TESTS 44 62 8089600

remove filters

Back to search problems