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
371 Archer's Shot binary search geometry math two pointers Statement D Codeforces Beta Round 70 (Div. 2) {78} PROGRAMMING Solutions for Codeforces Beta Round #70 (Div. 2) 2400
16786 Powerful array data structures implementation math two pointers Statement D Yandex.Algorithm 2011: Round 2 {86} PROGRAMMING Problemset analysis (Yandex, Round 2) 2700
13783 Another Problem on Strings binary search brute force dp math strings two pointers Statement C Codeforces Round 112 (Div. 2) {165} PROGRAMMING Codeforces Round #112 (Div. 2) Tutorial 1600
261 Ksusha and Square geometry math probabilities two pointers Statement D Croc Champ 2013 - Round 2 {293} PROGRAMMING Croc Champ 2013 — Round 2 — Editorial 2700
529 Morning run binary search math two pointers Statement A Croc Champ 2013 - Finals (online version, Div. 1) {309} PROGRAMMING Чемпионат КРОК 2013 — Финальный раунд — Разбор 2000
5705 Pair of Numbers binary search brute force data structures math two pointers Statement D Codeforces Round 209 (Div. 2) {359} PROGRAMMING Editorial Codeforces Round #209 (Div. 2) 2100
1436 Subway Innovation greedy math two pointers Statement E Codeforces Round 218 (Div. 2) {371} PROGRAMMING Codeforces Round #218 (Div. 2): Tutorial 2200
272 Hamming Triples implementation math two pointers Statement E Codeforces Round 238 (Div. 1) {406} PROGRAMMING Codeforces Round #238 Tutorial 2700
7709 Maximum Value binary search math sortings two pointers Statement B Codeforces Round 276 (Div. 1) {484} PROGRAMMING Codeforces Round #276 — Editorial 2100
1060 Sleep in Class constructive algorithms data structures math two pointers Statement E Codeforces Round 378 (Div. 2) {733} PROGRAMMING Codeforces Round #378 (Div. 2) editorial 2500
1306 Bamboo Partition brute force data structures implementation math number theory sortings two pointers Statement C Codeforces Round 424 (Div. 1, rated, based on VK Cup Finals) {830} PROGRAMMING Codeforces Round #424 Editorial 2500
2641 Random Query data structures math probabilities two pointers Statement F Educational Codeforces Round 28 {846} PROGRAMMING 54357 2000
3808 XK Segments binary search math sortings two pointers Statement B Codeforces Round 448 (Div. 2) {895} PROGRAMMING Codeforces Round #448(Div.2) Editorial 1700
2037 Prime Gift binary search dfs and similar math meet-in-the-middle number theory two pointers Statement E Codeforces Round 456 (Div. 2) {912} PROGRAMMING Codeforces Round #456 (Div. 2) Editorial 2600
9955 Swap Adjacent Elements dfs and similar greedy math sortings two pointers Statement C Educational Codeforces Round 37 (Rated for Div. 2) {920} PROGRAMMING T 1500
536 A Shade of Moonlight binary search geometry math sortings two pointers Statement D Codeforces Round 487 (Div. 2) {989} PROGRAMMING Codeforces Round #487 (Div. 2) Editorial 2500
13039 Reorder the Array combinatorics data structures math sortings two pointers Statement A Codeforces Round 497 (Div. 1) {1007} PROGRAMMING Editorial for Codeforces Round #497 by Skyglow 1300
4757 Mysterious Crime brute force combinatorics math meet-in-the-middle two pointers Statement D Codeforces Round 519 by Botan Investments {1043} PROGRAMMING Codeforces Round #519 Editorial 1700
1819 Earth Wind and Fire constructive algorithms greedy math sortings two pointers Statement E Codeforces Global Round 3 {1148} PROGRAMMING Codeforces Global Round 3 Editorial 2300
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
5160 Count Pairs math matrices number theory two pointers Statement B Codeforces Round 572 (Div. 1) {1188} PROGRAMMING Editorial of Codeforces Round #572 2200
5004 Send Boxes to Alice (Easy Version) constructive algorithms greedy math number theory ternary search two pointers Statement B1 Codeforces Round 601 (Div. 1) {1254} PROGRAMMING Codeforces Round #601 Editorial 2000
3416 Send Boxes to Alice (Hard Version) constructive algorithms greedy math number theory ternary search two pointers Statement B2 Codeforces Round 601 (Div. 1) {1254} PROGRAMMING Codeforces Round #601 Editorial 2100
13513 Beautiful Numbers data structures implementation math two pointers Statement B Codeforces Round 604 (Div. 2) {1265} PROGRAMMING Codeforces Round #604 Editorial 1300
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
4566 Kate and imperfection greedy implementation math number theory sortings two pointers Statement F Codeforces Round 632 (Div. 2) {1333} PROGRAMMING 2500.0 Codeforces Round #632 (Div. 2) editorial
12116 Xenia and Colorful Gems binary search greedy math sortings two pointers Statement B Codeforces Round 635 (Div. 1) {1336} PROGRAMMING 750.0 Codeforces Round #635 Editorial 1800
11912 Count Triangles binary search implementation math two pointers Statement C Codeforces Round 643 (Div. 2) {1355} PROGRAMMING 1250.0 Codeforces Round #643 (Div. 2) Editorial 1800
27779 Shuffle math two pointers Statement B Educational Codeforces Round 89 (Rated for Div. 2) {1366} PROGRAMMING Educational Codeforces Round 89 Editorial
30895 Zero Remainder Array math sortings two pointers Statement D Codeforces Round 653 (Div. 3) {1374} PROGRAMMING 79517
6072 Choosing flowers binary search data structures greedy math sortings two pointers Statement C Codeforces Round 657 (Div. 2) {1379} PROGRAMMING 1250.0 Codeforces Round #657 Editorial 2000
1152 Mercenaries bitmasks combinatorics data structures math two pointers Statement G Educational Codeforces Round 94 (Rated for Div. 2) {1400} PROGRAMMING 81942
11360 Zigzags brute force data structures dp math two pointers Statement D Educational Codeforces Round 94 (Rated for Div. 2) {1400} PROGRAMMING 81942
14616 Chocolate Bunny constructive algorithms interactive math two pointers Statement C Codeforces Round 669 (Div. 2) {1407} PROGRAMMING 1500.0 Codeforces Round #669 Editorial
9264 Discrete Acceleration binary search implementation math two pointers Statement C Grakn Forces 2020 {1408} PROGRAMMING 1250.0 Grakn Forces -- Editorial
423 Equal Product data structures math number theory two pointers Statement F Educational Codeforces Round 95 (Rated for Div. 2) {1418} PROGRAMMING Unofficial Editorial for Educational Round 95 (Div. 2)
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
11337 Close Tuples (hard version) binary search combinatorics implementation math sortings two pointers Statement E2 Codeforces Round 690 (Div. 3) {1462} PROGRAMMING Codeforces Round #690 (Div. 3) Editorial
15198 Close Tuples (easy version) binary search combinatorics math sortings two pointers Statement E1 Codeforces Round 690 (Div. 3) {1462} PROGRAMMING Codeforces Round #690 (Div. 3) Editorial
5726 GCD of an Array data structures math number theory sortings two pointers Statement D Codeforces Round 705 (Div. 2) {1493} PROGRAMMING 2250.0 Codeforces Round #705 (Div.2) 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
17530 Maximum Sum of Products brute force dp implementation math ternary search two pointers Statement D Educational Codeforces Round 108 (Rated for Div. 2) {1519} PROGRAMMING Educational Codeforces Round 108 Editorial
34236 Number of Pairs binary search data structures math two pointers Statement C Codeforces Round 725 (Div. 3) {1538} PROGRAMMING Codeforces Round #725 (Div. 3) Editorial
11305 Integers Have Friends binary search data structures math number theory two pointers Statement B Codeforces Round 736 (Div. 1) {1548} PROGRAMMING 1000.0 Codeforces Round 736 Editorial
1916 Bored Bakry bitmasks greedy math two pointers Statement E Codeforces Round 746 (Div. 2) {1592} PROGRAMMING 2500.0 95583
4634 Shuffle combinatorics math two pointers Statement D Educational Codeforces Round 120 (Rated for Div. 2) {1622} PROGRAMMING Educational Codeforces Round 120 Editorial
5313 New Year Concert binary search data structures dp greedy math number theory two pointers Statement D Codeforces Round 769 (Div. 2) {1632} PROGRAMMING 2000.0 Editorial of Codeforces Round #769
26630 Subtract Operation constructive algorithms data structures math two pointers Statement B CodeTON Round 1 (Div. 1 + Div. 2, Rated, Prizes!) {1656} PROGRAMMING 1000.0 Tutorial
5282 For Gamers. By Gamers. binary search dp math sortings two pointers Statement D Educational Codeforces Round 125 (Rated for Div. 2) {1657} PROGRAMMING 101161
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
16948 Price Maximization binary search greedy math two pointers Statement E Codeforces Round 797 (Div. 3) {1690} PROGRAMMING Codeforces Round #797 (Div. 3) Editorial 1500
203 Maximum Product? brute force combinatorics dp greedy math two pointers Statement H Codeforces Global Round 21 {1696} PROGRAMMING 4000.0 Editorial of Codeforces Global Round 21
10712 The Third Problem combinatorics math two pointers Statement C Codeforces Round 804 (Div. 2) {1699} PROGRAMMING 1500.0 Codeforces Round #804 (Div. 2) Editorial
1368 Three Days Grace dp math two pointers Statement E Codeforces Round 804 (Div. 2) {1699} PROGRAMMING 2500.0 Codeforces Round #804 (Div. 2) Editorial
2457 LCM Sum (easy version) binary search brute force combinatorics math number theory two pointers Statement E1 Codeforces Round 813 (Div. 2) {1712} PROGRAMMING 2000.0 Codeforces Round #813 (Div. 2) Editorial
1612 LCM Sum (hard version) combinatorics data structures math number theory two pointers Statement E2 Codeforces Round 813 (Div. 2) {1712} PROGRAMMING 750.0 Codeforces Round #813 (Div. 2) Editorial
5898 Burenka and Traditions (hard version) data structures dp greedy math two pointers Statement A2 Codeforces Round 814 (Div. 1) {1718} PROGRAMMING 500.0 Codeforces Round #814 (Div. 1, Div. 2) Editorial
1920 Circular Mirror binary search combinatorics math two pointers Statement C COMPFEST 14 - Preliminary Online Mirror (Unrated, ICPC Rules, Teams Preferred) {1725} PROGRAMMING Tutorial
1792 Balance Addicts combinatorics dp math two pointers Statement E Codeforces Global Round 22 {1738} PROGRAMMING 2500.0 Editorial of Codeforces Global Round <strong>22</strong>
19336 Minimize the Thickness brute force greedy math two pointers Statement C Codeforces Round 826 (Div. 3) {1741} PROGRAMMING 107908
3713 MEX vs MED brute force math two pointers Statement F Codeforces Round 828 (Div. 3) {1744} PROGRAMMING Codeforces Round #828 (Div. 3) Editorial
8457 Range = √Sum binary search brute force constructive algorithms math two pointers Statement D Codeforces Round 836 (Div. 2) {1758} PROGRAMMING 1750.0 Codeforces Round #836 (Div. 2) Editorial
12221 Quiz Master math sortings two pointers Statement C Codeforces Round 845 (Div. 2) and ByteRace 2023 {1777} PROGRAMMING 1500.0 Codeforces Round #845 (Div. 2) and ByteRace 2023 Editorial
14732 Going to the Cinema binary search math sortings two pointers Statement B VK Cup 2022 - Отборочный раунд (Engine) {1781} PROGRAMMING 1000.0 Tutorial
4635 Moving Dots binary search brute force combinatorics dp math two pointers Statement D Codeforces Round 851 (Div. 2) {1788} PROGRAMMING 2250.0 Codeforces Round #851 (Div. 2) Editorial
21919 Scoring Subsequences binary search greedy math two pointers Statement C Codeforces Round 856 (Div. 2) {1794} PROGRAMMING 1250.0 Codeforces Round 856 (Div. 2) Editorial
2117 Vlad and the Nice Paths (hard version) binary search combinatorics data structures dp math two pointers Statement G2 Codeforces Round 863 (Div. 3) {1811} PROGRAMMING 114788
22822 JoJo's Incredible Adventures math strings two pointers Statement B Codeforces Round 866 (Div. 2) {1820} PROGRAMMING 1000.0 Codeforces Round #866 (Div.1, Div.2, based on Lipetsk Team Olympiad) Editorial
28616 Counting Orders combinatorics math sortings two pointers Statement A Codeforces Round 873 (Div. 1) {1827} PROGRAMMING 500.0 Codeforces Round #873 (Div. 1 & 2) Editorial 1100
2761 MEX of LCM binary search brute force data structures implementation math number theory two pointers Statement E Codeforces Round 879 (Div. 2) {1834} PROGRAMMING 2500.0 Codeforces Round #879 Editorial
1071 Lottery binary search brute force greedy math sortings two pointers Statement B Codeforces Round 880 (Div. 1) {1835} PROGRAMMING 1250.0 Codeforces Round 880 Editorial
47198 Ski Resort combinatorics math two pointers Statement C Codeforces Round 878 (Div. 3) {1840} PROGRAMMING Codeforces Round #878 (Div.3) Editorial
9207 Ntarsis' Set binary search implementation math two pointers Statement A Codeforces Round 887 (Div. 1) {1852} PROGRAMMING 500.0 Codeforces Round 887 (Div 1, Div 2) Tutorial
13084 Colorful Table binary search data structures dp implementation math sortings two pointers Statement C CodeTON Round 6 (Div. 1 + Div. 2, Rated, Prizes!) {1870} PROGRAMMING 1500.0 CodeTON Round 6 (Div. 1 + Div. 2, Rated, Prizes!) Editorial
5013 Replace With Product brute force math two pointers Statement G Codeforces Round 895 (Div. 3) {1872} PROGRAMMING Codeforces Round 895 (Div. 3) Editorial
19617 Money Trees greedy greedy greedy math two pointers Statement F Codeforces Round 898 (Div. 4) {1873} PROGRAMMING 120634
14673 Haunted House greedy math two pointers Statement B Codeforces Round 904 (Div. 2) {1884} PROGRAMMING 1000.0 Codeforces Round #904 (Div. 2) Editorial
1253 Split binary search data structures divide and conquer math two pointers Statement D Codeforces Round 905 (Div. 1) {1887} PROGRAMMING 1250.0 Codeforces Round #905 (Div. 1, Div. 2, Div. 3) Editorial
6987 Ones and Twos data structures math two pointers Statement D CodeTON Round 7 (Div. 1 + Div. 2, Rated, Prizes!) {1896} PROGRAMMING 2000.0 CodeTON Round 7 (Div. 1 + Div. 2, Rated, Prizes!) Editorial
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
65 Innovative Washing Machine geometry math two pointers Statement I 2023-2024 ICPC, NERC, Northern Eurasia Onsite (Unrated, Online Mirror, ICPC Rules, Teams Preferred) {1912} PROGRAMMING 3300
47595 Rudolf and the Ticket brute force math sortings two pointers Statement A Codeforces Round 933 (Div. 3) {1941} PROGRAMMING 127018
16778 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
7082 Smithing Skill brute force dp greedy math sortings two pointers Statement D Educational Codeforces Round 167 (Rated for Div. 2) {1989} PROGRAMMING Educational Codeforces Round 167 Editorial
10131 Bouquet (Hard Version) binary search data structures greedy math sortings two pointers Statement B2 Codeforces Round 961 (Div. 2) {1995} PROGRAMMING 500.0 Video Tutorial
5161 Speedbreaker binary search dp greedy implementation math two pointers Statement B Codeforces Round 975 (Div. 1) {2018} PROGRAMMING 750.0 Editorial of Codeforces Round 975 (Div. 1, Div. 2)
20892 Penchick and Modern Monument dp greedy math two pointers Statement A Codeforces Round 987 (Div. 2) {2031} PROGRAMMING 500.0 Codeforces Round 987 (Div. 2) Editorial
16097 Trinity binary search math sortings two pointers Statement C Codeforces Round 983 (Div. 2) {2032} PROGRAMMING 1250.0 Codeforces Round 983 (Div. 2) Editorial
5809 Yet Another Real Number Problem binary search brute force data structures dp greedy implementation math two pointers Statement D Codeforces Global Round 27 {2035} PROGRAMMING 1500.0 Codeforces Global Round 27 Editorial
1307 Kevin and Math Class brute force data structures divide and conquer dp math trees two pointers Statement F Codeforces Global Round 28 {2048} PROGRAMMING 2000.0 Tutorial
105 Affectionate Arrays (Hard Version) data structures dp graphs greedy math shortest paths two pointers Statement I2 Good Bye 2024: 2025 is NEAR {2053} PROGRAMMING 2000.0 Good Bye 2024: 2025 is NEAR 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
4991 Game With Triangles binary search data structures dp greedy math ternary search two pointers Statement D Codeforces Round 1000 (Div. 2) {2063} PROGRAMMING 2250.0 Codeforces Round 1000 (Div. 2) — Editorial
1269 Canteen (Hard Version) binary search data structures greedy math two pointers Statement B2 Codeforces Round 1012 (Div. 1) {2089} PROGRAMMING 500.0 Codeforces Round 1012 (Div.1, Div. 2, based on THUPC 2025 — Finals) Editorial
19472 Interesting Ratio brute force math number theory two pointers Statement E Codeforces Round 1013 (Div. 3) {2091} PROGRAMMING Codeforces Round 1013 (Div. 3) Editorial
1404 Sets of Complementary Sums combinatorics dp math two pointers Statement E Educational Codeforces Round 181 (Rated for Div. 2) {2125} PROGRAMMING Educational Codeforces Round 181 Editorial
4699 Unjust Binary Life binary search binary search data structures greedy greedy math two pointers Statement F Codeforces Round 1042 (Div. 3) {2131} PROGRAMMING Codeforces Round 1042 (Div. 3) Editorial
5935 Billion Players Game greedy math sortings ternary search two pointers Statement D Codeforces Round 1066 (Div. 1 + Div. 2) {2157} PROGRAMMING 1500.0 Codeforces Round 1066 (Div. 1 + Div. 2) Editorial
1004 Inverse Minimum Partition (Easy Version) binary search data structures dp greedy math two pointers Statement D1 Codeforces Round 1058 (Div. 1) {2159} PROGRAMMING 1500.0 Codeforces Round 1058 Editorial
8891 Monopati dp math two pointers Statement C Codeforces Round 1063 (Div. 2) {2163} PROGRAMMING 1250.0 Codeforces Round 1063 Editorial
12527 Range Operation math two pointers Statement C Educational Codeforces Round 184 (Rated for Div. 2) {2169} PROGRAMMING Educational Codeforces Round 184 Editorial
10578 War Strategy binary search greedy math two pointers Statement C Hello 2026 {2183} PROGRAMMING 1500.0
20407 OutOfMemoryError data structures implementation math two pointers Statement D Codeforces Round 1074 (Div. 4) {2185} PROGRAMMING Codeforces Round 1074 (Div. 4) Editorial
8380 Another Problem about Beautiful Pairs brute force math two pointers Statement B Codeforces Round 1079 (Div. 1) {2196} PROGRAMMING 750.0 Tutorial
1172 Sum of Fractions binary search combinatorics greedy math two pointers Statement F Educational Codeforces Round 188 (Rated for Div. 2) {2204} PROGRAMMING Educational Codeforces Round 188 Editorial