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
15426 Increasing Sequence constructive algorithms implementation math Statement A Codeforces Beta Round 11 {11} PROGRAMMING 1100
3842 Four Segments brute force constructive algorithms geometry implementation math Statement C Codeforces Beta Round 14 (Div. 2) {14} PROGRAMMING Codeforces Beta Round #14 tutorial 1800
4421 Find Color constructive algorithms geometry implementation math Statement A Codeforces Beta Round 39 {40} PROGRAMMING codeforces #39 1300
1137 Before Exam constructive algorithms implementation sortings Statement B Codeforces Beta Round 90 {119} PROGRAMMING Разбор задачи E Codeforces Beta Round #90 1700
111890 Insomnia cure constructive algorithms implementation math Statement A Codeforces Round 105 (Div. 2) {148} PROGRAMMING Codeforces Round #105 (Div. 2): editorial 900
2830 Mathematical Analysis Rocks! constructive algorithms implementation math Statement F Codeforces Round 116 (Div. 2, ACM-ICPC Rules) {180} PROGRAMMING 1300
10164 XOR and OR constructive algorithms implementation math Statement C Codeforces Round 173 (Div. 2) {282} PROGRAMMING Round #173 — Editorial 1600
8555 Lucky Permutation Triple constructive algorithms implementation math Statement A Codeforces Round 183 (Div. 1) {303} PROGRAMMING Codeforces Round #183 Editorial 1400
5933 Ilya and Matrix constructive algorithms greedy implementation sortings Statement C Codeforces Round 186 (Div. 2) {313} PROGRAMMING Tutorial 1400
2430 Two Heaps combinatorics constructive algorithms greedy implementation math sortings Statement B Codeforces Round 205 (Div. 2) {353} PROGRAMMING 9145 1800
6847 Valera and Contest constructive algorithms implementation math Statement B Codeforces Round 216 (Div. 2) {369} PROGRAMMING Editorial Codeforces Round #216 (Div. 2) 1500
2597 Fox and Minimal path bitmasks constructive algorithms graphs implementation math Statement B Codeforces Round 228 (Div. 1) {388} PROGRAMMING Codeforces Round #228 — Editorial 2000
833 On Corruption and Numbers constructive algorithms implementation math Statement B Codeforces Round 232 (Div. 2) {397} PROGRAMMING 1000.0 Codeforces Round #232 Editorial (restored)
1196 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
6031 New Year Book Reading constructive algorithms greedy implementation math Statement C Good Bye 2014 {500} PROGRAMMING Tutorial 2 1600
12901 Exam constructive algorithms implementation math Statement A Codeforces Round 298 (Div. 2) {534} PROGRAMMING 1100
1498 Brackets in Implications constructive algorithms greedy implementation math Statement E Codeforces Round 306 (Div. 2) {550} PROGRAMMING Codeforces Round #306 (Div. 2) Editorial 2300
2263 Kyoya and Permutation binary search combinatorics constructive algorithms greedy implementation math Statement B Codeforces Round 309 (Div. 1) {553} PROGRAMMING Codeforces Round #309 Editorial 2200
7484 Pasha and Tea constructive algorithms implementation math sortings Statement B Codeforces Round 311 (Div. 2) {557} PROGRAMMING Codeforces Round #311 (Div.2) Editorial 1500
16850 Simple Game constructive algorithms games greedy implementation math Statement B Codeforces Round 316 (Div. 2) {570} PROGRAMMING Codeforces Round #316 Editorial 1300
4668 Three Logos bitmasks brute force constructive algorithms geometry implementation math Statement D Codeforces Round 322 (Div. 2) {581} PROGRAMMING Codeforces Round #322 (Div.2) Editorial 1700
678 Finals in arithmetic constructive algorithms implementation math Statement D Codeforces Round 342 (Div. 2) {625} PROGRAMMING Codeforces Round #342 (Div. 2) : editorial 2400
1713 International Olympiad constructive algorithms greedy implementation math Statement D CROC 2016 - Final Round [Private, For Onsite Finalists Only] {662} PROGRAMMING Editorial for CROC 2016 Finals and Codeforces Round #347 2000
3437 Recover the String constructive algorithms greedy implementation math Statement B AIM Tech Round 3 (Div. 1) {708} PROGRAMMING Editorial 1900
10157 Sanatorium binary search constructive algorithms greedy implementation math Statement C Codeforces Round 377 (Div. 2) {732} PROGRAMMING Codeforces Round #377 (Div. 2) Editorial 1300
88347 Buy a Shovel brute force constructive algorithms implementation math Statement A Codeforces Round 377 (Div. 2) {732} PROGRAMMING Codeforces Round #377 (Div. 2) Editorial 800
1399 Anton and School bitmasks constructive algorithms implementation math Statement F Codeforces Round 379 (Div. 2) {734} PROGRAMMING Tutorial of Codeforces Round #379 (Div. 2) 2600
3854 Tram constructive algorithms implementation math Statement C Codeforces Round 386 (Div. 2) {746} PROGRAMMING Codeforces Round #386 (Div.2) Editorial 1600
4050 Unfair Poll binary search constructive algorithms implementation math Statement C Codeforces Round 392 (Div. 2) {758} PROGRAMMING Codeforces Round #392 (Div. 2) Editorial 1700
15110 Dasha and Stairs brute force constructive algorithms implementation math Statement A Codeforces Round 394 (Div. 2) {761} PROGRAMMING Codeforces Round #394 (Div. 2) [Editorial] 1100
10866 Shell Game constructive algorithms implementation math Statement A Codeforces Round 401 (Div. 2) {777} PROGRAMMING Problem analysis of Codeforces Round #401 (Div. 2) 1100
338 Perpetual Motion Machine constructive algorithms dp graphs implementation math trees Statement E Codeforces Round 424 (Div. 1, rated, based on VK Cup Finals) {830} PROGRAMMING Codeforces Round #424 Editorial 3100
9929 Sonya and Exhibition constructive algorithms greedy implementation math Statement B Codeforces Round 495 (Div. 2) {1004} PROGRAMMING 60443 1400
514 Chips Puzzle constructive algorithms implementation math Statement E Mail.Ru Cup 2018 Round 1 {1054} PROGRAMMING Editorial 2400
1664 Olya and magical square constructive algorithms implementation math Statement D Codeforces Round 524 (Div. 2) {1080} PROGRAMMING Codeforces Round #524 (Div. 2) Editorial 2000
15891 Splitting into digits constructive algorithms implementation math Statement A Codeforces Round 534 (Div. 2) {1104} PROGRAMMING Codeforces Round #534 — Editorial 800
7174 Ramesses and Corner Inversion constructive algorithms greedy implementation math Statement C Codeforces Global Round 2 {1119} PROGRAMMING Codeforces Global Round 2 Editorial 1500
480 Once in a casino constructive algorithms greedy implementation math Statement B Codeforces Round 543 (Div. 1, based on Technocup 2019 Final Round) {1120} PROGRAMMING Разбор задач финала Технокубка 2019 и Codeforces Round #543 2700
8308 The Party and Sweets binary search constructive algorithms greedy implementation math sortings two pointers Statement A Codeforces Round 559 (Div. 1) {1158} PROGRAMMING 66993 1500
3868 Decreasing Debts constructive algorithms data structures graphs greedy implementation math two pointers Statement D Codeforces Global Round 6 {1266} PROGRAMMING Codeforces Global Round 6 Editorial 2000
294 Harry The Potter brute force constructive algorithms dp fft implementation math Statement F Codeforces Round 612 (Div. 1) {1286} PROGRAMMING Codeforces Round #612 - Editorial 3200
3265 Kuroni and the Score Distribution constructive algorithms greedy implementation math Statement E Ozon Tech Challenge 2020 (Div.1 + Div.2, Rated, T-shirts + prizes!) {1305} PROGRAMMING 2000.0 Ozon Tech Challenge 2020 Editorial 2100
7006 Different Rules binary search constructive algorithms greedy implementation math Statement B Codeforces Round 622 (Div. 2) {1313} PROGRAMMING 1000.0 Editorial 1700
9656 Dreamoon Likes Coloring constructive algorithms greedy implementation math Statement A Codeforces Round 631 (Div. 1) - Thanks, Denis aramis Shitov! {1329} PROGRAMMING 500.0 Codeforces Round #631 Editorial 1800
4128 Challenges in school №41 brute force constructive algorithms games graphs greedy implementation sortings Statement D Codeforces Round 632 (Div. 2) {1333} PROGRAMMING 1750.0 Codeforces Round #632 (Div. 2) editorial
3436 Perfect Triples bitmasks brute force constructive algorithms divide and conquer greedy implementation math Statement C Codeforces Round 633 (Div. 1) {1338} PROGRAMMING 1500.0 Editorial
21352 A Cookie for You constructive algorithms greedy implementation math Statement C Codeforces Round 654 (Div. 2) {1371} PROGRAMMING 1250.0 Codeforces Round #654 (Div. 2) Editorial
3494 Decryption bitmasks constructive algorithms implementation math number theory Statement E Codeforces Round 671 (Div. 2) {1419} PROGRAMMING 2250.0 Codeforces Round #671 Editorial
16949 Stairs brute force constructive algorithms greedy implementation math two pointers Statement B Codeforces Round 671 (Div. 2) {1419} PROGRAMMING 750.0 Codeforces Round #671 Editorial
28112 Numbers on Whiteboard constructive algorithms data structures games implementation math Statement C Educational Codeforces Round 96 (Rated for Div. 2) {1430} PROGRAMMING Educational Codeforces Round 96 — Editorial
10616 Nezzar and Symmetric Array constructive algorithms implementation math sortings Statement C Codeforces Round 698 (Div. 2) {1478} PROGRAMMING 1500.0 Tutorial 1700
4847 AB Graph constructive algorithms graphs greedy implementation strings Statement D Codeforces Round 699 (Div. 2) {1481} PROGRAMMING 2000.0 Codeforces Round #699 (Div. 2) Editorial
15386 Minimum Ties brute force constructive algorithms dfs and similar graphs greedy implementation math Statement C Educational Codeforces Round 104 (Rated for Div. 2) {1487} PROGRAMMING 87873
25540 Flip the Bits constructive algorithms greedy implementation math Statement B Codeforces Round 712 (Div. 2) {1504} PROGRAMMING 1000.0 Codeforces Round #712 Editorial 1200
4414 Almost Sorted binary search bitmasks combinatorics constructive algorithms dp implementation math Statement B Codeforces Round 715 (Div. 1) {1508} PROGRAMMING 1000.0 Codeforces Round #715 Editorial
6662 Binary Literature constructive algorithms greedy implementation math strings two pointers Statement A Codeforces Round 715 (Div. 1) {1508} PROGRAMMING 750.0 Codeforces Round #715 Editorial
2055 Excellent Arrays brute force combinatorics constructive algorithms implementation math Statement D Educational Codeforces Round 111 (Rated for Div. 2) {1550} PROGRAMMING Educational Codeforces Round 111 Editorial
2983 Domino (hard version) constructive algorithms implementation math Statement D2 Codeforces Round 734 (Div. 3) {1551} PROGRAMMING Editorial for Codeforces Round #734 (Div.3)
4842 Expression Evaluation Error constructive algorithms greedy implementation math Statement D Codeforces Round 742 (Div. 2) {1567} PROGRAMMING 1750.0 Codeforces Round #742 Editorial
368 Sweepstake *special brute force constructive algorithms implementation math Statement D Kotlin Heroes: Episode 8 {1571} PROGRAMMING Kotlin Heroes 8 Editorial
17061 Anti Light's Cell Guessing constructive algorithms implementation math Statement A Codeforces Global Round 17 {1610} PROGRAMMING 500.0 Codeforces Global Round 17 Editorial
3569 Grid Xor constructive algorithms greedy implementation interactive math Statement C Codeforces Round 767 (Div. 1) {1628} PROGRAMMING 1250.0 99276
4443 Reverse Sort Sum constructive algorithms data structures greedy implementation math two pointers Statement D Codeforces Round 782 (Div. 2) {1659} PROGRAMMING 2000.0 Codeforces Round #782 (Div. 2) Editorial
30685 Red Versus Blue constructive algorithms greedy implementation math Statement A Codeforces Round 782 (Div. 2) {1659} PROGRAMMING 500.0 Codeforces Round #782 (Div. 2) Editorial
16807 Log Chopping constructive algorithms games implementation math Statement A Codeforces Global Round 20 {1672} PROGRAMMING 250.0 Global Round 20 Editorial 800
16445 LIS or Reverse LIS? constructive algorithms greedy implementation math Statement C Codeforces Round 793 (Div. 2) {1682} PROGRAMMING 1500.0 Codeforces Round #793 (Div. 2) Editorial
19865 Palindromic Numbers constructive algorithms implementation math Statement B Codeforces Round 802 (Div. 2) {1700} PROGRAMMING 1000.0 103978 1100
154 Impressionism constructive algorithms graphs implementation math Statement E Codeforces Round 814 (Div. 1) {1718} PROGRAMMING 2250.0 Codeforces Round #814 (Div. 1, Div. 2) Editorial
17493 Bestie brute force constructive algorithms implementation math number theory Statement A Codeforces Round 830 (Div. 2) {1732} PROGRAMMING 750.0 108327 1000
14019 Permutation Operations constructive algorithms greedy implementation math Statement C Codeforces Global Round 23 {1746} PROGRAMMING 1000.0 Codeforces Global Round 23 Editorial
799 Inverse Transformation constructive algorithms implementation math Statement F TypeDB Forces 2023 (Div. 1 + Div. 2, Rated, Prizes!) {1787} PROGRAMMING 2500.0 TypeDB Forces 2023 (Div. 1 + Div. 2, Rated, Prizes!) Editorial
22292 Sum of Two Numbers constructive algorithms greedy implementation math Statement B Codeforces Round 851 (Div. 2) {1788} PROGRAMMING 1000.0 Codeforces Round #851 (Div. 2) Editorial
1399 City Union constructive algorithms dp geometry greedy implementation math Statement E Codeforces Round 854 by cybercats (Div. 1 + Div. 2) {1799} PROGRAMMING 2250.0 Codeforces Round #854 Editorial
6910 Double Lexicographically Minimum constructive algorithms greedy implementation strings Statement C Codeforces Round 854 by cybercats (Div. 1 + Div. 2) {1799} PROGRAMMING 1500.0 Codeforces Round #854 Editorial
8623 Umka and a Long Flight constructive algorithms implementation math Statement D Codeforces Round 863 (Div. 3) {1811} PROGRAMMING 114788
3593 Sum Graph constructive algorithms graphs implementation interactive math shortest paths trees Statement B Codeforces Round 865 (Div. 1) {1815} PROGRAMMING 1250.0 Editorial of Codeforces Round #865 2000
1733 The Fox and the Complete Tree Traversal constructive algorithms dp games implementation math trees Statement C Codeforces Round 866 (Div. 1) {1819} PROGRAMMING 1500.0 Codeforces Round #866 (Div.1, Div.2, based on Lipetsk Team Olympiad) Editorial
2332 Red-Blue Operations (Hard Version) binary search constructive algorithms greedy implementation math Statement D2 Educational Codeforces Round 148 (Rated for Div. 2) {1832} PROGRAMMING 116454 2400
17822 Particles constructive algorithms greedy implementation math Statement C Codeforces Round 884 (Div. 1 + Div. 2) {1844} PROGRAMMING 1250.0 Codeforces Round #884 (Div. 1 + Div. 2) Editorial
31471 Escalator Conversations brute force constructive algorithms implementation math Statement A Codeforces Round 888 (Div. 3) {1851} PROGRAMMING 118667
27370 Good Arrays constructive algorithms implementation math Statement B Codeforces Round 890 (Div. 2) supported by Constructor Institute {1856} PROGRAMMING 750.0 Codeforces Round #890 (Div. 2) Editorial
21401 Increasing and Decreasing constructive algorithms implementation math Statement A Harbour.Space Scholarship Contest 2023-2024 (Div. 1 + Div. 2) {1864} PROGRAMMING 500.0 Harbour.Space Scholarship Contest 2023-2024 (Div. 1 + Div. 2) Editorial
2739 Candy Party (Hard Version) bitmasks constructive algorithms dp graphs greedy implementation math Statement B2 Codeforces Round 896 (Div. 1) {1868} PROGRAMMING 750.0 Codeforces Round 896 (Div. 1, Div. 2) Editorial
8299 Candy Party (Easy Version) bitmasks constructive algorithms graphs greedy implementation math Statement B1 Codeforces Round 896 (Div. 1) {1868} PROGRAMMING 500.0 Codeforces Round 896 (Div. 1, Div. 2) Editorial
1565 Interactive Game with Coloring brute force constructive algorithms graphs implementation interactive math trees Statement E Educational Codeforces Round 155 (Rated for Div. 2) {1879} PROGRAMMING 120773 2400
4598 Cyclic MEX binary search constructive algorithms data structures implementation math two pointers Statement D Codeforces Round 915 (Div. 2) {1905} PROGRAMMING 2000.0 Codeforces Round 915 (Div. 2) Editorial
1271 Evaluate It and Back Again constructive algorithms implementation math Statement E 2023-2024 ICPC, NERC, Northern Eurasia Onsite (Unrated, Online Mirror, ICPC Rules, Teams Preferred) {1912} PROGRAMMING Tutorials (PDF) 2200
9745 Mathematical Problem brute force constructive algorithms implementation math strings Statement D Good Bye 2023 {1916} PROGRAMMING 1500.0
19841 Training Before the Olympiad constructive algorithms games implementation math Statement C Good Bye 2023 {1916} PROGRAMMING 1250.0
28259 2023 constructive algorithms implementation math number theory Statement A Good Bye 2023 {1916} PROGRAMMING 250.0
32303 Brick Wall constructive algorithms greedy implementation math Statement A Codeforces Round 922 (Div. 2) {1918} PROGRAMMING 500.0 Codeforces Round #922 (Div. 2) Editorial
2088 Modular Sequence constructive algorithms dp greedy implementation math number theory Statement E Codeforces Round 924 (Div. 2) {1928} PROGRAMMING 2250.0 Codeforces Round 924 Editorial
4466 No Palindromes brute force constructive algorithms greedy hashing implementation strings Statement E Codeforces Global Round 25 {1951} PROGRAMMING 2250.0 Codeforces Global Round 25 Editorial
22006 Two Friends constructive algorithms implementation math Statement A Educational Codeforces Round 165 (Rated for Div. 2) {1969} PROGRAMMING Educational Codeforces Round 165 Editorial 800
9828 Cat, Fox and Double Maximum constructive algorithms greedy implementation math sortings Statement C Codeforces Round 945 (Div. 2) {1973} PROGRAMMING 1500.0 Editorial for Codeforces Round #945 (Div. 2) 1700
17750 Manhattan Permutations constructive algorithms greedy implementation math Statement C Codeforces Round 953 (Div. 2) {1978} PROGRAMMING 1250.0 130527
6329 Turtle and an Incomplete Sequence bitmasks constructive algorithms greedy implementation math Statement C Codeforces Round 949 (Div. 2) {1981} PROGRAMMING 1500.0 Simplified Chinese Tutorial
18365 Corner Twist constructive algorithms greedy implementation math Statement B Codeforces Round 956 (Div. 2) and ByteRace 2024 {1983} PROGRAMMING 1000.0
20911 Large Addition constructive algorithms implementation math Statement B Codeforces Global Round 26 {1984} PROGRAMMING 750.0 Codeforces Global Round 26 Editorial
10254 Squaring brute force constructive algorithms data structures greedy implementation math number theory Statement C Codeforces Round 961 (Div. 2) {1995} PROGRAMMING 1750.0 Video Tutorial
26098 Find K Distinct Points with Fixed Center constructive algorithms implementation math Statement A Codeforces Round 965 (Div. 2) {1998} PROGRAMMING 500.0 Video Tutorial
21297 Distanced Coloring constructive algorithms implementation math Statement A EPIC Institute of Technology Round August 2024 (Div. 1 + Div. 2) {2002} PROGRAMMING 500.0 EPIC Institute of Technology Round August 2024 (Div. 1 + Div. 2) Editorial
1389 Balanced constructive algorithms data structures implementation math Statement E Codeforces Round 983 (Div. 2) {2032} PROGRAMMING 2250.0 Codeforces Round 983 (Div. 2) Editorial
20539 Medians constructive algorithms greedy hashing implementation math Statement B Codeforces Round 983 (Div. 2) {2032} PROGRAMMING 750.0 Codeforces Round 983 (Div. 2) Editorial
2015 Permutations Harmony brute force combinatorics constructive algorithms greedy hashing implementation math Statement E Rayan Programming Contest 2024 - Selection (Codeforces Round 989, Div. 1 + Div. 2) {2034} PROGRAMMING 2000.0 Rayan 2024 Selection Round Editorial
14621 Kevin and Geometry brute force constructive algorithms data structures geometry greedy implementation math two pointers Statement B IAEPC Preliminary Contest (Codeforces Round 999, Div. 1 + Div. 2) {2061} PROGRAMMING 1000.0 IAEPC Preliminary Contest (Codeforces Round 999, Div. 1 + Div. 2) Editorial
1073 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
3642 Finding OR Sum bitmasks constructive algorithms implementation interactive math Statement B Codeforces Round 1008 (Div. 1) {2077} PROGRAMMING 1000.0 Codeforces Round 1008 (Div. 1, Div. 2) Editorial
18221 Vicious Labyrinth constructive algorithms graphs greedy implementation math Statement B Codeforces Round 1008 (Div. 2) {2078} PROGRAMMING 750.0 Codeforces Round 1008 (Div. 1, Div. 2) Editorial
12003 Maximum Subarray Sum binary search constructive algorithms implementation math Statement C Codeforces Round 1023 (Div. 2) {2107} PROGRAMMING 1500.0 Codeforces Round 1023 (Div 2) Editorial
14479 SUMdamental Decomposition bitmasks constructive algorithms greedy implementation math Statement B Codeforces Round 1022 (Div. 2) {2108} PROGRAMMING 1250.0 Codeforces Round 1022 Editorial
104 Inter Active (Hard Version) binary search bitmasks constructive algorithms graphs implementation interactive math probabilities Statement G2 Atto Round 1 (Codeforces Round 1041, Div. 1 + Div. 2) {2127} PROGRAMMING 2750.0 Atto Round 1 (Codeforces Round 1041, Div. 1 + Div. 2) Editorial
26457 Painting With Two Colors constructive algorithms implementation math Statement A Codeforces Round 1045 (Div. 2) {2134} PROGRAMMING 500.0 145832
3246 Palindrome Flipping brute force constructive algorithms implementation strings Statement D Codeforces Round 1067 (Div. 2) {2158} PROGRAMMING 2000.0 Codeforces Round 1067 (Div. 2) Editorial
2251 Removal of a Sequence (Hard Version) binary search constructive algorithms divide and conquer greedy implementation math number theory probabilities Statement D2 Educational Codeforces Round 184 (Rated for Div. 2) {2169} PROGRAMMING Educational Codeforces Round 184 Editorial