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
16509 Dora and C++ math number theory Statement C Codeforces Round 969 (Div. 2) {2007} PROGRAMMING 1000.0 Tutorial
6863 Sakurako's Task binary search brute force greedy math number theory Statement G Codeforces Round 970 (Div. 3) {2008} PROGRAMMING Codeforces Round 970 (Div. 3) Editorial
3699 Sakurako's Test binary search brute force greedy math number theory Statement H Codeforces Round 970 (Div. 3) {2008} PROGRAMMING Codeforces Round 970 (Div. 3) Editorial
16086 Sakurako's Box math number theory Statement F Codeforces Round 970 (Div. 3) {2008} PROGRAMMING Codeforces Round 970 (Div. 3) Editorial
4417 Prefix GCD brute force dp greedy math number theory Statement E Codeforces Round 973 (Div. 2) {2013} PROGRAMMING 2500.0 134298
4154 Expected Power bitmasks brute force dp math number theory probabilities Statement E Codeforces Round 976 (Div. 2) and Divide By Zero 9.0 {2020} PROGRAMMING 2000.0 Tutorial for Codeforces Round 976 (Div. 2) and Divide By Zero 9.0
275 Count Leaves dp math number theory Statement F Codeforces Round 976 (Div. 2) and Divide By Zero 9.0 {2020} PROGRAMMING 2750.0 Tutorial for Codeforces Round 976 (Div. 2) and Divide By Zero 9.0
19289 Maximize Mex brute force greedy math number theory Statement B Codeforces Round 977 (Div. 2, based on COMPFEST 16 - Final Round) {2021} PROGRAMMING 750.0 Codeforces Round #977 (Div. 2, based on COMPFEST 16 — Final Round) Editorial
3630 Common Generator brute force constructive algorithms greedy math number theory Statement E Refact.ai Match 1 (Codeforces Round 985) {2029} PROGRAMMING 2500.0 Refact.ai Match 1 (Codeforces Round 985) Editorial
16162 Penchick and BBQ Buns brute force constructive algorithms math number theory Statement C Codeforces Round 987 (Div. 2) {2031} PROGRAMMING 1500.0 Codeforces Round 987 (Div. 2) Editorial
25015 Circuit greedy implementation math number theory Statement A Codeforces Round 983 (Div. 2) {2032} PROGRAMMING 500.0 Codeforces Round 983 (Div. 2) Editorial
7355 Kosuke's Sloth brute force math number theory Statement F Codeforces Round 981 (Div. 3) {2033} PROGRAMMING 135520
18684 King Keykhosrow's Mystery brute force chinese remainder theorem math number theory Statement A Rayan Programming Contest 2024 - Selection (Codeforces Round 989, Div. 1 + Div. 2) {2034} PROGRAMMING 500.0 Rayan 2024 Selection Round Editorial
21051 Everyone Loves Tres constructive algorithms greedy math number theory Statement B Codeforces Global Round 27 {2035} PROGRAMMING 500.0 Codeforces Global Round 27 Editorial
3928 Natlan Exploring combinatorics dp math number theory Statement G Codeforces Round 988 (Div. 3) {2037} PROGRAMMING Video Tutorial
26215 Superultra's Favorite Permutation constructive algorithms greedy math number theory Statement C Codeforces Round 988 (Div. 3) {2037} PROGRAMMING Video Tutorial
1834 Grid Walk dp greedy math number theory Statement K 2024-2025 ICPC, NERC, Southern and Volga Russian Regional Contest (Unrated, Online Mirror, ICPC Rules, Preferably Teams) {2038} PROGRAMMING 2100
13912 Shohag Loves XOR (Easy Version) bitmasks brute force math number theory Statement C1 CodeTON Round 9 (Div. 1 + Div. 2, Rated, Prizes!) {2039} PROGRAMMING 1000.0 Editorial of CodeTON Round 9 (Div. 1 + Div. 2)
5122 Shohag Loves XOR (Hard Version) bitmasks brute force math number theory Statement C2 CodeTON Round 9 (Div. 1 + Div. 2, Rated, Prizes!) {2039} PROGRAMMING 1500.0 Editorial of CodeTON Round 9 (Div. 1 + Div. 2)
535 Shohag Loves Counting (Easy Version) combinatorics dp math number theory Statement F1 CodeTON Round 9 (Div. 1 + Div. 2, Rated, Prizes!) {2039} PROGRAMMING 2000.0 Editorial of CodeTON Round 9 (Div. 1 + Div. 2)
7219 Shohag Loves GCD constructive algorithms greedy math number theory Statement D CodeTON Round 9 (Div. 1 + Div. 2, Rated, Prizes!) {2039} PROGRAMMING 2000.0 Editorial of CodeTON Round 9 (Div. 1 + Div. 2)
473 Number of Cubes combinatorics math number theory Statement F Codeforces Round 992 (Div. 2) {2040} PROGRAMMING 2750.0 Codeforces Round #992 (Div.2) Editorial
7952 Problem about GCD brute force math number theory Statement D Educational Codeforces Round 173 (Rated for Div. 2) {2043} PROGRAMMING Educational Codeforces Round 173 Editorial
22254 Digits math number theory Statement B Educational Codeforces Round 173 (Rated for Div. 2) {2043} PROGRAMMING Educational Codeforces Round 173 Editorial
6480 Easy Demon Problem binary search brute force math number theory Statement F Codeforces Round 993 (Div. 4) {2044} PROGRAMMING Codeforces Round 993 (Div. 4) Editorial
1803 ICPC Square math number theory Statement B 2024-2025 ICPC Asia Jakarta Regional Contest (Unrated, Online Mirror, ICPC Rules, Teams Preferred) {2045} PROGRAMMING raRzKDJLPHcUnqTcwvGznwEdKiDWjEkd.pdf 2000
23079 Kevin and Combination Lock brute force implementation math number theory Statement A Codeforces Global Round 28 {2048} PROGRAMMING 250.0 Tutorial
11536 Maximum modulo equality data structures math number theory Statement F Codeforces Round 991 (Div. 3) {2050} PROGRAMMING Разбор Codeforces Round 991 (Div. 3)
6584 Skibidus and Capping divide and conquer math number theory Statement G Codeforces Round 1003 (Div. 4) {2065} PROGRAMMING Video Tutorial
28257 The Play Never Ends math number theory Statement A Codeforces Round 1007 (Div. 2) {2071} PROGRAMMING 500.0 Codeforces Round 1007 (Div. 2) Editorial
8757 Goodbye, Banker Life bitmasks combinatorics constructive algorithms math number theory Statement F Codeforces Round 1006 (Div. 3) {2072} PROGRAMMING Codeforces Round 1006 (Div. 3) Editorial
2208 I've Been Flipping Numbers for 300 Years and Calculated the Sum brute force math number theory Statement G Codeforces Round 1006 (Div. 3) {2072} PROGRAMMING Codeforces Round 1006 (Div. 3) 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
3240 Serval and Modulo brute force constructive algorithms math number theory Statement E Codeforces Round 1011 (Div. 2) {2085} PROGRAMMING 2500.0 Codeforces Round #1011 (Div. 2) Editorial
21736 Treasure Hunt math number theory Statement A Codeforces Round 1012 (Div. 2) {2090} PROGRAMMING 500.0 Codeforces Round 1012 (Div.1, Div. 2, based on THUPC 2025 — Finals) Editorial
20344 Interesting Ratio brute force math number theory two pointers Statement E Codeforces Round 1013 (Div. 3) {2091} PROGRAMMING Codeforces Round 1013 (Div. 3) Editorial
444 Andryusha and CCB brute force constructive algorithms greedy math number theory strings Statement F Codeforces Round 1014 (Div. 2) {2092} PROGRAMMING 3000.0 Codeforces Round #1014 (Div. 2) Editorial
31796 Simple Repetition math number theory Statement C Codeforces Round 1016 (Div. 3) {2093} PROGRAMMING Codeforces Round 1016 (Div. 3) Editorial
3942 La Vaca Saturno Saturnita binary search brute force math number theory Statement H Codeforces Round 1017 (Div. 4) {2094} PROGRAMMING Codeforces Round 1017 (Div. 4) Editorial
1059 Bermuda Triangle chinese remainder theorem constructive algorithms geometry math number theory Statement C Codeforces Round 1021 (Div. 1) {2097} PROGRAMMING 1500.0 142316
13784 Array and GCD binary search greedy math number theory Statement D Educational Codeforces Round 178 (Rated for Div. 2) {2104} PROGRAMMING Educational Codeforces Round 178 Editorial
22438 Permutation Warm-Up combinatorics greedy math number theory Statement A Codeforces Round 1022 (Div. 2) {2108} PROGRAMMING 500.0 Codeforces Round 1022 Editorial
11895 Hacking Numbers (Easy Version) bitmasks constructive algorithms interactive math number theory Statement C1 Codeforces Round 1025 (Div. 2) {2109} PROGRAMMING 1250.0 Codeforces Round 1025 (Div. 2) Editorial
8986 Hacking Numbers (Medium Version) constructive algorithms interactive math number theory Statement C2 Codeforces Round 1025 (Div. 2) {2109} PROGRAMMING 750.0 Codeforces Round 1025 (Div. 2) Editorial
3367 Hacking Numbers (Hard Version) constructive algorithms interactive math number theory Statement C3 Codeforces Round 1025 (Div. 2) {2109} PROGRAMMING 500.0 Codeforces Round 1025 (Div. 2) Editorial
1972 Faculty brute force math number theory Statement F Codeforces Round 1026 (Div. 2) {2110} PROGRAMMING 3000.0 Codeforces Round 1026 (Div. 2) Editorial
5670 Small Operations binary search bitmasks brute force dfs and similar dp math number theory sortings Statement F Codeforces Round 1027 (Div. 3) {2114} PROGRAMMING 143268
2104 Build an Array bitmasks dp math number theory Statement G Codeforces Round 1027 (Div. 3) {2114} PROGRAMMING 143268
17499 Gellyfish and Flaming Peony brute force constructive algorithms dp greedy math number theory shortest paths Statement A Codeforces Round 1028 (Div. 1) {2115} PROGRAMMING 500.0 Codeforces Round 1028 (Div.1, Div.2) Editorial
3455 Modular Sorting brute force data structures math number theory Statement G Codeforces Round 1034 (Div. 3) {2123} PROGRAMMING Codeforces Round 1034 (Div. 3) Editorial
23531 Count Good Numbers combinatorics math number theory Statement C Educational Codeforces Round 181 (Rated for Div. 2) {2125} PROGRAMMING Educational Codeforces Round 181 Editorial
28679 Left and Down greedy math number theory Statement B Educational Codeforces Round 181 (Rated for Div. 2) {2125} PROGRAMMING Educational Codeforces Round 181 Editorial
17718 G-C-D, Unlucky! math number theory Statement E Codeforces Round 1037 (Div. 3) {2126} PROGRAMMING 144845
929 Sea, You & copriMe brute force combinatorics constructive algorithms graphs greedy math number theory Statement H Codeforces Round 1042 (Div. 3) {2131} PROGRAMMING Codeforces Round 1042 (Div. 3) Editorial
22482 Make it Equal math number theory Statement C Codeforces Round 1042 (Div. 3) {2131} PROGRAMMING Codeforces Round 1042 (Div. 3) Editorial
22127 Add 0 or K constructive algorithms math number theory Statement B Codeforces Round 1045 (Div. 2) {2134} PROGRAMMING 1250.0 145832
266 Beyond the Palindrome (Hard Version) combinatorics dp math number theory Statement E2 Codeforces Round 1046 (Div. 1) {2135} PROGRAMMING 2000.0 Codeforces Round 1046 (Div. 1, Div. 2) Editorial
27641 Fun Permutation constructive algorithms math number theory Statement B Codeforces Round 1047 (Div. 3) {2137} PROGRAMMING Codeforces Round 1047 (Div. 3) Editorial
23489 Another Divisibility Problem constructive algorithms math number theory Statement B Codeforces Round 1049 (Div. 2) {2140} PROGRAMMING 1000.0 Codeforces Round 1049 (Div. 2) Editorial
22494 Cut the Array brute force math number theory Statement A Educational Codeforces Round 182 (Rated for Div. 2) {2144} PROGRAMMING Educational Codeforces Round 182 Editorial
1227 Modular Tetration combinatorics math number theory Statement G Codeforces Global Round 29 (Div. 1 + Div. 2) {2147} PROGRAMMING 4500.0
4409 Farmer John's Last Wish data structures math number theory Statement G Codeforces Round 1050 (Div. 4) {2148} PROGRAMMING Codeforces Round 1050 (Div. 4) Editorial
1047 Zero Trailing Factorial brute force math number theory Statement E Codeforces Round 1057 (Div. 2) {2153} PROGRAMMING 2250.0 Codeforces Round 1057 (Div. 2) Editorial
14327 No Cost Too Great (Easy Version) greedy implementation math number theory Statement C1 Codeforces Round 1060 (Div. 2) {2154} PROGRAMMING 1250.0 Codeforces Round 1060 (Div. 2) Editorial
5776 No Cost Too Great (Hard Version) greedy math number theory Statement C2 Codeforces Round 1060 (Div. 2) {2154} PROGRAMMING 1000.0 Codeforces Round 1060 (Div. 2) Editorial
13015 Maximum GCD on Whiteboard greedy math number theory Statement C Codeforces Round 1061 (Div. 2) {2156} PROGRAMMING 1500.0 Codeforces Round 1061 (Div. 2) Editorial
295 Distinct GCDs (Hard Version) combinatorics constructive algorithms graphs graphs graphs math number theory number theory Statement F2 Codeforces Round 1067 (Div. 2) {2158} PROGRAMMING 1000.0 Codeforces Round 1067 (Div. 2) Editorial
31932 Yet Another Array Problem brute force math number theory Statement D Codeforces Round 1062 (Div. 4) {2167} PROGRAMMING Arpa Video Tutorial
9112 Removal of a Sequence (Easy Version) binary search bitmasks geometry implementation math number theory Statement D1 Educational Codeforces Round 184 (Rated for Div. 2) {2169} PROGRAMMING Educational Codeforces Round 184 Editorial
2397 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
1591 Omega Numbers bitmasks dp math number theory Statement F Codeforces Round 1070 (Div. 2) {2176} PROGRAMMING 2750.0 Codeforces Round 1070 (Div.2) Editorial
23407 Blackslex and Number Theory math number theory sortings sortings Statement C Codeforces Round 1071 (Div. 3) {2179} PROGRAMMING Codeforces Round 1071 (Div. 3) Editorial
7536 Honey Cake math number theory Statement H 2025-2026 ICPC, NERC, Northern Eurasia Finals (Unrated, Online Mirror, ICPC Rules, Teams Preferred) {2181} PROGRAMMING Tutorial
3048 LCM is Legendary Counting Master dp math number theory Statement E Hello 2026 {2183} PROGRAMMING 2250.0
2100 Little String (Hard Version) binary search combinatorics dp greedy math number theory Statement D2 Codeforces Round 1075 (Div. 2) {2189} PROGRAMMING 750.0 Codeforces Round 1075 (Div. 2) Editorial
16460 Product Queries dp math number theory Statement E Codeforces Round 1076 (Div. 3) {2193} PROGRAMMING Разбор Codeforces Round 1076 (Div. 3)
545 Six Seven divide and conquer math number theory strings trees Statement H Codeforces Round 1084 (Div. 3) {2200} PROGRAMMING Codeforces Round 1084 (Div. 3) Editorial
9505 Divisive Battle games greedy math number theory Statement E Codeforces Round 1084 (Div. 3) {2200} PROGRAMMING Codeforces Round 1084 (Div. 3) Editorial
306 ABBA Counting fft math number theory strings Statement E Codeforces Round 1082 (Div. 1) {2201} PROGRAMMING 3000.0 Codeforces Round 1082 (Div. 1, Div. 2) Complete Editorial
1329 RReeppeettiittiioonn binary search brute force implementation math number theory Statement B Codeforces Round 1092 (Unrated, Div. 1, Based on THUPC 2026 — Finals) {2215} PROGRAMMING 1250.0 152930
12186 Grid Covering math number theory Statement C Codeforces Round 1091 (Div. 2) and CodeCraft 26 {2217} PROGRAMMING 1500.0 Tutorial
22204 The 67th OEIS Problem greedy math number theory Statement D Codeforces Round 1090 (Div. 4) {2218} PROGRAMMING Codeforces Round 1090 (Div. 4) Editorial
11068 Grid L brute force math number theory Statement A Codeforces Round 1093 (Div. 1) {2219} PROGRAMMING 500.0 Codeforces Round 1093 (Div. 1, Div. 2) Editorial
955 Zhily and Signpost binary search chinese remainder theorem dfs and similar math number theory trees Statement C Codeforces Round 1097 (Div. 1, Based on Zhili Cup 2026) {2223} PROGRAMMING 1500.0 Codeforces Round 1097 (Div. 1, Div2, Based on Zhili Cup 2026) Tutorial
15112 Everything Everywhere greedy math number theory Statement B Codeforces Round 1095 (Div. 2) {2226} PROGRAMMING 750.0 Codeforces Round 1095 (Div. 2) Editorial
295 Inversion Invasion math number theory Statement F Codeforces Round 1095 (Div. 2) {2226} PROGRAMMING 2500.0 Codeforces Round 1095 (Div. 2) Editorial
825 Quadratic Jumps constructive algorithms greedy math number theory Statement F Codeforces Round 1099 (Div. 2) {2231} PROGRAMMING 2750.0
313 The Cake Is a Lie greedy math number theory Statement F Codeforces Round 1101 (Div. 2) {2232} PROGRAMMING 3250.0 Codeforces Round 1101 (Div. 2) — Editorial
425 Shortest GCD Paths dp graphs math number theory shortest paths Statement F Educational Codeforces Round 191 (Rated for Div. 2) {2233} PROGRAMMING 154371
8967 XOR, Expression and Two Binary Numbers bitmasks constructive algorithms math number theory Statement D Codeforces Round 1102 (Div. 2) {2234} PROGRAMMING 1750.0 Tutorial
24541 Euclid, Sequence and Two Numbers math number theory sortings Statement A Codeforces Round 1102 (Div. 2) {2234} PROGRAMMING 500.0 Tutorial
1043 Elections in Saransk (hard version) combinatorics dp fft math number theory Statement F2 Codeforces Round 1103 (Div. 3) {2236} PROGRAMMING 154496
16341 Crimson Triples math number theory Statement B Codeforces Round 1106 (Div. 2) {2238} PROGRAMMING 750.0 Codeforces Round 1106 (Div. 2) Editorial
7835 Storming Arasaka math number theory Statement D Codeforces Round 1106 (Div. 2) {2238} PROGRAMMING 1500.0 Codeforces Round 1106 (Div. 2) Editorial
970 Summmon binary search data structures greedy math number theory Statement G Codeforces Round 1107 (Div. 3) {2241} PROGRAMMING Codeforces Round 1107 (Div. 3) Editorial
6447 Fair and Square combinatorics dp graphs math number theory trees Statement E Codeforces Round 1107 (Div. 3) {2241} PROGRAMMING Codeforces Round 1107 (Div. 3) Editorial
34571 Divide and Conquer greedy math number theory Statement A Codeforces Round 1107 (Div. 3) {2241} PROGRAMMING Codeforces Round 1107 (Div. 3) Editorial
13089 Yaroslav and Productivity constructive algorithms dp greedy math number theory Statement D Codeforces Round 1109 (Div. 3) {2244} PROGRAMMING Codeforces Round 1109 (Div. 3) Editorial
17326 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
19720 The Best Card math number theory Statement A Educational Codeforces Round 193 (Rated for Div. 2) {2253} PROGRAMMING 155813
1461 Even If the World Turns communication greedy interactive math number theory Statement C Codeforces Round 1116 (Div. 1) {2255} PROGRAMMING 1750.0 155840
5553 Bermuda Rectangle binary search math number theory Statement D Codeforces Round 1117 (Div. 2) {2257} PROGRAMMING 1750.0 Codeforces Round 1117 (Div. 2) Editorial
399 DivMEX data structures math number theory Statement E Codeforces Round 1118 (Div. 2) {2258} PROGRAMMING 2250.0 Codeforces Round 1118 (Div. 2) Editorial