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.

Get exact match for tags using this format, eg: [u'brute force', 'dp']

1 2 >

Solved
Name
Tags
Solutions
Index
Contest
Type
Points
Tutorial
Rating Level
17472 Neighbor Grid constructive algorithms greedy Statement B Codeforces Global Round 9 {1375} PROGRAMMING 750.0 79731
21772 Element Extermination constructive algorithms greedy Statement C Codeforces Global Round 9 {1375} PROGRAMMING 1500.0 79731
2529 Koa and the Beach (Hard Version) constructive algorithms greedy Statement B2 Codeforces Round 659 (Div. 2) {1384} PROGRAMMING 750.0 Codeforces Round #659 Editorial
18897 Binary String To Subsequences constructive algorithms data structures greedy Statement D Codeforces Round 661 (Div. 3) {1399} PROGRAMMING Codeforces Round #661 (Div. 3) Editorial
18036 Pokémon Army (easy version) constructive algorithms dp greedy Statement C1 Codeforces Round 672 (Div. 2) {1420} PROGRAMMING 1000.0 Editorial
16551 Non-zero Segments constructive algorithms data structures greedy Statement D Codeforces Round 674 (Div. 3) {1426} PROGRAMMING 83120 1500
4562 Bouncing Boomerangs constructive algorithms greedy Statement D Codeforces Raif Round 1 (Div. 1 + Div. 2) {1428} PROGRAMMING 1500.0 Codeforces Raif Round 1 Editorial
27559 Dominant Piranha constructive algorithms greedy Statement C Codeforces Round 677 (Div. 3) {1433} PROGRAMMING Codeforces Round #677 (Div. 3) Editorial
19788 Reverse Binary Strings constructive algorithms greedy Statement B Educational Codeforces Round 97 (Rated for Div. 2) {1437} PROGRAMMING 84149
1376 The Struggling Contestant constructive algorithms greedy Statement F Codeforces Global Round 12 {1450} PROGRAMMING 2750.0 Codeforces Global Round 12 Editorial
334 Divide Powers constructive algorithms greedy Statement F Educational Codeforces Round 98 (Rated for Div. 2) {1452} PROGRAMMING 84847
583 Mathematical Expression constructive algorithms dp greedy Statement F Codeforces Round 689 (Div. 2, based on Zed Code Competition) {1461} PROGRAMMING 2750.0 Codeforces Round #689 (Div. 2). Editorial
18694 String Generation constructive algorithms greedy Statement A Codeforces Round 689 (Div. 2, based on Zed Code Competition) {1461} PROGRAMMING 500.0 Codeforces Round #689 (Div. 2). Editorial
28285 Regular Bracket Sequence constructive algorithms greedy Statement A Educational Codeforces Round 101 (Rated for Div. 2) {1469} PROGRAMMING Educational Codeforces Round 101 Editorial
1371 What Is It? constructive algorithms greedy Statement E Codeforces Round 696 (Div. 2) {1474} PROGRAMMING 2250.0 Codeforces Round #696 Editorial
11630 Longest Simple Cycle constructive algorithms dp graphs greedy Statement C Educational Codeforces Round 103 (Rated for Div. 2) {1476} PROGRAMMING 87356
19469 Anti-knapsack constructive algorithms greedy Statement A Codeforces Round 705 (Div. 2) {1493} PROGRAMMING 750.0 Codeforces Round #705 (Div.2) Editorial
13764 Balance the Bits constructive algorithms greedy Statement A Codeforces Round 712 (Div. 1) {1503} PROGRAMMING 750.0 T 1600
13530 Restoring the Permutation constructive algorithms data structures ds greedy Statement E Codeforces Round 710 (Div. 3) {1506} PROGRAMMING Editorial
22953 Epic Transformation constructive algorithms greedy Statement D Codeforces Round 710 (Div. 3) {1506} PROGRAMMING Editorial
23214 Corrupted Array constructive algorithms data structures greedy Statement D Codeforces Round 713 (Div. 3) {1512} PROGRAMMING Codeforces Round #713 (Div. 3) Editorial
17720 Phoenix and Towers constructive algorithms data structures greedy Statement C Codeforces Global Round 14 {1515} PROGRAMMING 1500.0 Editorial
25433 Permutation Sort constructive algorithms greedy Statement B Educational Codeforces Round 109 (Rated for Div. 2) {1525} PROGRAMMING 90793
30160 Eshag Loves Big Arrays constructive algorithms greedy Statement A Codeforces Round 722 (Div. 2) {1529} PROGRAMMING 500.0 Codeforces Round #722 Editorial
423 The Final Pursuit constructive algorithms graphs greedy Statement E Codeforces Round 730 (Div. 2) {1543} PROGRAMMING 3000.0 Codeforces Round #730 (Div. 2) Editorial
3446 Bottom-Tier Reversals constructive algorithms greedy Statement C Codeforces Round 740 (Div. 1, based on VK Cup 2021 - Final (Engine)) {1558} PROGRAMMING 1500.0 Codeforces Round #740 Editorial 2000
2300 Moment of Bloom constructive algorithms dfs and similar graph matchings graphs greedy Statement E Technocup 2022 - Elimination Round 1 {1583} PROGRAMMING 2250.0 Editorial for Technocup 2022 — Elimination Round 1 and Codeforces Round #749 (Div. 1+Div. 2)
14535 Banknotes constructive algorithms greedy Statement C Educational Codeforces Round 116 (Rated for Div. 2) {1606} PROGRAMMING 96454
12035 Build the Permutation constructive algorithms greedy Statement B Codeforces Round 758 (Div.1 + Div. 2) {1608} PROGRAMMING 750.0 Editorial of Codeforces Round #758 (Div.1 + Div. 2)
19321 Differential Sorting constructive algorithms greedy Statement C Codeforces Round 772 (Div. 2) {1635} PROGRAMMING 1500.0 Codeforces Round #772 Editorial
18177 Andrew and Stones constructive algorithms greedy Statement C Codeforces Global Round 19 {1637} PROGRAMMING 1500.0 Tutorial
12914 Madoka and Childish Pranks constructive algorithms greedy Statement C Codeforces Round 777 (Div. 2) {1647} PROGRAMMING 1500.0 Codeforces Round #777 Editorial
19877 Prove Him Wrong constructive algorithms greedy Statement B Educational Codeforces Round 124 (Rated for Div. 2) {1651} PROGRAMMING Educational Codeforces Round 124 Editorial
3239 Array Shuffling constructive algorithms graphs greedy Statement F1 Codeforces Global Round 20 {1672} PROGRAMMING 1250.0 Global Round 20 Editorial 2000
1011 Zigu Zagu constructive algorithms greedy Statement H Codeforces Global Round 20 {1672} PROGRAMMING 3000.0 Global Round 20 Editorial 2700
3751 Tokitsukaze and Two Colorful Tapes constructive algorithms dfs and similar ds graphs greedy Statement C Codeforces Round 789 (Div. 1) {1677} PROGRAMMING 1250.0 Tutorial
1143 Bring Balance constructive algorithms greedy Statement C Codeforces Round 794 (Div. 1) {1685} PROGRAMMING 1500.0 103198 2600
114 Permutation Weight (Hard Version) constructive algorithms greedy Statement D2 Codeforces Round 794 (Div. 1) {1685} PROGRAMMING 1500.0 103198 3500
34352 Print a Pedestal (Codeforces logo?) constructive algorithms greedy Statement A Codeforces Round 797 (Div. 3) {1690} PROGRAMMING Codeforces Round #797 (Div. 3) Editorial 800
19707 Paranoid String constructive algorithms greedy Statement B Codeforces Round 800 (Div. 2) {1694} PROGRAMMING 1000.0 Codeforces Round #800 Editorial 1200
11346 Helping the Nature constructive algorithms greedy Statement C Codeforces Round 802 (Div. 2) {1700} PROGRAMMING 1500.0 103978 1700
16249 Two 0-1 Sequences constructive algorithms greedy Statement A CodeTON Round 2 (Div. 1 + Div. 2, Rated, Prizes!) {1704} PROGRAMMING 500.0 CodeTON Round 2 Editorial
11351 Color the Picture constructive algorithms greedy Statement A Codeforces Round 810 (Div. 1) {1710} PROGRAMMING 500.0 Codeforces Round #810 Editorial
15111 Madoka and Underground Competitions constructive algorithms greedy Statement B Codeforces Round 818 (Div. 2) {1717} PROGRAMMING 1000.0 Codeforces Round #818 (Div. 2) Editorial. 1100
20330 Best Permutation constructive algorithms greedy Statement B Educational Codeforces Round 135 (Rated for Div. 2) {1728} PROGRAMMING 106805
1129 House Planning constructive algorithms data structures flows graph matchings greedy Statement E Codeforces Round 824 (Div. 2) {1735} PROGRAMMING 2250.0 Codeforces Round #824 — editorial
486 Anti-Increasing Addicts constructive algorithms dfs and similar dp greedy Statement G Codeforces Global Round 22 {1738} PROGRAMMING 3000.0 Editorial of Codeforces Global Round <strong>22</strong>
20233 Maxmina constructive algorithms greedy Statement A Codeforces Global Round 23 {1746} PROGRAMMING 500.0 Codeforces Global Round 23 Editorial
17718 Rebellion constructive algorithms greedy Statement B Codeforces Global Round 23 {1746} PROGRAMMING 1000.0 Codeforces Global Round 23 Editorial
25606 Two Groups constructive algorithms greedy Statement A Codeforces Round 832 (Div. 2) {1747} PROGRAMMING 500.0 Codeforces Round #832 (Div. 2) Editorial
15574 Make Nonzero Sum (easy version) constructive algorithms dp greedy Statement A1 Codeforces Round 829 (Div. 1) {1753} PROGRAMMING 500.0 Tutorial 1300
10857 Make Nonzero Sum (hard version) constructive algorithms dp greedy Statement A2 Codeforces Round 829 (Div. 1) {1753} PROGRAMMING 500.0 Tutorial 1500
10039 Set Construction constructive algorithms dfs and similar graphs greedy Statement C Pinely Round 1 (Div. 1 + Div. 2) {1761} PROGRAMMING 1250.0 Pinely Round 1 (Div. 1 + Div. 2) Editorial
1946 Make It Connected constructive algorithms graphs greedy Statement E Pinely Round 1 (Div. 1 + Div. 2) {1761} PROGRAMMING 1750.0 Pinely Round 1 (Div. 1 + Div. 2) Editorial
12497 Ice and Fire constructive algorithms dp greedy Statement C Polynomial Round 2022 (Div. 1 + Div. 2, Rated, Prizes!) {1774} PROGRAMMING 1500.0 Polynomial Round 2022 (Div. 1 + Div. 2) Editorial
12924 Coloring constructive algorithms greedy Statement B Polynomial Round 2022 (Div. 1 + Div. 2, Rated, Prizes!) {1774} PROGRAMMING 1000.0 Polynomial Round 2022 (Div. 1 + Div. 2) Editorial
3700 Train Splitting constructive algorithms graphs greedy Statement F SWERC 2022-2023 - Online Mirror (Unrated, ICPC Rules, Teams Preferred) {1776} PROGRAMMING
8309 Boris and His Amazing Haircut constructive algorithms data structures dp ds greedy Statement D Hello 2023 {1779} PROGRAMMING 1500.0
22072 Hayato and School constructive algorithms greedy Statement A Codeforces Round 846 (Div. 2) {1780} PROGRAMMING 500.0 111841
18151 Li Hua and Maze constructive algorithms greedy Statement A Codeforces Round 864 (Div. 2) {1797} PROGRAMMING 500.0 Codeforces Round 864 (Div. 2) Editorial
18042 Li Hua and Pattern constructive algorithms greedy Statement B Codeforces Round 864 (Div. 2) {1797} PROGRAMMING 1000.0 Codeforces Round 864 (Div. 2) Editorial
18589 Mex Master constructive algorithms greedy Statement B Codeforces Round 858 (Div. 2) {1806} PROGRAMMING 1000.0 Codeforces Round #858 (Div. 2) Editorial
20987 Restore the Array constructive algorithms greedy Statement C Codeforces Round 863 (Div. 3) {1811} PROGRAMMING 114788
15838 Grid Reconstruction constructive algorithms greedy Statement B Codeforces Round 865 (Div. 2) {1816} PROGRAMMING 1000.0 Editorial of Codeforces Round #865 1000
122 Copium Permutation constructive algorithms data structures greedy Statement F Codeforces Round 873 (Div. 1) {1827} PROGRAMMING 3500.0 Codeforces Round #873 (Div. 1 & 2) Editorial 3500
24130 Array merging constructive algorithms greedy Statement B Codeforces Round 875 (Div. 2) {1831} PROGRAMMING 750.0 Codeforces Round #875 (Div.1 + Div. 2) Editorial
16672 Bracket Coloring constructive algorithms data structures greedy Statement D Educational Codeforces Round 149 (Rated for Div. 2) {1837} PROGRAMMING 116752
22954 Best Binary String constructive algorithms greedy Statement C Educational Codeforces Round 149 (Rated for Div. 2) {1837} PROGRAMMING 116752
12592 Insert Zero and Invert Prefix constructive algorithms greedy Statement C Codeforces Round 876 (Div. 2) {1839} PROGRAMMING 1500.0 Codeforces Round #876 (Div. 2) Editorial
512 Miriany and Matchstick constructive algorithms dp greedy Statement D Codeforces Round 887 (Div. 1) {1852} PROGRAMMING 2000.0 Codeforces Round 887 (Div 1, Div 2) Tutorial
22422 Two Binary Strings constructive algorithms dfs and similar greedy Statement B Educational Codeforces Round 154 (Rated for Div. 2) {1861} PROGRAMMING Educational Codeforces Round 154 Editorial
11533 Kolya and Movie Theatre constructive algorithms data structures greedy Statement E Codeforces Round 894 (Div. 3) {1862} PROGRAMMING Tutorial
9983 Two-Colored Dominoes constructive algorithms greedy Statement D Pinely Round 2 (Div. 1 + Div. 2) {1863} PROGRAMMING 1250.0
23521 Chips on the Board constructive algorithms greedy Statement B Educational Codeforces Round 155 (Rated for Div. 2) {1879} PROGRAMMING 120773 900
14036 Qingshan Loves Strings 2 constructive algorithms greedy Statement A Codeforces Round 906 (Div. 1) {1889} PROGRAMMING 750.0 Codeforces Round 906 Editorial
12990 Theofanis' Nightmare constructive algorithms dp greedy Statement C Codeforces Round 912 (Div. 2) {1903} PROGRAMMING 1500.0 Codeforces Round #912 (Div. 2) Editorial
16506 Find B constructive algorithms data structures greedy Statement C Educational Codeforces Round 162 (Rated for Div. 2) {1923} PROGRAMMING Educational Codeforces Round 162 Editorial
3179 Clique Partition constructive algorithms graphs greedy Statement E Educational Codeforces Round 163 (Rated for Div. 2) {1948} PROGRAMMING Educational Codeforces Round 163 Editorial
85 Growing Trees constructive algorithms flows graphs greedy Statement I Codeforces Global Round 25 {1951} PROGRAMMING 4000.0 Codeforces Global Round 25 Editorial
24410 Stickogon constructive algorithms greedy Statement A Codeforces Round 940 (Div. 2) and CodeCraft-23 {1957} PROGRAMMING 500.0 Codeforces Round #940 and CodeCraft-23 (Div. 2) Editorial 800
18681 Card Exchange constructive algorithms games greedy Statement A Codeforces Round 941 (Div. 2) {1966} PROGRAMMING 500.0 Codeforces Round #941 (Div. 1, Div. 2) Editorial 800
20447 Shifts and Sorting constructive algorithms greedy Statement B Educational Codeforces Round 165 (Rated for Div. 2) {1969} PROGRAMMING Educational Codeforces Round 165 Editorial 1000
19870 Sofia and the Lost Operations constructive algorithms greedy Statement C Codeforces Round 950 (Div. 3) {1980} PROGRAMMING 130135
17999 Array Craft constructive algorithms greedy Statement B Codeforces Round 960 (Div. 2) {1990} PROGRAMMING 1000.0 Video Tutorial
645 Grid Reset constructive algorithms greedy Statement G Pinely Round 4 (Div. 1 + Div. 2) {1991} PROGRAMMING 3000.0 Video Tutorial
24255 Parity and Sum constructive algorithms greedy Statement B Codeforces Round 963 (Div. 2) {1993} PROGRAMMING 1000.0
20982 Diverse Game constructive algorithms greedy Statement A Codeforces Round 959 sponsored by NEAR (Div. 1 + Div. 2) {1994} PROGRAMMING 500.0 Video Tutorial
23547 Simple Palindrome constructive algorithms greedy Statement A Codeforces Round 972 (Div. 2) {2005} PROGRAMMING 750.0
12690 Adjust The Presentation (Easy Version) constructive algorithms greedy Statement C1 Codeforces Round 977 (Div. 2, based on COMPFEST 16 - Final Round) {2021} PROGRAMMING 750.0
762 Palindrome Everywhere constructive algorithms greedy Statement F Refact.ai Match 1 (Codeforces Round 985) {2029} PROGRAMMING 3000.0
25849 Sakurako and Water constructive algorithms greedy Statement B Codeforces Round 981 (Div. 3) {2033} PROGRAMMING
74 Yandex Cuneiform (Easy Version) constructive algorithms data structures greedy Statement F1 Codeforces Round 990 (Div. 1) {2046} PROGRAMMING 2000.0
61 Yandex Cuneiform (Hard Version) constructive algorithms data structures greedy Statement F2 Codeforces Round 990 (Div. 1) {2046} PROGRAMMING 2500.0
161 Cheops and a Contest (Easy Version) constructive algorithms greedy Statement E1 Codeforces Round 990 (Div. 1) {2046} PROGRAMMING 2000.0
2850 Kevin and Bipartite Graph constructive algorithms graphs greedy Statement E Codeforces Global Round 28 {2048} PROGRAMMING 1750.0
18199 Kevin and Permutation constructive algorithms greedy Statement B Codeforces Global Round 28 {2048} PROGRAMMING 500.0
365 Haystacks constructive algorithms data structures greedy Statement E Codeforces Round 996 (Div. 2) {2055} PROGRAMMING 3000.0
30039 Two Frogs constructive algorithms games greedy Statement A Codeforces Round 996 (Div. 2) {2055} PROGRAMMING 500.0
25500 MEX Table constructive algorithms greedy Statement A Hello 2025 {2057} PROGRAMMING 500.0
16776 Variety is Discouraged constructive algorithms constructive algorithms greedy greedy Statement B Codeforces Round 1005 (Div. 2) {2064} PROGRAMMING 1000.0