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 ... 12 13 14 15 >

Solved
Name
Tags
Solutions
Index
Contest
Type
Points
Tutorial
Rating Level
8767 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
1442 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
23294 Count Good Numbers combinatorics math number theory Statement C Educational Codeforces Round 181 (Rated for Div. 2) {2125} PROGRAMMING Educational Codeforces Round 181 Editorial
28269 Left and Down greedy math number theory Statement B Educational Codeforces Round 181 (Rated for Div. 2) {2125} PROGRAMMING Educational Codeforces Round 181 Editorial
52934 Only One Digit implementation math Statement A Codeforces Round 1037 (Div. 3) {2126} PROGRAMMING 144845
17477 G-C-D, Unlucky! math number theory Statement E Codeforces Round 1037 (Div. 3) {2126} PROGRAMMING 144845
124 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
1681 Hamed and AghaBalaSar combinatorics math Statement F Atto Round 1 (Codeforces Round 1041, Div. 1 + Div. 2) {2127} PROGRAMMING 3000.0 Atto Round 1 (Codeforces Round 1041, Div. 1 + Div. 2) Editorial
20623 Mix Mex Max constructive algorithms greedy math Statement A Atto Round 1 (Codeforces Round 1041, Div. 1 + Div. 2) {2127} PROGRAMMING 500.0 Atto Round 1 (Codeforces Round 1041, Div. 1 + Div. 2) Editorial
12886 Sum of LDS combinatorics dp math Statement D Codeforces Round 1039 (Div. 2) {2128} PROGRAMMING 1750.0 Codeforces Round #1039 — Editorial
401 Strict Triangle graphs shortest paths Statement F Codeforces Round 1039 (Div. 2) {2128} PROGRAMMING 4000.0 Codeforces Round #1039 — Editorial
1787 Interactive RBS (Hard Version) binary search bitmasks constructive algorithms dp interactive Statement C3 Codeforces Round 1040 (Div. 1) {2129} PROGRAMMING 750.0 Codeforces Round 1040 (Div. 1, Div. 2) Editorial
4214 Interactive RBS (Easy Version) binary search bitmasks constructive algorithms interactive Statement C1 Codeforces Round 1040 (Div. 1) {2129} PROGRAMMING 750.0 Codeforces Round 1040 (Div. 1, Div. 2) Editorial
2857 Interactive RBS (Medium Version) binary search bitmasks constructive algorithms interactive Statement C2 Codeforces Round 1040 (Div. 1) {2129} PROGRAMMING 750.0 Codeforces Round 1040 (Div. 1, Div. 2) Editorial
29098 Submission is All You Need greedy math Statement A Codeforces Round 1040 (Div. 2) {2130} PROGRAMMING 500.0 Codeforces Round 1040 (Div. 1, Div. 2) Editorial
4812 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
3879 Wafu! bitmasks brute force dp math Statement G Codeforces Round 1042 (Div. 3) {2131} PROGRAMMING Codeforces Round 1042 (Div. 3) Editorial
906 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
31455 Alternating Series constructive algorithms greedy math Statement B Codeforces Round 1042 (Div. 3) {2131} PROGRAMMING Codeforces Round 1042 (Div. 3) Editorial
39573 Lever math Statement A Codeforces Round 1042 (Div. 3) {2131} PROGRAMMING Codeforces Round 1042 (Div. 3) Editorial
22243 Make it Equal math number theory Statement C Codeforces Round 1042 (Div. 3) {2131} PROGRAMMING Codeforces Round 1042 (Div. 3) Editorial
9122 From 1 to Infinity binary search dp implementation math Statement D Codeforces Round 1043 (Div. 3) {2132} PROGRAMMING Codeforces Round 1043 (Div. 3) Editorial
13720 The Cunning Seller (hard version) binary search greedy math Statement C2 Codeforces Round 1043 (Div. 3) {2132} PROGRAMMING Codeforces Round 1043 (Div. 3) Editorial
28475 The Cunning Seller (easy version) greedy math Statement C1 Codeforces Round 1043 (Div. 3) {2132} PROGRAMMING Codeforces Round 1043 (Div. 3) Editorial
34375 The Secret Number math Statement B Codeforces Round 1043 (Div. 3) {2132} PROGRAMMING Codeforces Round 1043 (Div. 3) Editorial
7786 Chicken Jockey binary search brute force dp greedy math Statement D Codeforces Round 1044 (Div. 2) {2133} PROGRAMMING 2250.0 Codeforces Round 1044 (Div. 2) Editorial
31810 Redstone? brute force implementation math Statement A Codeforces Round 1044 (Div. 2) {2133} PROGRAMMING 500.0 Codeforces Round 1044 (Div. 2) Editorial
488 Flint and Steel data structures dp Statement F Codeforces Round 1044 (Div. 2) {2133} PROGRAMMING 3250.0 Codeforces Round 1044 (Div. 2) Editorial
27343 Painting With Two Colors constructive algorithms implementation math Statement A Codeforces Round 1045 (Div. 2) {2134} PROGRAMMING 500.0 145832
21820 Add 0 or K constructive algorithms math number theory Statement B Codeforces Round 1045 (Div. 2) {2134} PROGRAMMING 1250.0 145832
1146 From the Unknown (Hard Version) binary search brute force constructive algorithms interactive math Statement D2 Codeforces Round 1046 (Div. 1) {2135} PROGRAMMING 1250.0 Codeforces Round 1046 (Div. 1, Div. 2) Editorial
539 Beyond the Palindrome (Easy Version) combinatorics dp math Statement E1 Codeforces Round 1046 (Div. 1) {2135} PROGRAMMING 3000.0 Codeforces Round 1046 (Div. 1, Div. 2) Editorial
180 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
8172 For the Champion constructive algorithms interactive math Statement B Codeforces Round 1046 (Div. 1) {2135} PROGRAMMING 1000.0 Codeforces Round 1046 (Div. 1, Div. 2) Editorial
3032 From the Unknown (Easy Version) constructive algorithms interactive math Statement D1 Codeforces Round 1046 (Div. 1) {2135} PROGRAMMING 1250.0 Codeforces Round 1046 (Div. 1, Div. 2) Editorial
310 To the Infinity data structures hashing math trees Statement F Codeforces Round 1046 (Div. 1) {2135} PROGRAMMING 4000.0 Codeforces Round 1046 (Div. 1, Div. 2) Editorial
21640 Like the Bitset constructive algorithms greedy two pointers Statement B Codeforces Round 1046 (Div. 2) {2136} PROGRAMMING 1000.0 Codeforces Round 1046 (Div. 1, Div. 2) Editorial
26879 In the Dream greedy math Statement A Codeforces Round 1046 (Div. 2) {2136} PROGRAMMING 500.0 Codeforces Round 1046 (Div. 1, Div. 2) Editorial
23663 Maximum Even Sum brute force greedy implementation math Statement C Codeforces Round 1047 (Div. 3) {2137} PROGRAMMING Codeforces Round 1047 (Div. 3) Editorial
36189 Collatz Conjecture constructive algorithms math Statement A Codeforces Round 1047 (Div. 3) {2137} PROGRAMMING Codeforces Round 1047 (Div. 3) Editorial
27262 Fun Permutation constructive algorithms math number theory Statement B Codeforces Round 1047 (Div. 3) {2137} PROGRAMMING Codeforces Round 1047 (Div. 3) Editorial
10604 Mexification implementation math Statement E Codeforces Round 1047 (Div. 3) {2137} PROGRAMMING Codeforces Round 1047 (Div. 3) Editorial
678 Antiamuny and Slider Movement binary search brute force combinatorics implementation math Statement D Codeforces Round 1048 (Div. 1) {2138} PROGRAMMING 2500.0 Codeforces Round 1048 (Div. 1, Div. 2) Editorial
17696 Cake Assignment bitmasks constructive algorithms Statement A Codeforces Round 1048 (Div. 1) {2138} PROGRAMMING 500.0 Codeforces Round 1048 (Div. 1, Div. 2) Editorial
26604 Maple and Multiplication greedy math Statement A Codeforces Round 1048 (Div. 2) {2139} PROGRAMMING 500.0 Codeforces Round 1048 (Div. 1, Div. 2) Editorial
23102 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
5187 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
484 Avoid Minimums *special greedy math Statement D Kotlin Heroes: Episode 13 {2141} PROGRAMMING Kotlin Heroes 13 Editorial
2107 Make Good constructive algorithms math strings Statement E Codeforces Round 1051 (Div. 2) {2143} PROGRAMMING 2500.0 Codeforces Round 1051 (Div. 2) Editorial
451 Increasing Xor data structures math Statement F Codeforces Round 1051 (Div. 2) {2143} PROGRAMMING 3000.0 Codeforces Round 1051 (Div. 2) Editorial
22256 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
7341 Price Tags dp math Statement D Educational Codeforces Round 182 (Rated for Div. 2) {2144} PROGRAMMING Educational Codeforces Round 182 Editorial
3239 Predicting Popularity binary search data structures math sortings Statement E Educational Codeforces Round 183 (Rated for Div. 2) {2145} PROGRAMMING Educational Codeforces Round 183 Editorial
31870 Candies for Nephews brute force math Statement A Educational Codeforces Round 183 (Rated for Div. 2) {2145} PROGRAMMING Educational Codeforces Round 183 Editorial
640 Cost of Coloring combinatorics fft math Statement G Educational Codeforces Round 183 (Rated for Div. 2) {2145} PROGRAMMING Educational Codeforces Round 183 Editorial
7010 Inversion Value of a Permutation constructive algorithms dfs and similar dp math Statement D Educational Codeforces Round 183 (Rated for Div. 2) {2145} PROGRAMMING Educational Codeforces Round 183 Editorial
13919 Wrong Binary Search binary search constructive algorithms Statement C Codeforces Round 1052 (Div. 2) {2146} PROGRAMMING 1250.0 Codeforces Round 1052 (Div. 2) Editorial
646 Modular Tetration combinatorics math number theory Statement G Codeforces Global Round 29 (Div. 1 + Div. 2) {2147} PROGRAMMING 4500.0
49200 Sublime Sequence brute force math Statement A Codeforces Round 1050 (Div. 4) {2148} PROGRAMMING Codeforces Round 1050 (Div. 4) Editorial
4324 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
26104 Pacer greedy math Statement C Codeforces Round 1050 (Div. 4) {2148} PROGRAMMING Codeforces Round 1050 (Div. 4) Editorial
4985 Nezuko in the Clearing binary search math ternary search Statement F Codeforces Round 1054 (Div. 3) {2149} PROGRAMMING __rose
42166 Be Positive math Statement A Codeforces Round 1054 (Div. 3) {2149} PROGRAMMING __rose
223 Counting Is Fun: The Finale Statement G Codeforces Round 1053 (Div. 1) {2150} PROGRAMMING 4250.0 Editorial of Codeforces Round 1053 (Div. 1, Div. 2)
939 Attraction Theory combinatorics dp implementation math Statement D Codeforces Round 1053 (Div. 1) {2150} PROGRAMMING 2500.0 Editorial of Codeforces Round 1053 (Div. 1, Div. 2)
7020 Grid Counting combinatorics math Statement B Codeforces Round 1053 (Div. 1) {2150} PROGRAMMING 1000.0 Editorial of Codeforces Round 1053 (Div. 1, Div. 2)
659 Hidden Single (Version 2) divide and conquer interactive math probabilities Statement E2 Codeforces Round 1053 (Div. 1) {2150} PROGRAMMING 1750.0 Editorial of Codeforces Round 1053 (Div. 1, Div. 2)
1887 Hidden Single (Version 1) divide and conquer interactive math probabilities sortings Statement E1 Codeforces Round 1053 (Div. 1) {2150} PROGRAMMING 2000.0 Editorial of Codeforces Round 1053 (Div. 1, Div. 2)
3497 Monotone Subsequence brute force constructive algorithms dp graphs interactive math Statement E Squarepoint Challenge (Codeforces Round 1055, Div. 1 + Div. 2) {2152} PROGRAMMING 3000.0 Squarepoint Challenge (Codeforces Round 1055, Div. 1 + Div. 2) Editorial
2217 Query Jungle data structures data structures implementation math math trees Statement G Squarepoint Challenge (Codeforces Round 1055, Div. 1 + Div. 2) {2152} PROGRAMMING 4000.0 Squarepoint Challenge (Codeforces Round 1055, Div. 1 + Div. 2) Editorial
13392 Triple Removal data structures greedy math Statement C Squarepoint Challenge (Codeforces Round 1055, Div. 1 + Div. 2) {2152} PROGRAMMING 1500.0 Squarepoint Challenge (Codeforces Round 1055, Div. 1 + Div. 2) Editorial
13709 Catching the Krug games math Statement B Squarepoint Challenge (Codeforces Round 1055, Div. 1 + Div. 2) {2152} PROGRAMMING 1500.0 Squarepoint Challenge (Codeforces Round 1055, Div. 1 + Div. 2) Editorial
23049 Bitwise Reversion bitmasks Statement B Codeforces Round 1057 (Div. 2) {2153} PROGRAMMING 750.0 Codeforces Round 1057 (Div. 2) Editorial
1031 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
335 Odd Queries on Odd Array data structures trees Statement F Codeforces Round 1057 (Div. 2) {2153} PROGRAMMING 3250.0 Codeforces Round 1057 (Div. 2) Editorial
1245 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
14108 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
5698 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
23633 Notelock greedy two pointers Statement A Codeforces Round 1060 (Div. 2) {2154} PROGRAMMING 500.0 Codeforces Round 1060 (Div. 2) Editorial
3077 Mimo & Yuyu games greedy math Statement E Codeforces Round 1056 (Div. 2) {2155} PROGRAMMING 2250.0 Codeforces Round 1056 (Div. 2) Editorial
25836 El fucho implementation math Statement A Codeforces Round 1056 (Div. 2) {2155} PROGRAMMING 500.0 Codeforces Round 1056 (Div. 2) Editorial
6165 Batteries interactive math Statement D Codeforces Round 1056 (Div. 2) {2155} PROGRAMMING 2000.0 Codeforces Round 1056 (Div. 2) Editorial
21471 Strange Machine binary search brute force greedy implementation Statement B Codeforces Round 1061 (Div. 2) {2156} PROGRAMMING 750.0 Codeforces Round 1061 (Div. 2) Editorial
5522 Find the Last Number bitmasks constructive algorithms interactive math Statement D Codeforces Round 1061 (Div. 2) {2156} PROGRAMMING 2000.0 Codeforces Round 1061 (Div. 2) Editorial
12780 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
556 Isaac's Queries brute force constructive algorithms dfs and similar divide and conquer greedy interactive math probabilities Statement G Codeforces Round 1066 (Div. 1 + Div. 2) {2157} PROGRAMMING 3000.0 Codeforces Round 1066 (Div. 1 + Div. 2) Editorial
10386 Meximum Array 2 constructive algorithms greedy math Statement C Codeforces Round 1066 (Div. 1 + Div. 2) {2157} PROGRAMMING 1500.0 Codeforces Round 1066 (Div. 1 + Div. 2) Editorial
6908 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
13958 Expansion Plan 2 implementation math Statement B Codeforces Round 1066 (Div. 1 + Div. 2) {2157} PROGRAMMING 1000.0 Codeforces Round 1066 (Div. 1 + Div. 2) Editorial
3419 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
287 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
14636 Split constructive algorithms greedy math Statement B Codeforces Round 1067 (Div. 2) {2158} PROGRAMMING 1250.0 Codeforces Round 1067 (Div. 2) Editorial
23970 Suspension greedy math Statement A Codeforces Round 1067 (Div. 2) {2158} PROGRAMMING 500.0 Codeforces Round 1067 (Div. 2) Editorial
1445 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
2271 Twin Polynomials combinatorics graph matchings graphs math Statement C Codeforces Round 1058 (Div. 1) {2159} PROGRAMMING 1500.0 Codeforces Round 1058 Editorial
419 Inverse Minimum Partition (Hard Version) dp greedy Statement D2 Codeforces Round 1058 (Div. 1) {2159} PROGRAMMING 1750.0 Codeforces Round 1058 Editorial
1087 Super-Short-Polynomial-San math math meet-in-the-middle meet-in-the-middle Statement E Codeforces Round 1058 (Div. 1) {2159} PROGRAMMING 3000.0 Codeforces Round 1058 Editorial
18293 Distinct Elements greedy math Statement B Codeforces Round 1058 (Div. 2) {2160} PROGRAMMING 1000.0 Codeforces Round 1058 Editorial
22836 MEX Partition math Statement A Codeforces Round 1058 (Div. 2) {2160} PROGRAMMING 500.0 Codeforces Round 1058 Editorial
802 Left is Always Right combinatorics math Statement E Pinely Round 5 (Div. 1 + Div. 2) {2161} PROGRAMMING 3000.0
15995 Round Trip games greedy implementation math Statement A Pinely Round 5 (Div. 1 + Div. 2) {2161} PROGRAMMING 500.0
2892 Beautiful Tree constructive algorithms math trees Statement G Codeforces Round 1059 (Div. 3) {2162} PROGRAMMING Codeforces Round 1059 (Div. 3) Editorial
9455 Siga ta Kymata constructive algorithms math Statement B Codeforces Round 1063 (Div. 2) {2163} PROGRAMMING 1000.0 Codeforces Round 1063 Editorial
9516 Monopati dp math two pointers Statement C Codeforces Round 1063 (Div. 2) {2163} PROGRAMMING 1250.0 Codeforces Round 1063 Editorial
20035 Souvlaki VS. Kalamaki math sortings Statement A Codeforces Round 1063 (Div. 2) {2163} PROGRAMMING 500.0 Codeforces Round 1063 Editorial
5698 Copy String binary search greedy implementation strings Statement D Codeforces Global Round 30 (Div. 1 + Div. 2) {2164} PROGRAMMING 1750.0 Codeforces Global Round 30 Editorial
576 Chain Prefix Rank (Hard Version) combinatorics data structures dp math Statement F2 Codeforces Global Round 30 (Div. 1 + Div. 2) {2164} PROGRAMMING 1500.0 Codeforces Global Round 30 Editorial
1003 Chain Prefix Rank (Easy Version) combinatorics dfs and similar dp math Statement F1 Codeforces Global Round 30 (Div. 1 + Div. 2) {2164} PROGRAMMING 2500.0 Codeforces Global Round 30 Editorial
5364 Marble Council dp math Statement B Codeforces Round 1064 (Div. 1) {2165} PROGRAMMING 1000.0 148452
18839 Tab Closing math Statement B Codeforces Round 1064 (Div. 2) {2166} PROGRAMMING 750.0 Codeforces Round 1064 (Div. 1, Div. 2) Editorial
9490 khba Loves to Sleep! binary search data structures geometry implementation math Statement E Codeforces Round 1062 (Div. 4) {2167} PROGRAMMING Arpa Video Tutorial
31339 Yet Another Array Problem brute force math number theory Statement D Codeforces Round 1062 (Div. 4) {2167} PROGRAMMING Arpa Video Tutorial
60924 Square? math Statement A Codeforces Round 1062 (Div. 4) {2167} PROGRAMMING Arpa Video Tutorial
3528 Encode and Decode (Hard Version) bitmasks interactive math Statement A2 Testing Round 20 (Unrated, Communication Problems) {2168} PROGRAMMING Testing Round 20 Editorial (officially unofficial)
8941 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
2366 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
353 Subsequence Problem combinatorics dp fft math Statement F Educational Codeforces Round 184 (Rated for Div. 2) {2169} PROGRAMMING Educational Codeforces Round 184 Editorial
13289 Range Operation math two pointers Statement C Educational Codeforces Round 184 (Rated for Div. 2) {2169} PROGRAMMING Educational Codeforces Round 184 Editorial
20506 Maximum Neighborhood greedy math Statement A Educational Codeforces Round 185 (Rated for Div. 2) {2170} PROGRAMMING Educational Codeforces Round 185 Editorial
15128 Addition on a Segment greedy math Statement B Educational Codeforces Round 185 (Rated for Div. 2) {2170} PROGRAMMING Educational Codeforces Round 185 Editorial
2434 Sakura Adachi and Optimal Sequences bitmasks combinatorics greedy math Statement G Codeforces Round 1065 (Div. 3) {2171} PROGRAMMING Codeforces Round 1065 (Div. 3) Editorial
38119 Shizuku Hoshikawa and Farm Legs math Statement A Codeforces Round 1065 (Div. 3) {2171} PROGRAMMING Codeforces Round 1065 (Div. 3) Editorial
107 Circles Are Far from Each Other Statement C 2025 ICPC Asia Taichung Regional Contest (Unrated, Online Mirror, ICPC Rules, Preferably Teams) {2172} PROGRAMMING
114 Divisor Card Game Statement D 2025 ICPC Asia Taichung Regional Contest (Unrated, Online Mirror, ICPC Rules, Preferably Teams) {2172} PROGRAMMING
4201 Cluster Computing System Statement F 2025 ICPC Asia Taichung Regional Contest (Unrated, Online Mirror, ICPC Rules, Preferably Teams) {2172} PROGRAMMING
871 Kindergarten Homework Statement K 2025 ICPC Asia Taichung Regional Contest (Unrated, Online Mirror, ICPC Rules, Preferably Teams) {2172} PROGRAMMING
619 Isla's Memory Thresholds binary search data structures divide and conquer math Statement F Codeforces Round 1068 (Div. 2) {2173} PROGRAMMING 3000.0
3794 Taiga's Carry Chains bitmasks brute force dp greedy Statement D Codeforces Round 1068 (Div. 2) {2173} PROGRAMMING 1750.0
24370 Sleeping Through Classes implementation Statement A Codeforces Round 1068 (Div. 2) {2173} PROGRAMMING 500.0
1608 Shiro's Mirror Duel interactive probabilities Statement E Codeforces Round 1068 (Div. 2) {2173} PROGRAMMING 2250.0
102 Game of Scientists (Version 2) brute force chinese remainder theorem interactive math Statement E2 Codeforces Round 1069 (Div. 1) {2174} PROGRAMMING 1750.0 Codeforces Round 1069 Editorial
147 Game of Scientists (Version 1) chinese remainder theorem interactive math Statement E1 Codeforces Round 1069 (Div. 1) {2174} PROGRAMMING 1750.0 Codeforces Round 1069 Editorial
505 Mosaic Tree combinatorics dp fft math trees Statement F Codeforces Round 1069 (Div. 1) {2174} PROGRAMMING 3500.0 Codeforces Round 1069 Editorial
15109 Needle in a Haystack greedy strings two pointers Statement A Codeforces Round 1069 (Div. 1) {2174} PROGRAMMING 500.0 Codeforces Round 1069 Editorial
1240 Beautiful Patterns (Easy Version) math probabilities Statement C1 Codeforces Round 1069 (Div. 1) {2174} PROGRAMMING 1500.0 Codeforces Round 1069 Editorial
1090 Beautiful Patterns (Hard Version) math probabilities Statement C2 Codeforces Round 1069 (Div. 1) {2174} PROGRAMMING 500.0 Codeforces Round 1069 Editorial
12871 XOR Array math Statement B Codeforces Round 1069 (Div. 2) {2175} PROGRAMMING 750.0 Codeforces Round 1069 Editorial
1559 Omega Numbers bitmasks dp math number theory Statement F Codeforces Round 1070 (Div. 2) {2176} PROGRAMMING 2750.0 Codeforces Round 1070 (Div.2) Editorial
16360 Odd Process greedy math sortings Statement C Codeforces Round 1070 (Div. 2) {2176} PROGRAMMING 1500.0 Codeforces Round 1070 (Div.2) Editorial
26410 Yes or Yes brute force greedy strings Statement A Good Bye 2025 {2178} PROGRAMMING 500.0
22300 Impost or Sus greedy implementation strings Statement B Good Bye 2025 {2178} PROGRAMMING 750.0
14073 Blackslex and Penguin Civilization bitmasks constructive algorithms greedy math Statement D Codeforces Round 1071 (Div. 3) {2179} PROGRAMMING Codeforces Round 1071 (Div. 3) Editorial
1348 Blackslex and Plants bitmasks data structures dp math Statement H Codeforces Round 1071 (Div. 3) {2179} PROGRAMMING Codeforces Round 1071 (Div. 3) Editorial
1257 Blackslex and Penguin Migration brute force interactive math Statement G Codeforces Round 1071 (Div. 3) {2179} PROGRAMMING Codeforces Round 1071 (Div. 3) Editorial
6005 Blackslex and Girls constructive algorithms geometry math Statement E Codeforces Round 1071 (Div. 3) {2179} PROGRAMMING Codeforces Round 1071 (Div. 3) Editorial
23078 Blackslex and Number Theory math number theory sortings sortings Statement C Codeforces Round 1071 (Div. 3) {2179} PROGRAMMING Codeforces Round 1071 (Div. 3) Editorial
35286 Blackslex and Password math strings Statement A Codeforces Round 1071 (Div. 3) {2179} PROGRAMMING Codeforces Round 1071 (Div. 3) Editorial
6691 XOR-factorization bitmasks constructive algorithms dp greedy number theory Statement C Codeforces Global Round 31 (Div. 1 + Div. 2) {2180} PROGRAMMING 1500.0 Codeforces Global Round 31
1790 No Effect XOR bitmasks math Statement E Codeforces Global Round 31 (Div. 1 + Div. 2) {2180} PROGRAMMING 2000.0 Codeforces Global Round 31
152 Balance combinatorics math Statement G Codeforces Global Round 31 (Div. 1 + Div. 2) {2180} PROGRAMMING 2750.0 Codeforces Global Round 31
4367 Insolvable Disks greedy math Statement D Codeforces Global Round 31 (Div. 1 + Div. 2) {2180} PROGRAMMING 1750.0 Codeforces Global Round 31
25097 Ashmal greedy strings Statement B Codeforces Global Round 31 (Div. 1 + Div. 2) {2180} PROGRAMMING 750.0 Codeforces Global Round 31
674 Greta's Game binary search dp math Statement G 2025-2026 ICPC, NERC, Northern Eurasia Finals (Unrated, Online Mirror, ICPC Rules, Teams Preferred) {2181} PROGRAMMING Tutorial
166 Cacti Classification binary search interactive math Statement C 2025-2026 ICPC, NERC, Northern Eurasia Finals (Unrated, Online Mirror, ICPC Rules, Teams Preferred) {2181} PROGRAMMING Tutorial
3953 Alphabet City binary search math strings Statement A 2025-2026 ICPC, NERC, Northern Eurasia Finals (Unrated, Online Mirror, ICPC Rules, Teams Preferred) {2181} PROGRAMMING Tutorial
741 Jinx or Jackpot brute force dp math probabilities Statement J 2025-2026 ICPC, NERC, Northern Eurasia Finals (Unrated, Online Mirror, ICPC Rules, Teams Preferred) {2181} PROGRAMMING Tutorial
149 LLM Training math Statement L 2025-2026 ICPC, NERC, Northern Eurasia Finals (Unrated, Online Mirror, ICPC Rules, Teams Preferred) {2181} PROGRAMMING Tutorial
7203 Honey Cake math number theory Statement H 2025-2026 ICPC, NERC, Northern Eurasia Finals (Unrated, Online Mirror, ICPC Rules, Teams Preferred) {2181} PROGRAMMING Tutorial
9392 Christmas Tree Decoration combinatorics dp greedy math Statement D Educational Codeforces Round 186 (Rated for Div. 2) {2182} PROGRAMMING Educational Codeforces Round 186 Editorial
11148 War Strategy binary search greedy math two pointers Statement C Hello 2026 {2183} PROGRAMMING 1500.0
169 Minimise Cost dp Statement H Hello 2026 {2183} PROGRAMMING 4000.0
2961 LCM is Legendary Counting Master dp math number theory Statement E Hello 2026 {2183} PROGRAMMING 2250.0
22896 Huge Pile binary search math Statement C Codeforces Round 1072 (Div. 3) {2184} PROGRAMMING Codeforces Round 1072 (Div. 3) Editorial
10012 Unfair Game combinatorics dp math Statement D Codeforces Round 1072 (Div. 3) {2184} PROGRAMMING Codeforces Round 1072 (Div. 3) Editorial
39566 Social Experiment math Statement A Codeforces Round 1072 (Div. 3) {2184} PROGRAMMING Codeforces Round 1072 (Div. 3) Editorial
25153 Hourglass math Statement B Codeforces Round 1072 (Div. 3) {2184} PROGRAMMING Codeforces Round 1072 (Div. 3) Editorial
45337 Perfect Root constructive algorithms math Statement A Codeforces Round 1074 (Div. 4) {2185} PROGRAMMING Codeforces Round 1074 (Div. 4) Editorial
3629 Mixing MEXes data structures implementation math Statement G Codeforces Round 1074 (Div. 4) {2185} PROGRAMMING Codeforces Round 1074 (Div. 4) Editorial
21736 OutOfMemoryError data structures implementation math two pointers Statement D Codeforces Round 1074 (Div. 4) {2185} PROGRAMMING Codeforces Round 1074 (Div. 4) Editorial
699 Cool Problem bitmasks brute force divide and conquer dp math Statement D Codeforces Round 1077 (Div. 1) {2187} PROGRAMMING 2000.0 Codeforces Round 1077 (Div. 1, Div. 2) Editorial
22079 Seats greedy Statement B Codeforces Round 1077 (Div. 2) {2188} PROGRAMMING 1000.0 Codeforces Round 1077 (Div. 1, Div. 2) Editorial
2052 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
14610 XOR Convenience (Easy Version) bitmasks brute force constructive algorithms math Statement C1 Codeforces Round 1075 (Div. 2) {2189} PROGRAMMING 1250.0 Codeforces Round 1075 (Div. 2) Editorial
6475 XOR-convenience (Hard Version) bitmasks brute force constructive algorithms math Statement C2 Codeforces Round 1075 (Div. 2) {2189} PROGRAMMING 750.0 Codeforces Round 1075 (Div. 2) Editorial
4194 Little String (Easy Version) combinatorics dp math Statement D1 Codeforces Round 1075 (Div. 2) {2189} PROGRAMMING 2000.0 Codeforces Round 1075 (Div. 2) Editorial
882 Majority Wins? dp greedy math strings Statement E Codeforces Round 1075 (Div. 2) {2189} PROGRAMMING 2500.0 Codeforces Round 1075 (Div. 2) Editorial
16108 The Curse of the Frog greedy math Statement B Codeforces Round 1075 (Div. 2) {2189} PROGRAMMING 1000.0 Codeforces Round 1075 (Div. 2) Editorial
18134 Sorting Game games greedy Statement A Codeforces Round 1073 (Div. 1) {2190} PROGRAMMING 500.0 Codeforces Round 1073 (Div. 1, Div. 2) Editorial
105 Maximize Determinant graphs Statement G Codeforces Round 1073 (Div. 1) {2190} PROGRAMMING 3750.0 Codeforces Round 1073 (Div. 1, Div. 2) Editorial
12028 All-in-one Gun binary search greedy math Statement C Codeforces Round 1081 (Div. 2) {2192} PROGRAMMING 1250.0 Codeforces Round 1081 (Div. 2) Editorial
193 Fish Fight dp math probabilities Statement F Codeforces Round 1081 (Div. 2) {2192} PROGRAMMING 3000.0 Codeforces Round 1081 (Div. 2) Editorial
44132 DBMB and the Array brute force math Statement A Codeforces Round 1076 (Div. 3) {2193} PROGRAMMING Разбор Codeforces Round 1076 (Div. 3)
16036 Product Queries dp math number theory Statement E Codeforces Round 1076 (Div. 3) {2193} PROGRAMMING Разбор Codeforces Round 1076 (Div. 3)
11583 Secret message bitmasks math Statement C Codeforces Round 1078 (Div. 2) {2194} PROGRAMMING 1750.0 Codeforces Round #1078 Editorial
19762 Offshores greedy implementation math Statement B Codeforces Round 1078 (Div. 2) {2194} PROGRAMMING 1000.0 Codeforces Round #1078 Editorial
24866 Lawn Mower math Statement A Codeforces Round 1078 (Div. 2) {2194} PROGRAMMING 500.0 Codeforces Round #1078 Editorial
2902 Parabola Independence dp graphs math Statement F Codeforces Round 1080 (Div. 3) {2195} PROGRAMMING Codeforces Round 1080 (Div. 3) Editorial
37469 Sieve of Erato67henes math Statement A Codeforces Round 1080 (Div. 3) {2195} PROGRAMMING Codeforces Round 1080 (Div. 3) Editorial
14697 Absolute Cinema math Statement D Codeforces Round 1080 (Div. 3) {2195} PROGRAMMING Codeforces Round 1080 (Div. 3) Editorial
310 Fuzzy Concatenation (Easy Version) binary search bitmasks brute force data structures greedy string suffix structures Statement E1 Codeforces Round 1079 (Div. 1) {2196} PROGRAMMING 2000.0 Tutorial
237 Fuzzy Concatenation (Hard version) binary search data structures dp greedy string suffix structures Statement E2 Codeforces Round 1079 (Div. 1) {2196} PROGRAMMING 1000.0 Tutorial
9242 Another Problem about Beautiful Pairs brute force math two pointers Statement B Codeforces Round 1079 (Div. 1) {2196} PROGRAMMING 750.0 Tutorial
1068 Double Bracket Sequence data structures dp greedy sortings Statement D Codeforces Round 1079 (Div. 1) {2196} PROGRAMMING 2250.0 Tutorial
17193 Game with a Fraction games math Statement A Codeforces Round 1079 (Div. 1) {2196} PROGRAMMING 500.0 Tutorial
23779 Friendly Numbers brute force math Statement A Codeforces Round 1079 (Div. 2) {2197} PROGRAMMING 500.0
98 Sum of MEX *special combinatorics data structures dp math Statement H Kotlin Heroes: Episode 14 {2199} PROGRAMMING 151783
167 Self-Produced Sequences *special combinatorics math Statement F Kotlin Heroes: Episode 14 {2199} PROGRAMMING 151783
1165 Two Towers *special greedy math Statement B Kotlin Heroes: Episode 14 {2199} PROGRAMMING 151783
318 Two Arrays *special math Statement D Kotlin Heroes: Episode 14 {2199} PROGRAMMING 151783
63 Jammer *special math Statement G Kotlin Heroes: Episode 14 {2199} PROGRAMMING 151783
1154 Operation Permutation combinatorics dp math probabilities Statement G Codeforces Round 1084 (Div. 3) {2200} PROGRAMMING Codeforces Round 1084 (Div. 3) Editorial
523 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
9171 Divisive Battle games greedy math number theory Statement E Codeforces Round 1084 (Div. 3) {2200} PROGRAMMING Codeforces Round 1084 (Div. 3) Editorial
13256 Portal greedy sortings Statement D Codeforces Round 1084 (Div. 3) {2200} PROGRAMMING Codeforces Round 1084 (Div. 3) Editorial
2178 Rigged Bracket Sequence combinatorics dp Statement C Codeforces Round 1082 (Div. 1) {2201} PROGRAMMING 1750.0 Codeforces Round 1082 (Div. 1, Div. 2) Complete Editorial
74 Codeforces Heuristic Contest 1001 constructive algorithms Statement G Codeforces Round 1082 (Div. 1) {2201} PROGRAMMING 5000.0 Codeforces Round 1082 (Div. 1, Div. 2) Complete Editorial
300 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
17275 Parkour Design math Statement A Codeforces Round 1082 (Div. 2) {2202} PROGRAMMING 750.0 Codeforces Round 1082 (Div. 1, Div. 2) Complete Editorial
7893 Test Generator binary search bitmasks greedy math Statement C Educational Codeforces Round 187 (Rated for Div. 2) {2203} PROGRAMMING Educational Codeforces Round 187 Editorial
1510 Probabilistic Card Game binary search data structures math ternary search Statement E Educational Codeforces Round 187 (Rated for Div. 2) {2203} PROGRAMMING Educational Codeforces Round 187 Editorial
453 Binary Search with One Swap binary search divide and conquer dp hashing math Statement F Educational Codeforces Round 187 (Rated for Div. 2) {2203} PROGRAMMING Educational Codeforces Round 187 Editorial
16098 Beautiful Numbers dp greedy math Statement B Educational Codeforces Round 187 (Rated for Div. 2) {2203} PROGRAMMING Educational Codeforces Round 187 Editorial
19564 Towers of Boxes math Statement A Educational Codeforces Round 187 (Rated for Div. 2) {2203} PROGRAMMING Educational Codeforces Round 187 Editorial
1337 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
5154 Sum of Digits (and Again) brute force constructive algorithms math Statement E Educational Codeforces Round 188 (Rated for Div. 2) {2204} PROGRAMMING Educational Codeforces Round 188 Editorial
19473 Spring math Statement C Educational Codeforces Round 188 (Rated for Div. 2) {2204} PROGRAMMING Educational Codeforces Round 188 Editorial
17357 Simons and Cakes for Success implementation math Statement B Codeforces Round 1083 (Div. 2) {2205} PROGRAMMING 750.0 Tutorial
755 Upside Down Dijkstra dfs and similar Statement C 2026 ICPC Asia Pacific Championship - Online Mirror (Unrated, Online Mirror, ICPC Rules, Teams Preferred) {2206} PROGRAMMING Tutorial (PDF)
958 N-MEX (Counting Version) combinatorics math Statement E2 Codeforces Round 1085 (Div. 1 + Div. 2) {2207} PROGRAMMING 1000.0 Codeforces Round 1085 (Div. 1 + Div. 2) Editorial
14814 1-1 greedy strings Statement A Codeforces Round 1085 (Div. 1 + Div. 2) {2207} PROGRAMMING 750.0 Codeforces Round 1085 (Div. 1 + Div. 2) Editorial
21766 Bingo Candies constructive algorithms math Statement A Codeforces Round 1086 (Div. 2) {2208} PROGRAMMING 500.0 Tutorial
12485 Stamina and Tasks dp greedy math Statement C Codeforces Round 1086 (Div. 2) {2208} PROGRAMMING 1250.0 Tutorial
257 A Simple Problem binary search greedy math trees Statement F Codeforces Round 1089 (Div. 2) {2210} PROGRAMMING 3500.0 Codeforces Round 1089 (Div. 2) Editorial
361 Binary Strings are Simple? constructive algorithms dsu interactive number theory Statement E Codeforces Round 1089 (Div. 2) {2210} PROGRAMMING 2750.0 Codeforces Round 1089 (Div. 2) Editorial
2368 A Simple GCD Problem (Hard Version) dp greedy number theory Statement C2 Codeforces Round 1089 (Div. 2) {2210} PROGRAMMING 1000.0 Codeforces Round 1089 (Div. 2) Editorial
14411 A Simple GCD Problem (Easy Version) greedy number theory Statement C1 Codeforces Round 1089 (Div. 2) {2210} PROGRAMMING 1250.0 Codeforces Round 1089 (Div. 2) Editorial
118 Median Deletion Statement H Nebius Round 2 (Codeforces Round 1088, Div. 1 + Div. 2) {2211} PROGRAMMING 4000.0 Nebius Round 2 and Codeforces Round 1088 Editorial
3220 AND-array bitmasks combinatorics math Statement D Nebius Round 2 (Codeforces Round 1088, Div. 1 + Div. 2) {2211} PROGRAMMING 2000.0 Nebius Round 2 and Codeforces Round 1088 Editorial
12841 Mickey Mouse Constructive greedy math Statement B Nebius Round 2 (Codeforces Round 1088, Div. 1 + Div. 2) {2211} PROGRAMMING 1250.0 Nebius Round 2 and Codeforces Round 1088 Editorial
17560 Antimedian Deletion implementation math Statement A Nebius Round 2 (Codeforces Round 1088, Div. 1 + Div. 2) {2211} PROGRAMMING 500.0 Nebius Round 2 and Codeforces Round 1088 Editorial
6848 Are You Smiling? *special Statement B April Fools Day Contest 2026 {2214} PROGRAMMING April Fools Day Contest 2026 Editorial
1266 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
3630 Interval Mod constructive algorithms dp greedy math Statement A Codeforces Round 1092 (Unrated, Div. 1, Based on THUPC 2026 — Finals) {2215} PROGRAMMING 750.0 152930
872 Interval Game bitmasks combinatorics dp games greedy math probabilities Statement F Codeforces Round 1091 (Div. 2) and CodeCraft 26 {2217} PROGRAMMING 2750.0 Tutorial
3746 Flip the Bit (Hard Version) greedy implementation math Statement D Codeforces Round 1091 (Div. 2) and CodeCraft 26 {2217} PROGRAMMING 1500.0 Tutorial
11810 Grid Covering math number theory Statement C Codeforces Round 1091 (Div. 2) and CodeCraft 26 {2217} PROGRAMMING 1500.0 Tutorial
41219 The 67th Integer Problem brute force games implementation math Statement A Codeforces Round 1090 (Div. 4) {2218} PROGRAMMING Codeforces Round 1090 (Div. 4) Editorial
30460 The 67th Permutation Problem constructive algorithms greedy math Statement C Codeforces Round 1090 (Div. 4) {2218} PROGRAMMING Codeforces Round 1090 (Div. 4) Editorial
4494 The 67th Iteration of "Counting is Fun" dfs and similar implementation math Statement G Codeforces Round 1090 (Div. 4) {2218} PROGRAMMING Codeforces Round 1090 (Div. 4) Editorial
39391 The 67th 6-7 Integer Problem greedy math Statement B Codeforces Round 1090 (Div. 4) {2218} PROGRAMMING Codeforces Round 1090 (Div. 4) Editorial
21351 The 67th OEIS Problem greedy math number theory Statement D Codeforces Round 1090 (Div. 4) {2218} PROGRAMMING Codeforces Round 1090 (Div. 4) Editorial
524 MEX Replacement on Tree Statement D Codeforces Round 1093 (Div. 1) {2219} PROGRAMMING 2250.0 Codeforces Round 1093 (Div. 1, Div. 2) Editorial
3721 Unique Values (Hard version) binary search constructive algorithms divide and conquer interactive math Statement B2 Codeforces Round 1093 (Div. 1) {2219} PROGRAMMING 500.0 Codeforces Round 1093 (Div. 1, Div. 2) Editorial
10591 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
146 Weird Chessboard constructive algorithms math Statement E Codeforces Round 1093 (Div. 1) {2219} PROGRAMMING 3000.0 Codeforces Round 1093 (Div. 1, Div. 2) Editorial
2359 Seek the Truth binary search bitmasks interactive Statement E Spectral::Cup 2026 Round 1 (Codeforces Round 1094, Div. 1 + Div. 2) {2222} PROGRAMMING 2250.0 Spectral::Cup 2026 Round 1 (Codeforces Round 1094, Div. 1 + Div. 2) Editorial
730 Building Tree divide and conquer dsu graphs implementation Statement F Spectral::Cup 2026 Round 1 (Codeforces Round 1094, Div. 1 + Div. 2) {2222} PROGRAMMING 3000.0 Spectral::Cup 2026 Round 1 (Codeforces Round 1094, Div. 1 + Div. 2) Editorial
12179 A Wonderful Contest math Statement A Spectral::Cup 2026 Round 1 (Codeforces Round 1094, Div. 1 + Div. 2) {2222} PROGRAMMING 500.0 Spectral::Cup 2026 Round 1 (Codeforces Round 1094, Div. 1 + Div. 2) Editorial
907 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
3590 Zhily and Barknights binary search data structures dp math sortings two pointers Statement B Codeforces Round 1097 (Div. 1, Based on Zhili Cup 2026) {2223} PROGRAMMING 750.0 Codeforces Round 1097 (Div. 1, Div2, Based on Zhili Cup 2026) Tutorial