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
629 Lucky Tickets binary search data structures sortings two pointers Statement C Codeforces Beta Round 64 {70} PROGRAMMING Analysis Codeforces Beta Round #64 2200
609 Conveyor sortings two pointers Statement C VK Cup 2012 Round 2 {163} PROGRAMMING VK Cup 2012 Round 2 — Разбор 2200
388 Shoe Store dp graph matchings greedy sortings two pointers Statement D Codeforces Round 113 (Div. 2) {166} PROGRAMMING Codeforces Round #113 (Div. 2) Tutorial 2400
1513 Geometry Horse greedy implementation sortings two pointers Statement C Codeforces Round 115 {175} PROGRAMMING Codeforces Round #115 — editorial A-E 1600
309 Transportation greedy sortings two pointers Statement E Codeforces Round 128 (Div. 2) {203} PROGRAMMING 2400
1495 Spider's Web binary search sortings two pointers Statement D Codeforces Round 133 (Div. 2) {216} PROGRAMMING Editorial for Codeforces Round #133 1800
2338 Olympiad binary search greedy sortings two pointers Statement D Codeforces Round 137 (Div. 2) {222} PROGRAMMING Разбор задач Codeforces Round #137 (Div. 2) 1800
9635 To Add or Not to Add binary search sortings two pointers Statement C Codeforces Round 143 (Div. 2) {231} PROGRAMMING Tutorial Codeforces Round #143 1700
12220 Physics Practical binary search dp sortings two pointers Statement B Codeforces Round 154 (Div. 2) {253} PROGRAMMING Codeforces Round #154 (Div. 2) — tutorial 1400
576 Sereja and Straight Lines binary search data structures geometry sortings two pointers Statement D Codeforces Round 187 (Div. 1) {314} PROGRAMMING Codeforces Round #187 tutorial 2400
15371 Counting Kangaroos is Fun binary search greedy sortings two pointers Statement A Codeforces Round 219 (Div. 1) {372} PROGRAMMING 9944 1700
782 Volcanoes binary search implementation sortings two pointers Statement B Codeforces Round 225 (Div. 1) {383} PROGRAMMING Tutorial 2200
3799 Multitasking greedy implementation sortings two pointers Statement B Codeforces Round 225 (Div. 2) {384} PROGRAMMING Codeforces Round #225 — Editorial 1500
6818 Devu and his Brother binary search sortings ternary search two pointers Statement D Codeforces Round 251 (Div. 2) {439} PROGRAMMING Codeforces Round #251 Editorial 1900
7709 Maximum Value binary search math sortings two pointers Statement B Codeforces Round 276 (Div. 1) {484} PROGRAMMING Codeforces Round #276 — Editorial 2100
56516 BerSU Ball dfs and similar dp graph matchings greedy sortings two pointers Statement B Codeforces Round 277.5 (Div. 2) {489} PROGRAMMING Codeforces Round #277.5 (Div. 2) Editorial [A-D for now] 1300
7496 Vasya and Basketball binary search brute force data structures implementation sortings two pointers Statement C Codeforces Round 281 (Div. 2) {493} PROGRAMMING Codeforces Round #281 (Div. 2) Editorial 1700
31715 Kefa and Company binary search sortings two pointers Statement B Codeforces Round 321 (Div. 2) {580} PROGRAMMING Codeforces Round #321 Editorial 1500
38710 Queries about less or equal elements binary search data structures sortings two pointers Statement B Educational Codeforces Round 2 {600} PROGRAMMING Editorial 1300
2472 Skills binary search brute force dp greedy sortings two pointers Statement B Codeforces Round 339 (Div. 1) {613} PROGRAMMING Tutorial 2200
3749 Foe Pairs combinatorics sortings two pointers Statement C Educational Codeforces Round 10 {652} PROGRAMMING Editorial of Educational Codeforces Round 10 1800
10541 USB vs. PS/2 greedy implementation sortings two pointers Statement B Educational Codeforces Round 17 {762} PROGRAMMING Tutorial 1400
2411 Cartons of milk binary search data structures greedy sortings two pointers Statement D Codeforces Round 398 (Div. 2) {767} PROGRAMMING Codeforces Round #398 (Div. 2) Editorial 2000
1306 Bamboo Partition brute force data structures implementation math number theory sortings two pointers Statement C Codeforces Round 424 (Div. 1, rated, based on VK Cup Finals) {830} PROGRAMMING Codeforces Round #424 Editorial 2500
2001 Rooter's Song constructive algorithms data structures geometry implementation sortings two pointers Statement B Codeforces Round 431 (Div. 1) {848} PROGRAMMING Codeforces Round #431 Editorial 2100
2753 Jury Meeting greedy sortings two pointers Statement B Codeforces Round 433 (Div. 1, based on Olympiad of Metropolises) {853} PROGRAMMING Codeforces Round #433 Editorial 1900
5388 Sorting the Coins dsu implementation sortings two pointers Statement B Codeforces Round 441 (Div. 1, by Moscow Team Olympiad) {875} PROGRAMMING Codeforces Round #441. Editorial. 1500
3808 XK Segments binary search math sortings two pointers Statement B Codeforces Round 448 (Div. 2) {895} PROGRAMMING Codeforces Round #448(Div.2) Editorial 1700
9955 Swap Adjacent Elements dfs and similar greedy math sortings two pointers Statement C Educational Codeforces Round 37 (Rated for Div. 2) {920} PROGRAMMING T 1500
536 A Shade of Moonlight binary search geometry math sortings two pointers Statement D Codeforces Round 487 (Div. 2) {989} PROGRAMMING Codeforces Round #487 (Div. 2) Editorial 2500
13039 Reorder the Array combinatorics data structures math sortings two pointers Statement A Codeforces Round 497 (Div. 1) {1007} PROGRAMMING Editorial for Codeforces Round #497 by Skyglow 1300
11005 Brutality greedy sortings two pointers Statement C Educational Codeforces Round 59 (Rated for Div. 2) {1107} PROGRAMMING Educational Codeforces Round 59 Editorial 1300
27937 Balanced Team sortings two pointers Statement C Codeforces Round 544 (Div. 3) {1133} PROGRAMMING Codeforces Round #544 (Div. 3) Editorial 1300
6407 K Balanced Teams dp sortings two pointers Statement E Codeforces Round 544 (Div. 3) {1133} PROGRAMMING Codeforces Round #544 (Div. 3) Editorial 2000
1819 Earth Wind and Fire constructive algorithms greedy math sortings two pointers Statement E Codeforces Global Round 3 {1148} PROGRAMMING Codeforces Global Round 3 Editorial 2300
6654 Match Points binary search greedy sortings ternary search two pointers Statement C Educational Codeforces Round 64 (Rated for Div. 2) {1156} PROGRAMMING 66827 2000
8308 The Party and Sweets binary search constructive algorithms greedy implementation math sortings two pointers Statement A Codeforces Round 559 (Div. 1) {1158} PROGRAMMING 66993 1500
11013 A Tale of Two Lands binary search sortings two pointers Statement C Codeforces Round 561 (Div. 2) {1166} PROGRAMMING Codeforces Round #561 (Div. 2) Editorial 1600
2791 Irrigation binary search data structures implementation sortings trees two pointers Statement D Codeforces Round 567 (Div. 2) {1181} PROGRAMMING Editorial of Codeforces Round #567 (based on All-Russian olympiad in the name of Keldysh) 2100
2683 Tokitsukaze and Strange Rectangle data structures divide and conquer sortings two pointers Statement D Codeforces Round 573 (Div. 1) {1190} PROGRAMMING E 2200
10121 MP3 sortings two pointers Statement A Codeforces Round 576 (Div. 1) {1198} PROGRAMMING E 1700
22610 Balanced Tunnel data structures sortings two pointers Statement B Codeforces Global Round 5 {1237} PROGRAMMING T 1300
6385 Minimizing Difference binary search constructive algorithms greedy sortings ternary search two pointers Statement E Codeforces Round 592 (Div. 2) {1244} PROGRAMMING Codeforces Round #592 (Div. 2) Tutorial 2000
17123 Dominated Subarray greedy implementation sortings strings two pointers Statement C Educational Codeforces Round 76 (Rated for Div. 2) {1257} PROGRAMMING Educational Codeforces Round 76 Editorial 1200
8144 Yet Another Monster Killing Problem binary search data structures dp greedy sortings two pointers Statement D Educational Codeforces Round 76 (Rated for Div. 2) {1257} PROGRAMMING Educational Codeforces Round 76 Editorial 1700
4578 Petya and Exam greedy sortings two pointers Statement C Codeforces Round 610 (Div. 2) {1282} PROGRAMMING 72461 1800
2000 Delete a Segment brute force constructive algorithms data structures dp graphs sortings trees two pointers Statement E Codeforces Round 613 (Div. 2) {1285} PROGRAMMING Codeforces Round #613 (Div. 2) Editorial 2300
17719 Air Conditioner dp greedy implementation sortings two pointers Statement C Codeforces Round 620 (Div. 2) {1304} PROGRAMMING 1500.0 Codeforces Round #620 (Div. 2) Editorial 1500
33919 Pair of Topics binary search data structures sortings two pointers Statement D Codeforces Round 627 (Div. 3) {1324} PROGRAMMING Codeforces Round #627 (Div. 3) Editorial
4566 Kate and imperfection greedy implementation math number theory sortings two pointers Statement F Codeforces Round 632 (Div. 2) {1333} PROGRAMMING 2500.0 Codeforces Round #632 (Div. 2) editorial
12116 Xenia and Colorful Gems binary search greedy math sortings two pointers Statement B Codeforces Round 635 (Div. 1) {1336} PROGRAMMING 750.0 Codeforces Round #635 Editorial 1800
6362 Multiple Testcases binary search constructive algorithms data structures greedy sortings two pointers Statement D Educational Codeforces Round 86 (Rated for Div. 2) {1342} PROGRAMMING 76633 1900
1063 Reading Books (hard version) binary search data structures greedy sortings ternary search two pointers Statement E2 Codeforces Round 653 (Div. 3) {1374} PROGRAMMING 79517
30895 Zero Remainder Array math sortings two pointers Statement D Codeforces Round 653 (Div. 3) {1374} PROGRAMMING 79517
6072 Choosing flowers binary search data structures greedy math sortings two pointers Statement C Codeforces Round 657 (Div. 2) {1379} PROGRAMMING 1250.0 Codeforces Round #657 Editorial 2000
1149 New Passenger Trams brute force data structures sortings two pointers Statement D Codeforces Round 657 (Div. 2) {1379} PROGRAMMING 1500.0 Codeforces Round #657 Editorial 2400
7111 Boboniu Chats with Du brute force dp greedy sortings two pointers Statement A Codeforces Round 664 (Div. 1) {1394} PROGRAMMING 500.0 Codeforces Round #664 Editorial 1800
312 The Potion of Great Power *special binary search data structures graphs interactive sortings two pointers Statement A Central-European Olympiad in Informatics, CEOI 2020, Day 2 (IOI, Unofficial Mirror Contest, Unrated) {1403} PROGRAMMING CEOI 2020 Online Mirror — Day 2 Tutorial
8444 Two Platforms binary search dp sortings two pointers Statement E Codeforces Round 667 (Div. 3) {1409} PROGRAMMING Codeforces Round #667 (Div. 3) Editorial
6213 Perform Easily data structures dp implementation sortings two pointers Statement C Technocup 2021 - Elimination Round 1 {1413} PROGRAMMING 1500.0 Codeforces Round 679 (Div. 1, Div. 2) and Technocup Round 1 editorial
17367 Sage's Birthday (hard version) binary search constructive algorithms greedy implementation sortings two pointers Statement D2 Codeforces Round 671 (Div. 2) {1419} PROGRAMMING 1000.0 Codeforces Round #671 Editorial
2646 Complicated Computations binary search data structures sortings two pointers Statement E Codeforces Round 678 (Div. 2) {1436} PROGRAMMING 2500.0 Codeforces Round #678 (Div. 2). Editorial
11337 Close Tuples (hard version) binary search combinatorics implementation math sortings two pointers Statement E2 Codeforces Round 690 (Div. 3) {1462} PROGRAMMING Codeforces Round #690 (Div. 3) Editorial
15198 Close Tuples (easy version) binary search combinatorics math sortings two pointers Statement E1 Codeforces Round 690 (Div. 3) {1462} PROGRAMMING Codeforces Round #690 (Div. 3) Editorial
29220 Strange Birthday Party dp greedy sortings two pointers Statement A Codeforces Round 694 (Div. 1) {1470} PROGRAMMING 500.0 86464
8836 Correct Placement binary search data structures sortings two pointers Statement E Codeforces Round 693 (Div. 3) {1472} PROGRAMMING Codeforces Round #693 (Div. 3) Editorial
11170 Cleaning the Phone binary search dp greedy sortings two pointers Statement D Codeforces Round 697 (Div. 3) {1475} PROGRAMMING Codeforces Round #697 (Div. 3) Editorial
5113 Cheap Dinner data structures dp implementation sortings two pointers Statement E Educational Codeforces Round 104 (Rated for Div. 2) {1487} PROGRAMMING 87873
5726 GCD of an Array data structures math number theory sortings two pointers Statement D Codeforces Round 705 (Div. 2) {1493} PROGRAMMING 2250.0 Codeforces Round #705 (Div.2) Editorial
12797 Phoenix and Socks greedy sortings two pointers Statement D Codeforces Global Round 14 {1515} PROGRAMMING 2000.0 Editorial
22285 Berland Regional brute force greedy sortings two pointers Statement C Educational Codeforces Round 108 (Rated for Div. 2) {1519} PROGRAMMING Educational Codeforces Round 108 Editorial
12703 PriceFixed binary search data structures greedy sortings two pointers Statement D Codeforces Round 727 (Div. 2) {1539} PROGRAMMING 1500.0 tutorial 1600
16335 Air Conditioners dfs and similar dp implementation shortest paths sortings two pointers Statement E Codeforces Round 731 (Div. 3) {1547} PROGRAMMING Codeforces Round #731 (Div. 3) Editorial
4515 Boring Segments binary search data structures sortings two pointers Statement E Educational Codeforces Round 112 (Rated for Div. 2) {1555} PROGRAMMING 93389 2100
8327 Seating Arrangements (hard version) data structures greedy implementation sortings two pointers Statement D2 Codeforces Global Round 16 {1566} PROGRAMMING 1000.0 Codeforces Global Round 16 Editorial
4598 Inconvenient Pairs data structures implementation sortings two pointers Statement D Educational Codeforces Round 113 (Rated for Div. 2) {1569} PROGRAMMING 94721
1574 Red-Blue Matrix constructive algorithms data structures hashing implementation sortings two pointers Statement D Educational Codeforces Round 116 (Rated for Div. 2) {1606} PROGRAMMING 96454
2775 Not Escaping data structures dp implementation shortest paths sortings two pointers Statement E Codeforces Round 766 (Div. 2) {1627} PROGRAMMING 2000.0 Codeforces Round #766 (Div. 2) Editorial
22654 Quality vs Quantity brute force constructive algorithms greedy sortings two pointers Statement B Codeforces Round 774 (Div. 2) {1646} PROGRAMMING 1000.0 Codeforces Round #774 (Div. 2) Editorial 800
5282 For Gamers. By Gamers. binary search dp math sortings two pointers Statement D Educational Codeforces Round 125 (Rated for Div. 2) {1657} PROGRAMMING 101161
19985 Longest Strike data structures greedy implementation sortings two pointers Statement F Codeforces Round 790 (Div. 4) {1676} PROGRAMMING Codeforces Round #790 (Div. 4) Editorial
392 MCMF? data structures flows graphs greedy sortings two pointers Statement F Codeforces Round 793 (Div. 2) {1682} PROGRAMMING 2750.0 Codeforces Round #793 (Div. 2) Editorial
17718 Lex String brute force greedy implementation sortings two pointers Statement A Codeforces Round 798 (Div. 2) {1689} PROGRAMMING 500.0 Editorial for Codeforces Round #798 (Div. 2)
7447 Max GEQ Sum binary search constructive algorithms data structures divide and conquer implementation sortings two pointers Statement D CodeCraft-22 and Codeforces Round 795 (Div. 2) {1691} PROGRAMMING 1750.0 Editorial for CodeCraft-22 and Codeforces Round #795 (Div. 2)
26244 2^Sort data structures dp sortings two pointers Statement G Codeforces Round 799 (Div. 4) {1692} PROGRAMMING Codeforces Round #799 (Div. 4) Editorial
21245 Sort Zero greedy sortings two pointers Statement C Codeforces Round 813 (Div. 2) {1712} PROGRAMMING 1500.0 Codeforces Round #813 (Div. 2) Editorial
12221 Quiz Master math sortings two pointers Statement C Codeforces Round 845 (Div. 2) and ByteRace 2023 {1777} PROGRAMMING 1500.0 Codeforces Round #845 (Div. 2) and ByteRace 2023 Editorial
14732 Going to the Cinema binary search math sortings two pointers Statement B VK Cup 2022 - Отборочный раунд (Engine) {1781} PROGRAMMING 1000.0 Tutorial
509 Survival of the Weakest (hard version) greedy sortings two pointers Statement F2 Codeforces Round 862 (Div. 2) {1805} PROGRAMMING 1750.0 Editorial of Codeforces Round #862 (Div. 2)
4193 The Butcher greedy implementation sortings two pointers Statement B Codeforces Round 866 (Div. 1) {1819} PROGRAMMING 1250.0 Codeforces Round #866 (Div.1, Div.2, based on Lipetsk Team Olympiad) Editorial
28616 Counting Orders combinatorics math sortings two pointers Statement A Codeforces Round 873 (Div. 1) {1827} PROGRAMMING 500.0 Codeforces Round #873 (Div. 1 & 2) Editorial 1100
2168 Hyperregular Bracket Strings combinatorics hashing number theory sortings two pointers Statement C Codeforces Round 875 (Div. 1) {1830} PROGRAMMING 1750.0 Codeforces Round #875 (Div.1 + Div. 2) Editorial
35201 Maximum Sum brute force sortings two pointers Statement B Educational Codeforces Round 148 (Rated for Div. 2) {1832} PROGRAMMING 116454 1100
1071 Lottery binary search brute force greedy math sortings two pointers Statement B Codeforces Round 880 (Div. 1) {1835} PROGRAMMING 1250.0 Codeforces Round 880 Editorial
16530 Lamps data structures greedy sortings two pointers Statement B Codeforces Round 876 (Div. 2) {1839} PROGRAMMING 1000.0 Codeforces Round #876 (Div. 2) Editorial
4018 Vlad and the Mountains data structures dsu graphs implementation sortings trees two pointers Statement G Codeforces Round 888 (Div. 3) {1851} PROGRAMMING 118667
32417 Parity Sort sortings two pointers Statement B Codeforces Round 888 (Div. 3) {1851} PROGRAMMING 118667
5445 Imbalanced Arrays constructive algorithms greedy sortings two pointers Statement B Codeforces Round 887 (Div. 1) {1852} PROGRAMMING 750.0 Codeforces Round 887 (Div 1, Div 2) Tutorial
7977 Andrey and Escape from Capygrad binary search data structures dp dsu greedy sortings two pointers Statement D Codeforces Round 892 (Div. 2) {1859} PROGRAMMING 1750.0 Video solutions from Geothermal.
13084 Colorful Table binary search data structures dp implementation math sortings two pointers Statement C CodeTON Round 6 (Div. 1 + Div. 2, Rated, Prizes!) {1870} PROGRAMMING 1500.0 CodeTON Round 6 (Div. 1 + Div. 2, Rated, Prizes!) Editorial
20201 Smilo and Monsters constructive algorithms greedy sortings two pointers Statement C Codeforces Round 907 (Div. 2) {1891} PROGRAMMING 1000.0
11409 Neutral Tonality constructive algorithms greedy sortings two pointers Statement B Codeforces Round 908 (Div. 1) {1893} PROGRAMMING 1000.0 Codeforces Round 908 (Div. 1, Div, 2) Editorial
5666 Set To Max (Hard Version) binary search constructive algorithms data structures dsu greedy implementation sortings two pointers Statement D2 Codeforces Round 914 (Div. 2) {1904} PROGRAMMING 750.0 Codeforces Round 914 (Div. 2) Editorial
24178 Very Different Array greedy sortings two pointers Statement D Codeforces Round 920 (Div. 3) {1921} PROGRAMMING Editorial for Codeforces Round 920 (Div. 3)
20703 Equalize binary search greedy sortings two pointers Statement B Codeforces Round 924 (Div. 2) {1928} PROGRAMMING 1000.0 Codeforces Round 924 Editorial
47595 Rudolf and the Ticket brute force math sortings two pointers Statement A Codeforces Round 933 (Div. 3) {1941} PROGRAMMING 127018
4388 Cutting Game binary search brute force data structures implementation sortings two pointers Statement F Codeforces Round 946 (Div. 3) {1974} PROGRAMMING Codeforces Round #946 (Div. 3) Editorial 1900
7082 Smithing Skill brute force dp greedy math sortings two pointers Statement D Educational Codeforces Round 167 (Rated for Div. 2) {1989} PROGRAMMING Educational Codeforces Round 167 Editorial
20914 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
10131 Bouquet (Hard Version) binary search data structures greedy math sortings two pointers Statement B2 Codeforces Round 961 (Div. 2) {1995} PROGRAMMING 500.0 Video Tutorial
16097 Trinity binary search math sortings two pointers Statement C Codeforces Round 983 (Div. 2) {2032} PROGRAMMING 1250.0 Codeforces Round 983 (Div. 2) Editorial
2960 Ardent Flames binary search data structures sortings two pointers Statement F Codeforces Round 988 (Div. 3) {2037} PROGRAMMING Video Tutorial
8265 Kevin and Competition Memories binary search data structures greedy sortings two pointers Statement D Codeforces Global Round 28 {2048} PROGRAMMING 1250.0 Tutorial
23807 Counting Pairs binary search sortings two pointers Statement D Codeforces Round 995 (Div. 3) {2051} PROGRAMMING 137623
31980 Game of Mathletes games greedy sortings two pointers Statement C Codeforces Round 998 (Div. 3) {2060} PROGRAMMING Codeforces Round 998 (Div. 3) Editorial
14806 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
21312 Deque Process constructive algorithms greedy sortings two pointers Statement B Codeforces Round 1039 (Div. 2) {2128} PROGRAMMING 1000.0 Codeforces Round #1039 — Editorial
20730 Discounts greedy sortings two pointers Statement B Codeforces Round 1051 (Div. 2) {2143} PROGRAMMING 1000.0 Codeforces Round 1051 (Div. 2) Editorial
1195 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
5935 Billion Players Game greedy math sortings ternary search two pointers Statement D Codeforces Round 1066 (Div. 1 + Div. 2) {2157} PROGRAMMING 1500.0 Codeforces Round 1066 (Div. 1 + Div. 2) Editorial
12409 Loyalty constructive algorithms greedy sortings two pointers Statement C Pinely Round 5 (Div. 1 + Div. 2) {2161} PROGRAMMING 1750.0
5504 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
1280 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
21313 Monster Game binary search sortings two pointers Statement D Codeforces Round 1076 (Div. 3) {2193} PROGRAMMING Разбор Codeforces Round 1076 (Div. 3)
15685 Array and Permutation implementation sortings two pointers Statement B Codeforces Round 1079 (Div. 2) {2197} PROGRAMMING 1000.0