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

< 1 2 3

Solved
Name
Tags
Solutions
Index
Contest
Type
Points
Tutorial
Rating Level
38580 Angry Monk greedy math sortings Statement B Codeforces Round 957 (Div. 3) {1992} PROGRAMMING Shayan's Video Tutorial
21392 Bouquet (Easy Version) binary search brute force greedy sortings sortings two pointers Statement B1 Codeforces Round 961 (Div. 2) {1995} PROGRAMMING 1000.0 Video Tutorial
10346 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
27757 Turtle and Piggy Are Playing a Game 2 games greedy sortings Statement B Codeforces Round 968 (Div. 2) {2003} PROGRAMMING 750.0 sol-zh.pdf
27626 Splitting Items games greedy sortings Statement C Educational Codeforces Round 169 (Rated for Div. 2) {2004} PROGRAMMING Educational Codeforces Round 169 Editorial
22328 The Strict Teacher (Hard Version) binary search greedy math sortings Statement B2 Codeforces Round 972 (Div. 2) {2005} PROGRAMMING 500.0 Discussion stream (With Hints)
25306 The Strict Teacher (Easy Version) greedy math sortings Statement B1 Codeforces Round 972 (Div. 2) {2005} PROGRAMMING 500.0 Discussion stream (With Hints)
16388 Robert Hood and Mrs Hood data structures greedy sortings Statement D Codeforces Round 974 (Div. 3) {2014} PROGRAMMING Discussion stream (With Hints)
248 Complex Segments (Easy Version) binary search data structures divide and conquer dsu greedy math sortings Statement E1 Codeforces Round 975 (Div. 1) {2018} PROGRAMMING 2250.0 Editorial of Codeforces Round 975 (Div. 1, Div. 2)
214 Complex Segments (Hard Version) binary search data structures divide and conquer dsu greedy math sortings Statement E2 Codeforces Round 975 (Div. 1) {2018} PROGRAMMING 750.0 Editorial of Codeforces Round 975 (Div. 1, Div. 2)
10339 Tree Pruning brute force data structures dfs and similar greedy sortings trees Statement C Codeforces Round 975 (Div. 1) {2018} PROGRAMMING 750.0 Editorial of Codeforces Round 975 (Div. 1, Div. 2)
21873 Meaning Mean data structures greedy math sortings Statement A Codeforces Round 977 (Div. 2, based on COMPFEST 16 - Final Round) {2021} PROGRAMMING 500.0 Codeforces Round #977 (Div. 2, based on COMPFEST 16 — Final Round) Editorial
17034 Concatenation of Arrays constructive algorithms greedy math sortings Statement A Codeforces Round 980 (Div. 1) {2023} PROGRAMMING 500.0 135341
27967 A Gift From Orangutan brute force dfs and similar greedy sortings Statement A Codeforces Round 979 (Div. 2) {2030} PROGRAMMING 250.0 Codeforces Round 979 Editorial
2777 Penchick and Chloe's Trees data structures dfs and similar dp greedy sortings trees Statement E Codeforces Round 987 (Div. 2) {2031} PROGRAMMING 2500.0 Codeforces Round 987 (Div. 2) Editorial
21300 Penchick and Satay Sticks greedy sortings Statement B Codeforces Round 987 (Div. 2) {2031} PROGRAMMING 1000.0 Codeforces Round 987 (Div. 2) Editorial
6839 Darius' Wisdom constructive algorithms greedy implementation sortings Statement D Rayan Programming Contest 2024 - Selection (Codeforces Round 989, Div. 1 + Div. 2) {2034} PROGRAMMING 1500.0 Rayan 2024 Selection Round Editorial
30150 Startup greedy sortings Statement B Codeforces Round 984 (Div. 3) {2036} PROGRAMMING Codeforces Round 984 (Div. 3) Editorial
21115 Greedy Monocarp greedy sortings Statement A Educational Codeforces Round 172 (Rated for Div. 2) {2042} PROGRAMMING 136886
8977 Competitive Fishing greedy sortings Statement C Educational Codeforces Round 172 (Rated for Div. 2) {2042} PROGRAMMING 136886
11312 Move Back at a Cost binary search data structures greedy sortings Statement B Codeforces Round 990 (Div. 1) {2046} PROGRAMMING 750.0 Разбор Codeforces Round 990 (Div. 2 + Div. 1)
17296 Swap Columns and Find a Path greedy sortings Statement A Codeforces Round 990 (Div. 1) {2046} PROGRAMMING 500.0 Разбор Codeforces Round 990 (Div. 2 + Div. 1)
8580 Kevin and Competition Memories binary search data structures greedy sortings two pointers Statement D Codeforces Global Round 28 {2048} PROGRAMMING 1250.0 Tutorial
12417 Best Price brute force data structures greedy sortings Statement E Codeforces Round 995 (Div. 3) {2051} PROGRAMMING 137623
7857 Refined Product Optimality binary search data structures greedy implementation math schedules sortings Statement D Good Bye 2024: 2025 is NEAR {2053} PROGRAMMING 1750.0 Good Bye 2024: 2025 is NEAR Editorial
27851 Crafting greedy sortings Statement B Codeforces Round 996 (Div. 2) {2055} PROGRAMMING 1000.0 Codeforces Round 996 (Div. 2) Editorial
23766 Gorilla and the Exam greedy sortings Statement B Hello 2025 {2057} PROGRAMMING 1000.0
12909 Customer Service brute force constructive algorithms graph matchings greedy math sortings Statement C Codeforces Round 1002 (Div. 2) {2059} PROGRAMMING 1500.0 139094
29518 Milya and Two Arrays constructive algorithms greedy sortings Statement A Codeforces Round 1002 (Div. 2) {2059} PROGRAMMING 500.0 139094
1346 Bugged Sort dp greedy sortings Statement G Codeforces Round 998 (Div. 3) {2060} PROGRAMMING Codeforces Round 998 (Div. 3) Editorial
33103 Game of Mathletes games greedy sortings two pointers Statement C Codeforces Round 998 (Div. 3) {2060} PROGRAMMING Codeforces Round 998 (Div. 3) Editorial
29178 Farmer John's Card Game greedy sortings Statement B Codeforces Round 998 (Div. 3) {2060} PROGRAMMING Codeforces Round 998 (Div. 3) Editorial
641 Traveling Salescat dp geometry greedy math sortings Statement F Ethflow Round 1 (Codeforces Round 1001, Div. 1 + Div. 2) {2062} PROGRAMMING 3500.0 Ethflow Round 1 (Codeforces Round 1001, Div. 1 + Div. 2) Editorial
15393 Remove Exactly Two brute force data structures dp graphs greedy sortings trees Statement C Codeforces Round 1000 (Div. 2) {2063} PROGRAMMING 1500.0 Codeforces Round 1000 (Div. 2) — Editorial
23722 Subsequence Update greedy sortings Statement B Codeforces Round 1000 (Div. 2) {2063} PROGRAMMING 1000.0 Codeforces Round 1000 (Div. 2) — Editorial
19550 Two Large Bags dp greedy sortings Statement B Codeforces Round 1004 (Div. 2) {2067} PROGRAMMING 1000.0
276 Morse Code dp greedy sortings trees Statement D European Championship 2025 - Online Mirror (Unrated, ICPC Rules, Teams Preferred) {2068} PROGRAMMING 140239
1968 A, B, AB and BA constructive algorithms greedy sortings strings Statement E Educational Codeforces Round 174 (Rated for Div. 2) {2069} PROGRAMMING 139774
15061 Breach of Faith constructive algorithms greedy math sortings Statement A Codeforces Round 1008 (Div. 1) {2077} PROGRAMMING 500.0 Codeforces Round 1008 (Div. 1, Div. 2) Editorial
1250 MST in Modulo Graph constructive algorithms dsu graphs greedy math number theory sortings Statement D Codeforces Round 1010 (Div. 1, Unrated) {2081} PROGRAMMING 1750.0 Codeforces Round 1010 (Div. 1, Div. 2, based on Zhili Cup 2025) Editorial
6545 Dining Hall greedy implementation sortings sortings Statement C Codeforces Round 1012 (Div. 2) {2090} PROGRAMMING 1750.0 Codeforces Round 1012 (Div.1, Div. 2, based on THUPC 2025 — Finals) Editorial
33258 Team Training dp greedy sortings Statement B Codeforces Round 1013 (Div. 3) {2091} PROGRAMMING Codeforces Round 1013 (Div. 3) Editorial
28876 Kamilka and the Sheep greedy implementation math sortings Statement A Codeforces Round 1014 (Div. 2) {2092} PROGRAMMING 500.0 Codeforces Round #1014 (Div. 2) Editorial
2106 Wonderful Teddy Bears greedy implementation sortings Statement E Neowise Labs Contest 1 (Codeforces Round 1018, Div. 1 + Div. 2) {2096} PROGRAMMING 2000.0 Neowise Labs Contest 1 (Codeforces Round 1018, Div. 1 + Div. 2) Editorial
17015 Wonderful Gloves greedy math sortings Statement B Neowise Labs Contest 1 (Codeforces Round 1018, Div. 1 + Div. 2) {2096} PROGRAMMING 750.0 Neowise Labs Contest 1 (Codeforces Round 1018, Div. 1 + Div. 2) Editorial
8964 Quartet Swapping data structures greedy sortings Statement B Codeforces Round 1024 (Div. 1) {2101} PROGRAMMING 1250.0 142788
26388 Cherry Bomb greedy math sortings Statement C Codeforces Round 1020 (Div. 3) {2106} PROGRAMMING Codeforces Round 1020 (Div. 3) Editorial
5541 Changing the String binary search data structures greedy implementation sortings strings Statement E Educational Codeforces Round 179 (Rated for Div. 2) {2111} PROGRAMMING Educational Codeforces Round 179 Editorial
12449 Creating a Schedule constructive algorithms data structures greedy sortings Statement D Educational Codeforces Round 179 (Rated for Div. 2) {2111} PROGRAMMING Educational Codeforces Round 179 Editorial
5452 Omg Graph brute force dsu graphs greedy shortest paths sortings Statement G Codeforces Round 1029 (Div. 3) {2117} PROGRAMMING Codeforces Round 1029 (Div. 3) Editorial
1452 Grid Coloring constructive algorithms greedy sortings Statement E Codeforces Round 1030 (Div. 2) {2118} PROGRAMMING 2500.0 Codeforces Round 1030 (Div. 2) Editorial
13093 Divine Tree constructive algorithms greedy math sortings trees Statement C Codeforces Round 1033 (Div. 2) and CodeNite 2025 {2120} PROGRAMMING 1250.0 Codeforces Round 1033 (Div. 2) and CodeNite 2025 Editorial
10483 Manhattan Pairs constructive algorithms greedy math sortings Statement C Order Capital Round 1 (Codeforces Round 1038, Div. 1 + Div. 2) {2122} PROGRAMMING 1500.0 Order Capital Round 1 (Codeforces Round 1038, Div. 1 + Div. 2) Editorial
15446 MEX Count binary search data structures greedy sortings two pointers Statement E Codeforces Round 1034 (Div. 3) {2123} PROGRAMMING Codeforces Round 1034 (Div. 3) Editorial
9925 Make a Palindrome greedy sortings Statement D EPIC Institute of Technology Round Summer 2025 (Codeforces Round 1036, Div. 1 + Div. 2) {2124} PROGRAMMING 1750.0 EPIC Institute of Technology Round Summer 2025 (Codeforces Round 1036, Div. 1 + Div. 2) Editorial
27072 I Will Definitely Make It greedy sortings Statement C Codeforces Round 1037 (Div. 3) {2126} PROGRAMMING 144845
24857 This Is the Last Time greedy sortings Statement D Codeforces Round 1037 (Div. 3) {2126} PROGRAMMING 144845
14958 Trip Shopping games greedy sortings Statement C Atto Round 1 (Codeforces Round 1041, Div. 1 + Div. 2) {2127} PROGRAMMING 1500.0 Atto Round 1 (Codeforces Round 1041, Div. 1 + Div. 2) Editorial
22278 Deque Process constructive algorithms greedy sortings two pointers Statement B Codeforces Round 1039 (Div. 2) {2128} PROGRAMMING 1000.0 Codeforces Round #1039 — Editorial
29264 Recycling Center greedy sortings Statement A Codeforces Round 1039 (Div. 2) {2128} PROGRAMMING 500.0 Codeforces Round #1039 — Editorial
5241 A Cruel Segment's Thesis greedy math sortings Statement D Codeforces Round 1049 (Div. 2) {2140} PROGRAMMING 1750.0 Codeforces Round 1049 (Div. 2) Editorial
23213 Shift Sort greedy sortings strings Statement A Codeforces Round 1049 (Div. 2) {2140} PROGRAMMING 500.0 Codeforces Round 1049 (Div. 2) Editorial
22383 Discounts greedy sortings two pointers Statement B Codeforces Round 1051 (Div. 2) {2143} PROGRAMMING 1000.0 Codeforces Round 1051 (Div. 2) Editorial
6979 Gravity Falls greedy implementation sortings Statement F Codeforces Round 1050 (Div. 4) {2148} PROGRAMMING Codeforces Round 1050 (Div. 4) Editorial
28182 Destruction of the Dandelion Fields greedy sortings Statement D Codeforces Round 1050 (Div. 4) {2148} PROGRAMMING Codeforces Round 1050 (Div. 4) Editorial
34273 Unconventional Pairs greedy sortings Statement B Codeforces Round 1054 (Div. 3) {2149} PROGRAMMING __rose
12460 Symmetrical Polygons geometry greedy sortings Statement C Codeforces Round 1057 (Div. 2) {2153} PROGRAMMING 1250.0 Codeforces Round 1057 (Div. 2) Editorial
1260 No Mind To Think binary search greedy sortings ternary search two pointers Statement E Codeforces Round 1060 (Div. 2) {2154} PROGRAMMING 2500.0 Codeforces Round 1060 (Div. 2) Editorial
5390 Adjusting Drones binary search data structures dsu greedy implementation sortings Statement E Codeforces Round 1066 (Div. 1 + Div. 2) {2157} PROGRAMMING 2000.0 Codeforces Round 1066 (Div. 1 + Div. 2) Editorial
18944 Dungeon Equilibrium greedy implementation sortings Statement A Codeforces Round 1066 (Div. 1 + Div. 2) {2157} PROGRAMMING 500.0 Codeforces Round 1066 (Div. 1 + Div. 2) Editorial
8232 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
13524 Loyalty constructive algorithms greedy sortings two pointers Statement C Pinely Round 5 (Div. 1 + Div. 2) {2161} PROGRAMMING 1750.0
13258 Dungeon binary search brute force data structures greedy sortings Statement C Codeforces Global Round 30 (Div. 1 + Div. 2) {2164} PROGRAMMING 1500.0 Codeforces Global Round 30 Editorial
37562 Isamatdin and His Magic Wand! constructive algorithms greedy implementation sortings Statement C Codeforces Round 1062 (Div. 4) {2167} PROGRAMMING Arpa Video Tutorial
16630 Odd Process greedy math sortings Statement C Codeforces Round 1070 (Div. 2) {2176} PROGRAMMING 1500.0 Codeforces Round 1070 (Div.2) Editorial
167 Elevator Against Humanity brute force constructive algorithms greedy sortings Statement E 2025-2026 ICPC, NERC, Northern Eurasia Finals (Unrated, Online Mirror, ICPC Rules, Teams Preferred) {2181} PROGRAMMING Tutorial
5991 New Year's Gifts data structures greedy implementation sortings two pointers Statement E Educational Codeforces Round 186 (Rated for Div. 2) {2182} PROGRAMMING Educational Codeforces Round 186 Editorial
16958 Restricted Sorting binary search constructive algorithms greedy sortings Statement A Codeforces Round 1077 (Div. 1) {2187} PROGRAMMING 750.0 Codeforces Round 1077 (Div. 1, Div. 2) Editorial
1377 Comparable Permutations binary search greedy interactive sortings two pointers Statement C Codeforces Round 1073 (Div. 1) {2190} PROGRAMMING 1750.0 Codeforces Round 1073 (Div. 1, Div. 2) Editorial
1090 Double Bracket Sequence data structures dp greedy sortings Statement D Codeforces Round 1079 (Div. 1) {2196} PROGRAMMING 2250.0 Tutorial
3336 Mooclear Reactor 2 data structures greedy implementation sortings Statement F Codeforces Round 1084 (Div. 3) {2200} PROGRAMMING Codeforces Round 1084 (Div. 3) Editorial
28442 Deletion Sort greedy sortings Statement B Codeforces Round 1084 (Div. 3) {2200} PROGRAMMING Codeforces Round 1084 (Div. 3) Editorial
13729 Portal greedy sortings Statement D Codeforces Round 1084 (Div. 3) {2200} PROGRAMMING Codeforces Round 1084 (Div. 3) Editorial
8890 Simons and Posting Blogs greedy sortings Statement C Codeforces Round 1083 (Div. 2) {2205} PROGRAMMING 1250.0 Tutorial
6715 One Night At Freddy's games greedy sortings Statement B Codeforces Round 1085 (Div. 1 + Div. 2) {2207} PROGRAMMING 1250.0 Codeforces Round 1085 (Div. 1 + Div. 2) Editorial
2129 Tree Orientation (Hard Version) data structures dfs and similar dsu graphs greedy matrices sortings trees Statement D2 Codeforces Round 1086 (Div. 2) {2208} PROGRAMMING 1250.0 Tutorial
15278 Cyclists games greedy implementation sortings Statement B Codeforces Round 1086 (Div. 2) {2208} PROGRAMMING 1000.0 Tutorial
21549 Blocked greedy sortings Statement A Codeforces Round 1093 (Div. 2) {2220} PROGRAMMING 500.0 Tutorial
9191 Artistic Balance Tree greedy sortings Statement B Spectral::Cup 2026 Round 1 (Codeforces Round 1094, Div. 1 + Div. 2) {2222} PROGRAMMING 1250.0 Spectral::Cup 2026 Round 1 (Codeforces Round 1094, Div. 1 + Div. 2) Editorial
9460 Zhily and Mex and Max constructive algorithms greedy math sortings Statement B Codeforces Round 1097 (Div. 2, Based on Zhili Cup 2026) {2224} PROGRAMMING 750.0 Codeforces Round 1097 (Div. 1, Div2, Based on Zhili Cup 2026) Tutorial
1532 Minimum Influence binary search data structures geometry greedy implementation math sortings two pointers Statement E Educational Codeforces Round 190 (Rated for Div. 2) {2230} PROGRAMMING Educational Codeforces Round 190 — Editorial
23607 Convergence greedy sortings Statement A Codeforces Round 1101 (Div. 2) {2232} PROGRAMMING 500.0 Codeforces Round 1101 (Div. 2) — Editorial
19987 Another Puzzle from Papyrus greedy math sortings Statement A Codeforces Round 1106 (Div. 2) {2238} PROGRAMMING 500.0 Codeforces Round 1106 (Div. 2) Editorial
7227 Decidophobia greedy sortings two pointers Statement B Codeforces Round 1105 (Div. 1) {2239} PROGRAMMING 1000.0 Codeforces Round 1105 (Div. 1, Div. 2) Editorial
17366 Stepan and Permutation constructive algorithms dsu greedy math number theory sortings Statement C Codeforces Round 1109 (Div. 3) {2244} PROGRAMMING Codeforces Round 1109 (Div. 3) Editorial
24274 Nikita and Books greedy math sortings Statement B Codeforces Round 1109 (Div. 3) {2244} PROGRAMMING Codeforces Round 1109 (Div. 3) Editorial
14300 Merge to Match greedy sortings Statement B Codeforces Round 1113 (Div. 2) {2248} PROGRAMMING 1250.0 Codeforces Round 1113 (Div. 2) Editorial
9198 Risky Tower binary search brute force data structures greedy sortings Statement C Codeforces Round 1115 (Div. 2) {2252} PROGRAMMING 1250.0 155741
408 Spectral Components dfs and similar dp greedy sortings trees Statement F Codeforces Round 1115 (Div. 2) {2252} PROGRAMMING 2750.0 155741
4933 Array Replacement greedy sortings Statement D Codeforces Round 1115 (Div. 2) {2252} PROGRAMMING 1750.0 155741
1066 Nightcrawler data structures dfs and similar dp greedy sortings trees Statement G Codeforces Round 1114 (Div. 3) {2254} PROGRAMMING Tutorial
13191 Marenol (hard version) greedy sortings Statement C2 Codeforces Round 1114 (Div. 3) {2254} PROGRAMMING Tutorial
1740 Busy Beaver brute force divide and conquer dp greedy implementation sortings Statement E Codeforces Round 1117 (Div. 2) {2257} PROGRAMMING 2250.0 Codeforces Round 1117 (Div. 2) Editorial