Codeforces problemset search & solutions
Exclude tags.

Review the problem statement from Codeforces (link will open a new tab). When you've matched your problem, go to the solutions.

Search on plain tags, ratings, names, and problem text. Example: brute force or binary search

Solved
Name
Tags
Solutions
Index
Contest
Type
Points
Tutorial
Rating Level
1354 Deletion of Repeats greedy hashing string suffix structures Statement C Codeforces Beta Round 19 {19} PROGRAMMING Code Force Beta Round 19 Solution 2200
929 Tricky and Clever Password binary search constructive algorithms data structures greedy hashing strings Statement E Codeforces Beta Round 30 (Codeforces format) {30} PROGRAMMING Codeforces Beta Round #30. Tutorial for problem A 2700
877 Genetic engineering dp string suffix structures trees Statement C Yandex.Algorithm 2011: Round 2 {86} PROGRAMMING Problemset analysis (Yandex, Round 2) 2400
1444 String string suffix structures Statement D Codeforces Beta Round 92 (Div. 1 Only) {123} PROGRAMMING Codeforces Beta Round #92 - Analysis 2300
25515 Password binary search dp hashing string suffix structures strings Statement B Codeforces Beta Round 93 (Div. 1 Only) {126} PROGRAMMING Tutorial 1800
2893 String brute force constructive algorithms hashing implementation string suffix structures strings Statement B Codeforces Beta Round 94 (Div. 1 Only) {128} PROGRAMMING 3219 2200
2536 Martian Strings string suffix structures strings Statement E Codeforces Round 106 (Div. 2) {149} PROGRAMMING Codeforces Round #106 (Div. 2) Tutorial 2200
1458 Little Elephant and Strings data structures implementation string suffix structures two pointers Statement E Codeforces Round 129 (Div. 1) {204} PROGRAMMING Tutorial 2800
526 Fence binary search data structures string suffix structures Statement D Codeforces Round 144 (Div. 1) {232} PROGRAMMING Editorial for Codeforces Round #144 2700
2492 Cyclical Quest data structures string suffix structures strings Statement C Codeforces Round 146 (Div. 1) {235} PROGRAMMING Codeforces Round #146 Tutorial 2700
521 Good Substrings string suffix structures Statement G2 ABBYY Cup 3.0 {316} PROGRAMMING 2200
544 Good Substrings string suffix structures Statement G3 ABBYY Cup 3.0 {316} PROGRAMMING 2800
778 Have You Ever Heard About the Word? greedy hashing string suffix structures strings Statement D Codeforces Round 189 (Div. 1) {319} PROGRAMMING Codeforces Round #189 — Editorial 2700
490 Xenia and String Problem dp hashing implementation string suffix structures strings Statement E Codeforces Round 207 (Div. 1) {356} PROGRAMMING 9210 2800
2440 Match & Catch dp string suffix structures strings Statement D Codeforces Round 244 (Div. 2) {427} PROGRAMMING Codeforces Round #244 (Div. 2) Editorial 2000
12349 Prefixes and Suffixes dp string suffix structures strings two pointers Statement D Codeforces Round 246 (Div. 2) {432} PROGRAMMING Codeforces Round #246 (Div. 2) Editorial 2000
1206 Valera and Swaps constructive algorithms dsu graphs implementation math string suffix structures Statement D Codeforces Round 252 (Div. 2) {441} PROGRAMMING Разбор Codeforces Round #252 (Div. 2) 2300
17474 Suffix Structures implementation strings Statement B Codeforces Round 256 (Div. 2) {448} PROGRAMMING Tutorial 1400
1206 Three strings data structures dsu string suffix structures strings Statement E MemSQL Start[c]UP 2.0 - Round 1 {452} PROGRAMMING MemSQL Start[c]UP 2.0 Round 1 and 2 Editorials 2400
10584 MUH and Cube Walls string suffix structures strings Statement D Codeforces Round 269 (Div. 2) {471} PROGRAMMING Codeforces Round #269 Editorial 2000
1073 Misha and LCP on Tree binary search dfs and similar hashing string suffix structures trees Statement E Codeforces Round 285 (Div. 1) {504} PROGRAMMING 15743 3000
8240 Watto and Mechanism binary search data structures hashing string suffix structures strings Statement C Codeforces Round 291 (Div. 2) {514} PROGRAMMING Codeforces Round #291 (Div. 2) Editorial 1900
598 And Yet Another Bracket Sequence data structures greedy hashing string suffix structures strings Statement F VK Cup 2015 - Round 1 {524} PROGRAMMING VK Cup Round 1 (+ online mirror) editorial 2700
2471 Om Nom and Necklace hashing string suffix structures strings Statement D ZeptoLab Code Rush 2015 {526} PROGRAMMING ZeptoLab Code Rush 2015 — Editorial 2200
956 Encoding hashing string suffix structures strings Statement F VK Cup 2015 - Round 2 (unofficial online mirror, Div. 1 only) {533} PROGRAMMING Разбор VK Cup Round 2 2400
4791 Tavas and Malekas greedy hashing string suffix structures strings Statement D Codeforces Round 299 (Div. 2) {535} PROGRAMMING Codeforces Round #299 Editorial 2100
2631 Mike and Friends data structures string suffix structures strings trees Statement E Codeforces Round 305 (Div. 1) {547} PROGRAMMING Codeforces Round #305 Editorial 2800
1222 Ann and Half-Palindrome data structures dp graphs string suffix structures strings trees Statement E Codeforces Round 311 (Div. 2) {557} PROGRAMMING Codeforces Round #311 (Div.2) Editorial 2700
175 Cutting the Line string suffix structures strings Statement E Codeforces Round 330 (Div. 1) {594} PROGRAMMING Codeforces Round #330 (Div.1 + Div.2) Editorial 3200
732 Expensive Strings string suffix structures strings Statement F Educational Codeforces Round 5 {616} PROGRAMMING Editorial of Educational Codeforces Round 5 2700
2460 Messenger data structures hashing implementation string suffix structures strings Statement D Codeforces Round 344 (Div. 2) {631} PROGRAMMING Editorial Codeforces Round #344 (Div. 2) 2100
3397 Spy Syndrome 2 data structures dp hashing implementation sortings string suffix structures strings Statement C Manthan, Codefest 16 {633} PROGRAMMING Manthan, Codefest 16: Editorials 1900
1178 Paper task data structures string suffix structures strings Statement F IndiaHacks 2016 - Online Edition (Div. 1 + Div. 2) {653} PROGRAMMING IndiaHacks Finals 2016 — Editorial 2500
1566 Forensic Examination data structures string suffix structures Statement E Codeforces Round 349 (Div. 1) {666} PROGRAMMING Codeforces Round #349 Editorial 3100
3472 Correct Bracket Sequence Editor data structures dsu strings Statement E Codeforces Round 350 (Div. 2) {670} PROGRAMMING Codeforces Round #350 (Div.2) Editorial 1700
1395 Cool Slogans string suffix structures strings Statement E Codeforces Round 364 (Div. 1) {700} PROGRAMMING 46283 3300
2539 String Set Queries brute force data structures hashing string suffix structures strings Statement F Educational Codeforces Round 16 {710} PROGRAMMING Editorial of Educational Codeforces Round 16 2700
1585 Games on a CD data structures hashing string suffix structures strings Statement E Technocup 2017 - Elimination Round 1 (Unofficially Open for Everyone, Rated for Div. 2) {727} PROGRAMMING Tutorial 2300
194 Arpa’s abnormal DNA and Mehrdad’s deep interest data structures string suffix structures Statement E Codeforces Round 383 (Div. 1) {741} PROGRAMMING Codeforces Round #383 editorial 3300
1090 Bacterial Melee brute force combinatorics dp string suffix structures Statement D 8VC Venture Cup 2017 - Final Round {756} PROGRAMMING 8VC Venture Cup 2017 — Final Round and Codeforces Round #393 Editorial 2500
1853 Fake News (hard) string suffix structures Statement G3 Helvetic Coding Contest 2017 online mirror (teams allowed, unrated) {802} PROGRAMMING helvetic-coding-contest-2017-editorial.pdf 2300
1815 Fake News (hard) string suffix structures Statement I Helvetic Coding Contest 2017 online mirror (teams allowed, unrated) {802} PROGRAMMING helvetic-coding-contest-2017-editorial.pdf 2400
1095 Liar binary search dp hashing string suffix structures Statement E Codeforces Round 422 (Div. 2) {822} PROGRAMMING Codeforces Round #422 (Div. 2) Editorial 2500
1997 String Compression dp hashing string suffix structures strings Statement F Educational Codeforces Round 25 {825} PROGRAMMING Educational Codeforces Round 25 - Editorial 2400
1888 Forbidden Indices dsu string suffix structures strings Statement F Educational Codeforces Round 30 {873} PROGRAMMING 55171 2300
577 Reverses dp string suffix structures strings Statement E Codeforces Round 454 (Div. 1, based on Technocup 2018 Elimination Round 4) {906} PROGRAMMING Editorial Codeforces Round 454 (and Technocup 2018 — Elimination Round 4) 3200
2172 Substrings in a String bitmasks brute force data structures string suffix structures strings Statement F Codecraft-18 and Codeforces Round 458 (Div. 1 + Div. 2, combined) {914} PROGRAMMING Tutorial 2900
186 Upside Down data structures string suffix structures strings trees Statement E Codeforces Round 459 (Div. 1) {917} PROGRAMMING Codeforces Round #459 Editorial 3000
1199 Palindrome Partition dp string suffix structures strings Statement G ICM Technex 2018 and Codeforces Round 463 (Div. 1 + Div. 2, combined) {932} PROGRAMMING 57796 2900
948 k-substrings binary search hashing string suffix structures Statement F Educational Codeforces Round 41 (Rated for Div. 2) {961} PROGRAMMING Educational Codeforces Round 41 Editorial 2700
2782 Frequency of String hashing string suffix structures strings Statement D Tinkoff Internship Warmup Round 2018 and Codeforces Round 475 (Div. 1) {963} PROGRAMMING Editorial Tinkoff Internship Warmup Round 2018 and Codeforces Round #475 (Div. 1 + Div. 2) 2400
1217 Security data structures string suffix structures Statement H Manthan, Codefest 18 (rated, Div. 1 + Div. 2) {1037} PROGRAMMING Tutorial 2900
325 Speckled Band data structures divide and conquer hashing string suffix structures strings Statement G Codeforces Round 519 by Botan Investments {1043} PROGRAMMING Codeforces Round #519 Editorial 3500
1013 String Journey data structures dp string suffix structures Statement F Codeforces Round 516 (Div. 1, by Moscow Team Olympiad) {1063} PROGRAMMING Editorial 3000
1113 Yet Another LCP Problem data structures string suffix structures Statement G Educational Codeforces Round 53 (Rated for Div. 2) {1073} PROGRAMMING 62742 2700
283 Ж-function string suffix structures strings Statement F Codeforces Round 530 (Div. 1) {1098} PROGRAMMING 64331 3500
1006 Morse Code binary search data structures dp hashing sortings string suffix structures strings Statement C Codeforces Round 542 [Alex Lopashev Thanks-Round] (Div. 1) {1129} PROGRAMMING 65520 2300
9538 Compress Words brute force hashing implementation string suffix structures strings Statement E Codeforces Round 578 (Div. 2) {1200} PROGRAMMING Codeforces Round #578 (Div. 2) Editorial 2000
2808 You Are Given Some Strings... brute force string suffix structures strings Statement E Educational Codeforces Round 70 (Rated for Div. 2) {1202} PROGRAMMING 68972 2500
1238 Indie Album data structures dfs and similar hashing string suffix structures strings trees Statement G Educational Codeforces Round 71 (Rated for Div. 2) {1207} PROGRAMMING Educational Codeforces Round 71 Editorial 2600
139 Permutation Concatenation string suffix structures Statement G Codeforces Global Round 6 {1266} PROGRAMMING Codeforces Global Round 6 Editorial 3300
449 Asterisk Substrings string suffix structures Statement F Codeforces Round 606 (Div. 1, based on Technocup 2020 Elimination Round 4) {1276} PROGRAMMING Technocup 2020 — Elimination Round 4 + Codeforces Round 606: Editorial 3300
15766 Yet Another Walking Robot data structures implementation Statement C Codeforces Round 617 (Div. 3) {1296} PROGRAMMING Codeforces Round #617 (Div. 3) Editorial 1500
11 Who needs suffix structures? Statement H AIM Tech Poorly Prepared Contest (unrated, funny, Div. 1 preferred) {1302} PROGRAMMING 73599
1717 Reachable Strings data structures hashing string suffix structures strings strings Statement D Codeforces Round 625 (Div. 1, based on Technocup 2020 Final Round) {1320} PROGRAMMING 2000.0 Codeforces Round #625 Editorial
13357 Prefix-Suffix Palindrome (Easy version) hashing string suffix structures strings Statement D1 Codeforces Global Round 7 {1326} PROGRAMMING 1000.0 74961 1500
11897 Prefix-Suffix Palindrome (Hard version) greedy hashing string suffix structures strings Statement D2 Codeforces Global Round 7 {1326} PROGRAMMING 1000.0 74961 1800
533 Letters and Question Marks bitmasks dp string suffix structures Statement G Educational Codeforces Round 84 (Rated for Div. 2) {1327} PROGRAMMING Educational Codeforces Round 84 Editorial 2900
449 Twilight and Ancient Scroll (easier version) dp hashing implementation string suffix structures strings Statement E1 Codeforces Round 662 (Div. 2) {1393} PROGRAMMING 1500.0 Codeforces Round #662 Editorial
446 Twilight and Ancient Scroll (harder version) dp implementation string suffix structures strings Statement E2 Codeforces Round 662 (Div. 2) {1393} PROGRAMMING 1500.0 Codeforces Round #662 Editorial
1188 x-prime Substrings bitmasks dp greedy number theory string suffix structures strings Statement F Educational Codeforces Round 94 (Rated for Div. 2) {1400} PROGRAMMING 81942
1283 Death DBMS data structures hashing string suffix structures strings trees Statement G Educational Codeforces Round 97 (Rated for Div. 2) {1437} PROGRAMMING 84149
2203 A Bit Similar bitmasks brute force hashing string suffix structures strings two pointers Statement E Educational Codeforces Round 101 (Rated for Div. 2) {1469} PROGRAMMING Educational Codeforces Round 101 Editorial
71 Build From Suffixes *special combinatorics data structures Statement H Kotlin Heroes: Episode 6 {1488} PROGRAMMING 88522
918 Matrix Sorting bitmasks constructive algorithms dfs and similar greedy hashing string suffix structures two pointers Statement C Codeforces Round 707 (Div. 1, based on Moscow Open Olympiad in Informatics) {1500} PROGRAMMING 1500.0 Codeforces Round #707 Editorial 2600
1508 Oolimry and Suffix Array combinatorics constructive algorithms math string suffix structures Statement E Codeforces Round 723 (Div. 2) {1526} PROGRAMMING 2500.0 Codeforces Round #723 (Div. 2) Editorial
609 String Distance binary search data structures hashing string suffix structures strings Statement F Educational Codeforces Round 110 (Rated for Div. 2) {1535} PROGRAMMING 91481
16626 Erase and Extend (Easy Version) binary search brute force dp greedy hashing string suffix structures strings Statement E1 Codeforces Round 726 (Div. 2) {1537} PROGRAMMING 1250.0 Codeforces Round #726 (Div.2) Editorial
6245 Erase and Extend (Hard Version) binary search data structures greedy hashing string suffix structures strings Statement E2 Codeforces Round 726 (Div. 2) {1537} PROGRAMMING 1750.0 Codeforces Round #726 (Div.2) Editorial
1592 Rescue Niwen! dp string suffix structures strings Statement E Codeforces Round 741 (Div. 2) {1562} PROGRAMMING 2750.0 Editorial of Codeforces Round 741 (Div. 2)
247 Alphabetic Tree binary search data structures dfs and similar hashing string suffix structures strings trees Statement G Codeforces Round 758 (Div.1 + Div. 2) {1608} PROGRAMMING 2750.0 Editorial of Codeforces Round #758 (Div.1 + Div. 2)
145 Two Sequences data structures hashing string suffix structures Statement I Hello 2022 {1621} PROGRAMMING 4500.0
2577 Prefix Function Queries bitmasks brute force data structures hashing string suffix structures strings trees Statement E Educational Codeforces Round 134 (Rated for Div. 2) {1721} PROGRAMMING 106416
641 Keyboard Design bitmasks data structures dp string suffix structures strings Statement F Educational Codeforces Round 136 (Rated for Div. 2) {1739} PROGRAMMING Educational Codeforces Round 136 Editorial
20750 Save the Magazines constructive algorithms greedy sortings string suffix structures Statement C Educational Codeforces Round 137 (Rated for Div. 2) {1743} PROGRAMMING Educational Codeforces Round 137 Editorial 1100
1009 Delicious Dessert math number theory string suffix structures strings Statement G Codeforces Round 846 (Div. 2) {1780} PROGRAMMING 2500.0 111841
727 A task for substrings data structures string suffix structures strings Statement G Codeforces Round 857 (Div. 1) {1801} PROGRAMMING 3500.0 Codeforces Round #857 Editorial
335 Entangled Substrings string suffix structures Statement F Codeforces Round 869 (Div. 1) {1817} PROGRAMMING 3000.0 Codeforces Round #869 (Div.1, Div.2) Editorial
658 Pumping Lemma hashing string suffix structures strings Statement G Pinely Round 3 (Div. 1 + Div. 2) {1909} PROGRAMMING 4000.0 Editorial of Pinely Round 3 (Div. 1 + Div. 2)
538 Shrink-Reverse binary search greedy string suffix structures strings Statement F Educational Codeforces Round 162 (Rated for Div. 2) {1923} PROGRAMMING Educational Codeforces Round 162 Editorial
5359 Division + LCP (easy version) binary search data structures dp hashing string suffix structures strings Statement G1 Codeforces Round 943 (Div. 3) {1968} PROGRAMMING 129096 1900
2547 Division + LCP (hard version) binary search brute force data structures dp hashing math string suffix structures strings Statement G2 Codeforces Round 943 (Div. 3) {1968} PROGRAMMING 129096 2200
3907 ''a'' String Problem hashing implementation math string suffix structures strings Statement D Codeforces Global Round 26 {1984} PROGRAMMING 2500.0 Codeforces Global Round 26 Editorial
750 Polyathlon data structures hashing string suffix structures strings Statement I 2024-2025 ICPC, NERC, Southern and Volga Russian Regional Contest (Unrated, Online Mirror, ICPC Rules, Preferably Teams) {2038} PROGRAMMING 2500
805 Missing Separators dp sortings string suffix structures strings Statement H 2024-2025 ICPC Asia Jakarta Regional Contest (Unrated, Online Mirror, ICPC Rules, Teams Preferred) {2045} PROGRAMMING raRzKDJLPHcUnqTcwvGznwEdKiDWjEkd.pdf 2200
13843 Piecing It Together *special string suffix structures Statement A April Fools Day Contest 2025 {2095} PROGRAMMING
31245 Prefix Min and Suffix Max brute force data structures Statement C Codeforces Round 1034 (Div. 3) {2123} PROGRAMMING Codeforces Round 1034 (Div. 3) Editorial
304 Shuffling Cards with Problem Solver 68! string suffix structures Statement H 2025 ICPC Asia Taichung Regional Contest (Unrated, Online Mirror, ICPC Rules, Preferably Teams) {2172} PROGRAMMING
299 Fuzzy Concatenation (Easy Version) binary search bitmasks brute force data structures greedy string suffix structures Statement E1 Codeforces Round 1079 (Div. 1) {2196} PROGRAMMING 2000.0 Tutorial
213 Fuzzy Concatenation (Hard version) binary search data structures dp greedy string suffix structures Statement E2 Codeforces Round 1079 (Div. 1) {2196} PROGRAMMING 1000.0 Tutorial
1670 Simons and Dividing the Rhythm dp string suffix structures strings Statement E Codeforces Round 1083 (Div. 2) {2205} PROGRAMMING 2500.0 Tutorial
698 String Cutting binary search brute force greedy hashing string suffix structures strings Statement F Educational Codeforces Round 189 (Rated for Div. 2) {2225} PROGRAMMING Tutorial