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
981 Friends binary search bitmasks data structures math Statement B Bayan 2012-2013 Elimination Round (ACM ICPC Rules, English statements) {241} PROGRAMMING 2700
11788 XOR on Segment bitmasks data structures Statement E Codeforces Round 149 (Div. 2) {242} PROGRAMMING Codeforces Round #149 (Div. 2) Tutorial 2000
4306 Sausage Maximization bitmasks data structures trees Statement E Codeforces Round 173 (Div. 2) {282} PROGRAMMING Round #173 — Editorial 2100
1040 Inna and Binary Logic binary search bitmasks data structures Statement E Codeforces Round 234 (Div. 2) {400} PROGRAMMING Codeforces Round #234 (Div. 2) — Tutorial 2400
463 Design Tutorial: Increase the Constraints bitmasks data structures fft Statement G Codeforces Round 270 {472} PROGRAMMING Editorial 2800
7051 New Year Tree bitmasks data structures trees Statement E Educational Codeforces Round 6 {620} PROGRAMMING Editorial of Educational Codeforces Round 6 2100
875 Yash And Trees bitmasks data structures dfs and similar math number theory Statement G Manthan, Codefest 16 {633} PROGRAMMING Manthan, Codefest 16: Editorials 2700
12466 Vasiliy's Multiset binary search bitmasks data structures trees Statement D Codeforces Round 367 (Div. 2) {706} PROGRAMMING Tutorial 1800
2975 Persistent Bookcase bitmasks data structures dfs and similar implementation Statement D Codeforces Round 368 (Div. 2) {707} PROGRAMMING 46662 2100
3456 Mahmoud and a xor trip bitmasks constructive algorithms data structures dfs and similar dp math trees Statement E Codeforces Round 396 (Div. 2) {766} PROGRAMMING Codeforces round #396 editorial 2200
204 Sequence Recovery bitmasks data structures greedy Statement F Codeforces Round 408 (Div. 2) {796} PROGRAMMING Tutorial 2800
3705 Choosing The Commander bitmasks data structures trees Statement E Educational Codeforces Round 23 {817} PROGRAMMING 52638 2100
2489 High Cry binary search bitmasks combinatorics data structures divide and conquer Statement D Codeforces Round 441 (Div. 1, by Moscow Team Olympiad) {875} PROGRAMMING Codeforces Round #441. Editorial. 2200
5467 Danil and a Part-time Job bitmasks data structures trees Statement E Codeforces Round 442 (Div. 2) {877} PROGRAMMING 55362 2000
5826 Xor-MST bitmasks constructive algorithms data structures Statement G Educational Codeforces Round 32 {888} PROGRAMMING Educational Codeforces Round 32 - Editorial 2300
1908 Palindromes in a Tree bitmasks data structures divide and conquer trees Statement E Codecraft-18 and Codeforces Round 458 (Div. 1 + Div. 2, combined) {914} PROGRAMMING Tutorial 2400
2140 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
1084 Shortest Path Queries bitmasks data structures dsu graphs Statement G Educational Codeforces Round 38 (Rated for Div. 2) {938} PROGRAMMING Educational Codeforces Round 38 — Editorial 2900
2173 Kuro and GCD and XOR and SUM binary search bitmasks brute force data structures dp dsu greedy math number theory strings trees Statement D Codeforces Round 482 (Div. 2) {979} PROGRAMMING 1750.0 Codeforces Round #482 (Div. 2) Editorial 2200
2524 Addition on Segments bitmasks data structures divide and conquer dp Statement E Avito Code Challenge 2018 {981} PROGRAMMING Avito Code Challenge 2018 — разбор 2100
927 Sonya and Bitwise OR bitmasks data structures divide and conquer Statement F Codeforces Round 495 (Div. 2) {1004} PROGRAMMING 60443 2900
3947 The Wu bitmasks brute force data structures Statement D Codeforces Round 502 (in memory of Leopoldo Taravilse, Div. 1 + Div. 2) {1017} PROGRAMMING Разбор (англ.) 1900
2215 Multidimensional Queries bitmasks data structures Statement G Educational Codeforces Round 56 (Rated for Div. 2) {1093} PROGRAMMING 63877 2200
2426 Please, another Queries on Array? bitmasks data structures divide and conquer math number theory Statement F Codeforces Round 538 (Div. 2) {1114} PROGRAMMING Codeforces Round #538 (Div. 2) Editorial 2500
1015 Hot is Cold bitmasks data structures divide and conquer implementation Statement E Forethought Future Cup - Elimination Round {1146} PROGRAMMING 66639 2400
1008 Magical Permutation bitmasks brute force constructive algorithms data structures graphs math Statement E Codeforces Round 558 (Div. 2) {1163} PROGRAMMING 66943 2800
2041 Count The Rectangles bitmasks brute force data structures geometry sortings Statement E Educational Codeforces Round 68 (Rated for Div. 2) {1194} PROGRAMMING Разбор Educational Codeforces Round 68 2200
330 Feeling Good bitmasks data structures Statement G Codeforces Round 583 (Div. 1 + Div. 2, based on Olympiad of Metropolises) {1214} PROGRAMMING Tutorial 3100
4629 Present binary search bitmasks constructive algorithms data structures math sortings Statement B Codeforces Round 626 (Div. 1, based on Moscow Open Olympiad in Informatics) {1322} PROGRAMMING 1000.0 Codeforces Round #626 Editorial
2023 AND Segments bitmasks combinatorics data structures dp two pointers Statement F Educational Codeforces Round 84 (Rated for Div. 2) {1327} PROGRAMMING Educational Codeforces Round 84 Editorial 2500
655 Joker *special bitmasks data structures divide and conquer dsu Statement C Baltic Olympiad in Informatics 2020, Day 1 (IOI, Unofficial Mirror Contest, Unrated) {1386} PROGRAMMING T
1157 Mercenaries bitmasks combinatorics data structures math two pointers Statement G Educational Codeforces Round 94 (Rated for Div. 2) {1400} PROGRAMMING 81942
1952 Reverse and Swap binary search bitmasks data structures divide and conquer Statement F Codeforces Round 665 (Div. 2) {1401} PROGRAMMING 2500.0 Codeforces Round #665 (Div. 2) Editorial
5031 XOR Inverse bitmasks data structures divide and conquer greedy strings trees Statement C Codeforces Round 673 (Div. 1) {1416} PROGRAMMING 1250.0 Codeforces Round #673 Editorial 2000
248 Cheat and Win bitmasks data structures games trees Statement E Codeforces Round 684 (Div. 1) {1439} PROGRAMMING 2500.0 Codeforces Round #684[Div1 and Div2] Editorial
4080 Xor Tree binary search bitmasks data structures divide and conquer dp trees Statement C Codeforces Round 683 (Div. 1, by Meet IT) {1446} PROGRAMMING 1250.0 E
6774 Strange Definition bitmasks brute force data structures graphs math number theory Statement B Codeforces Round 694 (Div. 1) {1470} PROGRAMMING 750.0 86464
2744 Pattern Matching bitmasks data structures dfs and similar graphs sortings strings Statement E Educational Codeforces Round 103 (Rated for Div. 2) {1476} PROGRAMMING 87356
1329 Odd Mineral Resource bitmasks data structures hashing probabilities trees Statement D Codeforces Round 700 (Div. 1) {1479} PROGRAMMING 2250.0 Editorial of Codeforces Round #700
23197 Box Fitting binary search bitmasks data structures greedy Statement B CodeCraft-21 and Codeforces Round 711 (Div. 2) {1498} PROGRAMMING 1000.0 CodeCraft-21 and Codeforces Round #711 (Div. 2) Editorial
938 Chips on a Board bitmasks brute force data structures games sortings Statement G Educational Codeforces Round 107 (Rated for Div. 2) {1511} PROGRAMMING 89634
350 Phoenix and Bits bitmasks data structures Statement H Codeforces Global Round 14 {1515} PROGRAMMING 4250.0 Editorial
92 Submatrices *special bitmasks data structures dp Statement H Kotlin Heroes: Episode 7 {1533} PROGRAMMING Kotlin Heroes 7 — Editorial
1836 Stringforces binary search bitmasks data structures dp greedy strings two pointers Statement E Educational Codeforces Round 111 (Rated for Div. 2) {1550} PROGRAMMING Educational Codeforces Round 111 Editorial
1625 RBS binary search bitmasks data structures dp Statement F Educational Codeforces Round 115 (Rated for Div. 2) {1598} PROGRAMMING 95890
2315 Binary Spiders bitmasks data structures implementation sortings trees Statement D Codeforces Round 765 (Div. 2) {1625} PROGRAMMING 2000.0 Editorial of Codeforces Round #765 (Div. 2)
1481 Minimal String Xoration bitmasks data structures divide and conquer hashing strings Statement F Codeforces Round 778 (Div. 1 + Div. 2, based on Technocup 2022 Final Round) {1654} PROGRAMMING 3000.0 Editorial of Codeforces Round #778 (Div. 1 + Div. 2, based on Technocup 2022 Final Round) 2800
3173 388535 (Hard Version) bitmasks brute force data structures math Statement D2 Codeforces Round 779 (Div. 2) {1658} PROGRAMMING 750.0 Codeforces Round #779 (Div. 2) Editorial
9986 388535 (Easy Version) bitmasks data structures math Statement D1 Codeforces Round 779 (Div. 2) {1658} PROGRAMMING 1250.0 Codeforces Round #779 (Div. 2) Editorial
1967 AND-MEX Walk bitmasks brute force data structures dfs and similar dsu graphs greedy Statement E Codeforces Round 782 (Div. 2) {1659} PROGRAMMING 2250.0 Codeforces Round #782 (Div. 2) Editorial
1794 MinimizOR binary search bitmasks data structures dp greedy implementation Statement E Codeforces Round 781 (Div. 2) {1665} PROGRAMMING 2250.0 Codeforces Round #781 (Div. 2) Editorial
5752 Passable Paths (hard version) bitmasks data structures dfs and similar dp sortings trees Statement G2 Codeforces Round 805 (Div. 3) {1702} PROGRAMMING 104763
2449 Mark and Professor Koro binary search bitmasks combinatorics data structures greedy Statement E Codeforces Round 807 (Div. 2) {1705} PROGRAMMING 2500.0 Codeforces Round #807 (Div 2.) Editorial
1317 Swap and Maximum Block bitmasks data structures divide and conquer dp Statement E Educational Codeforces Round 133 (Rated for Div. 2) {1716} PROGRAMMING 105653
2187 Xor-Subsequence (hard version) bitmasks data structures dp strings trees Statement D2 Codeforces Round 815 (Div. 2) {1720} PROGRAMMING 1000.0 Codeforces Round #815 (Div. 2) Editorial
2547 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
1143 Field Photography bitmasks data structures sortings Statement F COMPFEST 14 - Preliminary Online Mirror (Unrated, ICPC Rules, Teams Preferred) {1725} PROGRAMMING Tutorial
742 Almost Sorted bitmasks data structures dp Statement F Codeforces Round 823 (Div. 2) {1730} PROGRAMMING 3000.0 Codeforces Round #823 — editorial 2700
633 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
5543 Yet Another Problem binary search bitmasks constructive algorithms data structures Statement D Codeforces Round 832 (Div. 2) {1747} PROGRAMMING 1750.0 Codeforces Round #832 (Div. 2) Editorial
10265 SlavicG's Favorite Problem bitmasks brute force constructive algorithms data structures dfs and similar graphs greedy Statement G Codeforces Round 835 (Div. 4) {1760} PROGRAMMING 109348
1521 Hossam and Range Minimum Query binary search bitmasks data structures hashing probabilities strings trees Statement F Codeforces Round 837 (Div. 2) {1771} PROGRAMMING 3500.0 Codeforces Round #837 (Div. 2) Editorial
1336 Comfortably Numb binary search bitmasks data structures divide and conquer dsu strings trees two pointers Statement F Codeforces Round 845 (Div. 2) and ByteRace 2023 {1777} PROGRAMMING 2750.0 Codeforces Round #845 (Div. 2) and ByteRace 2023 Editorial
1900 Three Chairs bitmasks brute force combinatorics data structures number theory sortings Statement F Codeforces Round 846 (Div. 2) {1780} PROGRAMMING 2000.0 111841
1948 Walk the Runway bitmasks brute force data structures dp graphs implementation sortings Statement E Codeforces Round 870 (Div. 2) {1826} PROGRAMMING 2500.0 Codeforces Round #870 (Div. 2) Editorial 2400
1175 Tree Weights bitmasks constructive algorithms data structures dfs and similar math matrices number theory trees Statement G Codeforces Round 884 (Div. 1 + Div. 2) {1844} PROGRAMMING 3500.0 Codeforces Round #884 (Div. 1 + Div. 2) Editorial
1027 The Boss's Identity binary search bitmasks data structures dfs and similar greedy math sortings Statement F Codeforces Round 882 (Div. 2) {1847} PROGRAMMING 3000.0 Tutorial
14735 Vampiric Powers, anyone? bitmasks brute force data structures dp greedy Statement C Codeforces Round 882 (Div. 2) {1847} PROGRAMMING 1500.0 Tutorial
877 XOR Partition binary search bitmasks data structures divide and conquer greedy trees Statement F Educational Codeforces Round 152 (Rated for Div. 2) {1849} PROGRAMMING 118752
7378 Lisa and the Martians bitmasks data structures greedy math sortings strings trees Statement F Codeforces Round 888 (Div. 3) {1851} PROGRAMMING 118667
1262 Rollbacks (Hard Version) bitmasks data structures interactive trees Statement E2 Codeforces Round 893 (Div. 2) {1858} PROGRAMMING 1000.0 Codeforces Round #893 (Div. 2) Editorial 2600
3036 Guess Game bitmasks combinatorics constructive algorithms data structures games math probabilities strings trees Statement E Harbour.Space Scholarship Contest 2023-2024 (Div. 1 + Div. 2) {1864} PROGRAMMING 2000.0 Harbour.Space Scholarship Contest 2023-2024 (Div. 1 + Div. 2) Editorial
21245 Data Structures Fan bitmasks data structures Statement E Codeforces Round 895 (Div. 3) {1872} PROGRAMMING Codeforces Round 895 (Div. 3) Editorial
1459 wxhtzdy ORO Tree binary search bitmasks data structures dfs and similar math trees Statement G Codeforces Round 900 (Div. 3) {1878} PROGRAMMING Codeforces round #900 (Div.3) Editorial
20750 Iva & Pav binary search bitmasks data structures greedy Statement E Codeforces Round 900 (Div. 3) {1878} PROGRAMMING Codeforces round #900 (Div.3) Editorial
7117 XOR Construction bitmasks constructive algorithms data structures math trees Statement D Educational Codeforces Round 157 (Rated for Div. 2) {1895} PROGRAMMING Educational Codeforces Round 157 Editorial
1469 Trees and XOR Queries Again bitmasks data structures dfs and similar implementation math trees Statement F Educational Codeforces Round 159 (Rated for Div. 2) {1902} PROGRAMMING Educational Codeforces Round 159 Editorial
2067 Yet Another Inversions Problem bitmasks combinatorics data structures math Statement D Codeforces Round 917 (Div. 2) {1917} PROGRAMMING 2250.0 Editorial of Codeforces Round 917 (Div. 2)
14807 Vlad and an Odd Ordering binary search bitmasks data structures dp implementation math number theory Statement E Codeforces Round 928 (Div. 4) {1926} PROGRAMMING 126132
1645 Distance Learning Courses in MAC binary search bitmasks data structures greedy implementation math Statement E Codeforces Round 932 (Div. 2) {1935} PROGRAMMING 2500.0 Codeforces Round #932 (Div. 2) Editorial
624 Bitwise Paradox bitmasks data structures greedy two pointers Statement D Codeforces Round 930 (Div. 1) {1936} PROGRAMMING 2000.0 Codeforces Round 930 (Div. 1, Div. 2) Editorial
2235 Fenwick Tree bitmasks brute force combinatorics data structures dp math trees Statement C Codeforces Round 942 (Div. 1) {1967} PROGRAMMING 1250.0 Tutorial 2300
16784 Cat, Fox and the Lonely Array binary search bitmasks data structures greedy math two pointers Statement B Codeforces Round 945 (Div. 2) {1973} PROGRAMMING 1000.0 Editorial for Codeforces Round #945 (Div. 2) 1300
1692 Yasya and the Mysterious Tree bitmasks data structures dfs and similar graphs strings trees Statement G Codeforces Round 950 (Div. 3) {1980} PROGRAMMING 130135
1518 array-value binary search bitmasks data structures two pointers Statement F Codeforces Round 956 (Div. 2) and ByteRace 2024 {1983} PROGRAMMING 2500.0
396 Let Me Teach You a Lesson (Hard Version) 2-sat bitmasks data structures dp graphs matrices two pointers Statement E2 Codeforces Round 961 (Div. 2) {1995} PROGRAMMING 1500.0 Video Tutorial
8584 QED's Favorite Permutation bitmasks data structures implementation sortings Statement D Codeforces Round 979 (Div. 2) {2030} PROGRAMMING 1500.0 Codeforces Round 979 Editorial
11497 Alya and Permutation bitmasks constructive algorithms data structures Statement C Codeforces Global Round 27 {2035} PROGRAMMING 1000.0 Codeforces Global Round 27 Editorial
854 Divide OR Conquer bitmasks data structures dp implementation Statement D 2024-2025 ICPC, NERC, Southern and Volga Russian Regional Contest (Unrated, Online Mirror, ICPC Rules, Preferably Teams) {2038} PROGRAMMING 2400
340 Xorderable Array bitmasks data structures Statement J 2024-2025 ICPC Asia Jakarta Regional Contest (Unrated, Online Mirror, ICPC Rules, Teams Preferred) {2045} PROGRAMMING raRzKDJLPHcUnqTcwvGznwEdKiDWjEkd.pdf 2600
577 MEX OR Mania bitmasks data structures implementation Statement F Codeforces Round 994 (Div. 2) {2049} PROGRAMMING 2750.0 Codeforces Round #994 (Div. 2) Editorial
5823 Eating binary search bitmasks data structures greedy two pointers Statement D Codeforces Round 1005 (Div. 2) {2064} PROGRAMMING 1750.0 Codeforces Round 1005 (Div. 2) Editorial
1077 Infinite Sequence (Hard Version) bitmasks constructive algorithms data structures dp implementation math Statement D2 Codeforces Round 1007 (Div. 2) {2071} PROGRAMMING 1250.0 Codeforces Round 1007 (Div. 2) Editorial
609 Maximize Nor bitmasks data structures implementation Statement F Codeforces Round 1019 (Div. 2) {2103} PROGRAMMING 3000.0 142149
2108 Maximum OR Popcount binary search bitmasks brute force data structures greedy Statement E Codeforces Global Round 29 (Div. 1 + Div. 2) {2147} PROGRAMMING 2500.0
6715 Division Versus Addition bitmasks data structures games Statement D Squarepoint Challenge (Codeforces Round 1055, Div. 1 + Div. 2) {2152} PROGRAMMING 2500.0 Squarepoint Challenge (Codeforces Round 1055, Div. 1 + Div. 2) Editorial
1292 Blackslex and Plants bitmasks data structures dp math Statement H Codeforces Round 1071 (Div. 3) {2179} PROGRAMMING Codeforces Round 1071 (Div. 3) Editorial
166 Again Trees... (hard version) bitmasks data structures dfs and similar dp fft trees Statement F2 Codeforces Round 1078 (Div. 2) {2194} PROGRAMMING 1750.0 Codeforces Round #1078 Editorial
277 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
199 Simons and Diophantus Equation bitmasks brute force data structures number theory Statement G Codeforces Round 1083 (Div. 2) {2205} PROGRAMMING 3250.0 Tutorial