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
3591 Petya and His Friends constructive algorithms math number theory Statement D Codeforces Beta Round 61 (Div. 2) {66} PROGRAMMING Codeforces Beta Round #61 (Div. 2): Editorial 1700
597 Three Horses constructive algorithms math number theory Statement E Codeforces Round 166 (Div. 2) {271} PROGRAMMING 6662 2500
8781 Levko and Permutation constructive algorithms math number theory Statement B Codeforces Round 210 (Div. 2) {361} PROGRAMMING Codeforces Round #210 editorial 1200
3075 Prefix Product Sequence constructive algorithms math number theory Statement C Codeforces Round 278 (Div. 1) {487} PROGRAMMING Tutorial 2600
13720 Soldier and Number Game constructive algorithms dp math number theory Statement D Codeforces Round 304 (Div. 2) {546} PROGRAMMING Codeforces Round #304 (Div.2) editorial 1700
7225 A Trivial Problem brute force constructive algorithms math number theory Statement B Manthan, Codefest 16 {633} PROGRAMMING Manthan, Codefest 16: Editorials 1300
23956 Alyona and Numbers constructive algorithms math number theory Statement A Codeforces Round 358 (Div. 2) {682} PROGRAMMING 45491 1200
13385 Vladik and fractions brute force constructive algorithms math number theory Statement C Codeforces Round 384 (Div. 2) {743} PROGRAMMING Codeforces Round #384 Editorial 1500
38252 Mahmoud and a Triangle constructive algorithms geometry greedy math number theory sortings Statement B Codeforces Round 396 (Div. 2) {766} PROGRAMMING Codeforces round #396 editorial 1100
1443 Vulnerable Kerbals constructive algorithms dp graphs math number theory Statement C VK Cup 2017 - Round 2 {772} PROGRAMMING VK Cup Round 2 + Codeforces Round #409 Tutorial 2400
4692 Ralph And His Magic Field combinatorics constructive algorithms math number theory Statement B Codeforces Round 447 (Div. 2) {894} PROGRAMMING Codeforces Round #447 (Div.2 Only) Editorial 1800
3262 Mahmoud and Ehab and another array construction task constructive algorithms greedy math number theory Statement D Codeforces Round 473 (Div. 2) {959} PROGRAMMING Codeforces round #473 editorial 2000
2814 Missing Numbers binary search constructive algorithms greedy math number theory Statement E Avito Cool Challenge 2018 {1081} PROGRAMMING 63888 1900
9995 Meaningless Operations constructive algorithms math number theory Statement C Codeforces Global Round 1 {1110} PROGRAMMING The Editorial of the First Codeforces Global Round 1500
387 Gold Experience constructive algorithms graphs math number theory probabilities Statement G Codeforces Global Round 3 {1148} PROGRAMMING Codeforces Global Round 3 Editorial 3100
17778 Prefix Sum Primes constructive algorithms greedy math number theory Statement A Codeforces Round 556 (Div. 1) {1149} PROGRAMMING 66783 1300
11913 All the Vowels Please constructive algorithms math number theory Statement B Codeforces Round 561 (Div. 2) {1166} PROGRAMMING Codeforces Round #561 (Div. 2) Editorial 1100
3006 The LCMs Must be Large bitmasks brute force constructive algorithms math number theory Statement E Codeforces Round 561 (Div. 2) {1166} PROGRAMMING Codeforces Round #561 (Div. 2) Editorial 2000
7903 Prime Graph constructive algorithms greedy math number theory Statement D Codeforces Global Round 4 {1178} PROGRAMMING E 1600
13255 Tile Painting constructive algorithms math number theory Statement A Codeforces Round 599 (Div. 1) {1242} PROGRAMMING Codeforces Round #599 Editorial 1500
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
10053 Diverse Matrix constructive algorithms greedy math number theory Statement C Codeforces Global Round 6 {1266} PROGRAMMING Codeforces Global Round 6 Editorial 1400
18917 Composite Coloring brute force constructive algorithms greedy math number theory Statement B Codeforces Round 630 (Div. 2) {1332} PROGRAMMING 1000.0 Codeforces Round #630 Editorial 1500
8332 A/B Matrix constructive algorithms flows greedy math number theory Statement G Codeforces Round 644 (Div. 3) {1360} PROGRAMMING Codeforces Round #644 (Div. 3) Editorial 1900
12289 Two Divisors constructive algorithms math number theory Statement D Educational Codeforces Round 89 (Rated for Div. 2) {1366} PROGRAMMING Educational Codeforces Round 89 Editorial
24972 GCD Compression brute force constructive algorithms math number theory Statement B Codeforces Round 651 (Div. 2) {1370} PROGRAMMING 1000.0 Editorial — Codeforces Round #651
36174 Omkar and Last Class of Math constructive algorithms greedy math number theory Statement B Codeforces Round 655 (Div. 2) {1372} PROGRAMMING 1000.0 Codeforces Round #655 Editorial 1300
2946 Sum of Digits brute force constructive algorithms dp greedy math number theory Statement E Educational Codeforces Round 90 (Rated for Div. 2) {1373} PROGRAMMING Educational Codeforces Round 90 Editorial
49634 LCM Problem constructive algorithms greedy math number theory Statement A Educational Codeforces Round 92 (Rated for Div. 2) {1389} PROGRAMMING 80809
10501 Maximum Distributed Tree constructive algorithms dfs and similar greedy math number theory sortings trees Statement D Codeforces Round 665 (Div. 2) {1401} PROGRAMMING 1750.0 Codeforces Round #665 (Div. 2) Editorial
26749 Mere Array constructive algorithms math number theory number theory sortings sortings Statement C Codeforces Round 665 (Div. 2) {1401} PROGRAMMING 1500.0 Codeforces Round #665 (Div. 2) Editorial
1269 Game of Pairs constructive algorithms dfs and similar interactive math number theory Statement D Codeforces Round 668 (Div. 1) {1404} PROGRAMMING 2250.0 Codeforces Round #668 Editorial
3494 Decryption bitmasks constructive algorithms implementation math number theory Statement E Codeforces Round 671 (Div. 2) {1419} PROGRAMMING 2250.0 Codeforces Round #671 Editorial
1627 Xum bitmasks constructive algorithms math number theory Statement E Codeforces Global Round 11 {1427} PROGRAMMING 1500.0 Editorial of Global Round 11 2500
22076 Number into Sequence constructive algorithms math number theory Statement D Codeforces Round 686 (Div. 3) {1454} PROGRAMMING Codeforces Round #686 (Div. 3) Editorial
10189 Ceil Divisions brute force constructive algorithms math number theory Statement D Educational Codeforces Round 101 (Rated for Div. 2) {1469} PROGRAMMING Educational Codeforces Round 101 Editorial
40032 Different Divisors binary search constructive algorithms greedy math number theory Statement B Codeforces Round 696 (Div. 2) {1474} PROGRAMMING 1000.0 Codeforces Round #696 Editorial
6510 Nezzar and Board constructive algorithms math number theory Statement A Codeforces Round 698 (Div. 1) {1477} PROGRAMMING 500.0 87294 1800
5618 Multiples and Power Differences constructive algorithms math number theory Statement D Codeforces Round 701 (Div. 2) {1485} PROGRAMMING 1750.0 Editorial of Codeforces Round #701 (Div. 2) 2200
24637 GCD Length constructive algorithms math number theory Statement B Educational Codeforces Round 107 (Rated for Div. 2) {1511} PROGRAMMING 89634
18111 Product 1 Modulo N constructive algorithms math number theory Statement C Codeforces Round 716 (Div. 2) {1514} PROGRAMMING 1500.0 Codeforces round #716 editorial
26462 Plus and Multiply constructive algorithms math number theory Statement B Codeforces Round 729 (Div. 2) {1542} PROGRAMMING 1250.0
152 Xor-quiz constructive algorithms dp interactive math number theory Statement H Codeforces Global Round 16 {1566} PROGRAMMING 3750.0 Codeforces Global Round 16 Editorial
17808 Di-visible Confusion constructive algorithms math number theory Statement A Codeforces Round 752 (Div. 1) {1603} PROGRAMMING 750.0 Editorial of Codeforces Round #752 1300
14997 Moderate Modular Mode constructive algorithms math number theory Statement B Codeforces Round 752 (Div. 1) {1603} PROGRAMMING 1000.0 Editorial of Codeforces Round #752 1600
7546 K-good constructive algorithms games math number theory Statement D CodeTON Round 1 (Div. 1 + Div. 2, Rated, Prizes!) {1656} PROGRAMMING 2000.0 Tutorial
4625 GCD Guess bitmasks chinese remainder theorem constructive algorithms interactive math number theory Statement D Codeforces Round 781 (Div. 2) {1665} PROGRAMMING 1500.0 Codeforces Round #781 (Div. 2) Editorial
775 Euclid Guess constructive algorithms flows graph matchings math number theory Statement G Codeforces Round 792 (Div. 1 + Div. 2) {1684} PROGRAMMING 2500.0 Codeforces Round #792 (Div. 1 + Div. 2) Editorial 2800
309 Become Big For Me combinatorics constructive algorithms math number theory Statement E Codeforces Round 796 (Div. 1) {1687} PROGRAMMING 2000.0 Editorial of Codeforces Round 796
9433 Equate Multisets constructive algorithms data structures graph matchings greedy math number theory Statement F Codeforces Round 805 (Div. 3) {1702} PROGRAMMING 104763
17493 Bestie brute force constructive algorithms implementation math number theory Statement A Codeforces Round 830 (Div. 2) {1732} PROGRAMMING 750.0 108327 1000
3236 Rectangular Congruence constructive algorithms math number theory Statement E Codeforces Round 822 (Div. 2) {1734} PROGRAMMING 2250.0 Codeforces Round #822 (Div.2) Editorial
157 Ela and Prime GCD constructive algorithms math number theory Statement F Dytechlab Cup 2022 {1737} PROGRAMMING 3500.0 Editorial of Dytechlab Cup 2022
18919 Candies constructive algorithms math number theory Statement B CodeTON Round 4 (Div. 1 + Div. 2, Rated, Prizes!) {1810} PROGRAMMING 750.0 Editorial of CodeTON Round 4 (Div. 1 + Div. 2, Rated, Prizes!)
4895 Trivial Conjecture *special constructive algorithms math number theory Statement D April Fools Day Contest 2023 {1812} PROGRAMMING Editorial of April Fools Day Contest 2023
17241 No Prime Differences constructive algorithms math number theory Statement C Codeforces Round 877 (Div. 2) {1838} PROGRAMMING 1250.0 Codeforces Round #877 (Div. 2) Editorial
1174 Tree Weights bitmasks constructive algorithms data structures dfs and similar math matrices number theory trees Statement G Codeforces Round 884 (Div. 1 + Div. 2) {1844} PROGRAMMING 3500.0 Codeforces Round #884 (Div. 1 + Div. 2) Editorial
13810 Row Major constructive algorithms math number theory strings Statement D Codeforces Round 884 (Div. 1 + Div. 2) {1844} PROGRAMMING 1500.0 Codeforces Round #884 (Div. 1 + Div. 2) Editorial
25486 Yet Another Permutation Problem constructive algorithms math number theory Statement C Codeforces Round 893 (Div. 2) {1858} PROGRAMMING 1500.0 Codeforces Round #893 (Div. 2) Editorial 1000
15261 Divisor Chain bitmasks constructive algorithms math number theory Statement C Harbour.Space Scholarship Contest 2023-2024 (Div. 1 + Div. 2) {1864} PROGRAMMING 1250.0 Harbour.Space Scholarship Contest 2023-2024 (Div. 1 + Div. 2) Editorial
16915 Insert and Equalize brute force constructive algorithms greedy math number theory Statement C Educational Codeforces Round 159 (Rated for Div. 2) {1902} PROGRAMMING Educational Codeforces Round 159 Editorial
28259 2023 constructive algorithms implementation math number theory Statement A Good Bye 2023 {1916} PROGRAMMING 250.0
31758 Two Divisors constructive algorithms math number theory Statement B Good Bye 2023 {1916} PROGRAMMING 750.0
2088 Modular Sequence constructive algorithms dp greedy implementation math number theory Statement E Codeforces Round 924 (Div. 2) {1928} PROGRAMMING 2250.0 Codeforces Round 924 Editorial
3624 One-Dimensional Puzzle combinatorics constructive algorithms math number theory Statement G Codeforces Round 925 (Div. 3) {1931} PROGRAMMING 125878
7869 Prime XOR Coloring bitmasks constructive algorithms graphs greedy math number theory Statement D Pinely Round 4 (Div. 1 + Div. 2) {1991} PROGRAMMING 1500.0 Video Tutorial
1182 Dyn-scripted Robot (Easy Version) brute force chinese remainder theorem constructive algorithms math number theory Statement F1 Codeforces Round 963 (Div. 2) {1993} PROGRAMMING 2500.0 Editorial of Codeforces Round 963 (Div. 2)
7349 Funny Game constructive algorithms dsu graphs greedy math number theory Statement D Codeforces Round 959 sponsored by NEAR (Div. 1 + Div. 2) {1994} PROGRAMMING 2000.0 Video Tutorial
10254 Squaring brute force constructive algorithms data structures greedy implementation math number theory Statement C Codeforces Round 961 (Div. 2) {1995} PROGRAMMING 1750.0 Video Tutorial
28069 Minimize Equal Sum Subarrays constructive algorithms math number theory Statement B Codeforces Round 965 (Div. 2) {1998} PROGRAMMING 750.0 Video Tutorial
3520 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
15665 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
20513 Everyone Loves Tres constructive algorithms greedy math number theory Statement B Codeforces Global Round 27 {2035} PROGRAMMING 500.0 Codeforces Global Round 27 Editorial
25464 Superultra's Favorite Permutation constructive algorithms greedy math number theory Statement C Codeforces Round 988 (Div. 3) {2037} PROGRAMMING Video Tutorial
6941 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)
8401 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
1170 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
3119 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
428 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
1011 Bermuda Triangle chinese remainder theorem constructive algorithms geometry math number theory Statement C Codeforces Round 1021 (Div. 1) {2097} PROGRAMMING 1500.0 142316
11324 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
8586 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
3175 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
14807 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
877 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
20750 Add 0 or K constructive algorithms math number theory Statement B Codeforces Round 1045 (Div. 2) {2134} PROGRAMMING 1250.0 145832
26314 Fun Permutation constructive algorithms math number theory Statement B Codeforces Round 1047 (Div. 3) {2137} PROGRAMMING Codeforces Round 1047 (Div. 3) Editorial
22011 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
209 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
2251 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