A structured repository containing solutions to various competitive programming problems from platforms like Codeforces, CSES, and AtCoder.
- Codeforces: Round solutions and gym problems.
- CSES: Problems from the CSES Problem Set.
- AtCoder: Beginner and Regular contest solutions.
/problems/: Categorized solutions by platform and topic/contest./templates/: Reusable C++ templates for common algorithms (DSU, Segment Tree, etc.)./notes/: Technical notes on key algorithmic patterns.
- Standardized headers with problem metadata.
- Automated problem indexing.
- Clean and readable C++ implementations.
| Platform | Problems Solved |
|---|---|
| Codeforces | 198 |
| CSES | 15 |
| AtCoder | 2 |
| Total | 215 |
- Greedy Algorithms
- Dynamic Programming
- Graph Theory
- Tree Algorithms
- Math & Bitmasking
- Implementation
This is a personal repository for tracking progress. Feel free to explore the solutions and notes.
| # | Title | Rating | Tags | Submission |
|---|---|---|---|---|
| 1995A | Diagonals | 800 | brute force, greedy, implementation, math | Apr/25/2026 09:37 PM |
| 1991A | Maximize the Last Element | 800 | greedy, implementation | Mar/03/2026 07:19 AM |
| 1996B | Scale | 800 | greedy, implementation | Mar/02/2026 07:30 AM |
| 2195A | Sieve of Erato67henes | 800 | math, number theory | Feb/15/2026 10:38 PM |
| 2180A | Carnival Wheel | 800 | brute force, number theory | Dec/20/2025 09:48 PM |
| 2146A | Equal Occurrences | 800 | brute force, greedy, implementation | Nov/25/2025 01:21 PM |
| 2154A | Notelock | 800 | greedy, two pointers | Nov/24/2025 08:25 PM |
| 2167A | Square? | 800 | math, sortings | Nov/03/2025 08:36 AM |
| 1927A | Make it White | 800 | greedy, strings | Oct/17/2025 10:55 AM |
| 41A | Translation | 800 | implementation, strings | Jul/30/2025 08:09 PM |
| 34A | Reconnaissance 2 | 800 | implementation | Jul/25/2025 07:56 PM |
| 151A | Soft Drinking | 800 | implementation, math | Jul/25/2025 07:42 PM |
| 2126A | Only One Digit | 800 | brute force, implementation, math | Jul/18/2025 09:50 AM |
| 104A | Blackjack | 800 | implementation | Jun/12/2025 02:51 PM |
| 116A | Tram | 800 | implementation | Jun/12/2025 02:39 PM |
| 155A | I_love_%username% | 800 | brute force | Jun/12/2025 02:27 PM |
| 248A | Cupboards | 800 | implementation | Jun/12/2025 02:19 PM |
| 148A | Insomnia cure | 800 | constructive algorithms, implementation, math | Jun/12/2025 01:51 PM |
| 144A | Arrival of the General | 800 | implementation | May/14/2025 08:17 AM |
| 233A | Perfect Permutation | 800 | implementation, math | May/14/2025 07:58 AM |
| 61A | Ultra-Fast Mathematician | 800 | implementation | May/14/2025 04:32 AM |
| 80A | Panoramix's Prediction | 800 | brute force | May/14/2025 04:26 AM |
| 266A | Stones on the Table | 800 | implementation | May/14/2025 03:56 AM |
| 4A | Watermelon | 800 | brute force, math | Apr/30/2025 08:43 PM |
| 1482A | Prison Break | 800 | math | Apr/21/2025 09:00 PM |
| 1389A | LCM Problem | 800 | constructive algorithms, greedy, math, number theory | Apr/21/2025 08:50 PM |
| 2062A | String | 800 | constructive algorithms, greedy, math, strings | Jan/30/2025 11:32 AM |
| 344A | Magnets | 800 | implementation | Jan/20/2025 12:52 PM |
| 136A | Presents | 800 | implementation | Jan/20/2025 10:27 AM |
| 200B | Drinks | 800 | implementation, math | Jan/20/2025 09:09 AM |
| 141A | Amusing Joke | 800 | implementation, sortings, strings | Jan/20/2025 08:53 AM |
| 110A | Nearly Lucky Number | 800 | implementation | Jan/20/2025 08:03 AM |
| 432A | Choosing Teams | 800 | greedy, implementation, sortings | Jan/20/2025 07:52 AM |
| 228A | Is your horseshoe on the other hoof? | 800 | implementation | Dec/30/2024 11:35 PM |
| 2043A | Coin Transformation | 800 | brute force, math | Dec/28/2024 09:09 PM |
| 1923A | Moving Chips | 800 | greedy, implementation | Dec/08/2024 01:57 PM |
| 236A | Boy or Girl | 800 | brute force, implementation, strings | Nov/28/2024 05:45 PM |
| 1932A | Thorns and Coins | 800 | dp, greedy, implementation | Nov/23/2024 08:50 PM |
| 2037B | Intercepted Inputs | 800 | brute force, implementation | Nov/17/2024 10:12 PM |
| 2037A | Twice | 800 | implementation | Nov/17/2024 09:59 PM |
| 2029A | Set | 800 | greedy, math | Nov/16/2024 08:18 PM |
| 361A | Levko and Table | 800 | constructive algorithms, implementation | Oct/24/2024 11:07 AM |
| 1814A | Coins | 800 | implementation, math | Oct/18/2024 08:49 AM |
| 1150A | Stock Arbitraging | 800 | greedy, implementation | Oct/17/2024 09:15 AM |
| 2025A | Two Screens | 800 | binary search, greedy, strings, two pointers | Oct/14/2024 10:29 PM |
| 59A | Word | 800 | implementation, strings | Oct/14/2024 09:03 PM |
| 271A | Beautiful Year | 800 | brute force | Oct/08/2024 09:23 PM |
| 32B | Borze | 800 | expression parsing, implementation | Oct/08/2024 09:10 PM |
| 266B | Queue at the School | 800 | constructive algorithms, graph matchings, implementation, shortest paths | Oct/08/2024 09:03 PM |
| 1926B | Vlad and Shapes | 800 | geometry, implementation | Oct/04/2024 03:47 AM |
| 791A | Bear and Big Brother | 800 | implementation | Sep/24/2024 12:58 PM |
| 1629B | GCD Arrays | 800 | greedy, math, number theory | Sep/22/2024 01:27 PM |
| 1311A | Add Odd or Subtract Even | 800 | greedy, implementation, math | Sep/22/2024 01:17 PM |
| 9A | Die Roll | 800 | math, probabilities | Sep/20/2024 10:34 AM |
| 1712A | Wonderful Permutation | 800 | greedy, implementation | Sep/19/2024 01:28 PM |
| 1743A | Password | 800 | brute force, combinatorics, implementation, math | Sep/19/2024 09:14 AM |
| 281A | Word Capitalization | 800 | implementation, strings | Sep/17/2024 09:02 PM |
| 339A | Helpful Maths | 800 | greedy, implementation, sortings, strings | Sep/17/2024 08:58 PM |
| 112A | Petya and Strings | 800 | implementation, strings | Sep/17/2024 08:54 PM |
| 263A | Beautiful Matrix | 800 | implementation | Sep/17/2024 08:32 PM |
| 50A | Domino piling | 800 | greedy, math | Sep/17/2024 08:26 PM |
| 158A | Next Round | 800 | *special, implementation | Sep/17/2024 08:22 PM |
| 282A | Bit++ | 800 | implementation | Sep/17/2024 08:09 PM |
| 231A | Team | 800 | brute force, greedy | Sep/17/2024 02:59 PM |
| 71A | Way Too Long Words | 800 | strings | Sep/17/2024 02:50 PM |
| 1985B | Maximum Multiple Sum | 800 | brute force, math, number theory | Sep/04/2024 11:30 AM |
| 2010A | Alternating Sum of Numbers | 800 | brute force, implementation, math | Sep/03/2024 10:14 AM |
| 2010B | Three Brothers | 800 | brute force, implementation, math | Sep/03/2024 09:29 AM |
| 1686B | Odd Subarrays | 800 | dp, greedy | Sep/02/2024 09:11 AM |
| 2000B | Seating in a Bus | 800 | two pointers | Aug/21/2024 02:07 PM |
| 2000A | Primary Task | 800 | implementation, math, strings | Aug/21/2024 01:03 PM |
| 415A | Mashmokh and Lights | 900 | implementation | Mar/06/2026 09:12 PM |
| 1990A | Submission Bait | 900 | brute force, games, greedy, sortings | Mar/03/2026 07:46 AM |
| 2195B | Heapify 1 | 900 | implementation, sortings | Feb/15/2026 10:23 PM |
| 318A | Even Odds | 900 | math | Jan/11/2026 09:07 PM |
| 1927B | Following the String | 900 | constructive algorithms, greedy, strings | Oct/17/2025 11:07 AM |
| 320A | Magic Numbers | 900 | brute force, greedy | Jul/30/2025 08:03 PM |
| 199A | Hexadecimal's theorem | 900 | brute force, constructive algorithms, implementation, number theory | Jul/25/2025 08:58 PM |
| 205A | Little Elephant and Rozdil | 900 | brute force, implementation | Jul/25/2025 08:51 PM |
| 133A | HQ9+ | 900 | implementation | Jun/12/2025 06:08 PM |
| 1291A | Even But Not Even | 900 | greedy, math, strings | Apr/22/2025 08:17 PM |
| 2062B | Clockwork | 900 | greedy, math | Jan/30/2025 11:59 AM |
| 580A | Kefa and First Steps | 900 | brute force, dp, implementation | Nov/23/2024 09:33 PM |
| 1057A | Bmail Computer Network | 900 | *special, dfs and similar, trees | Nov/23/2024 06:33 PM |
| 115A | Party | 900 | dfs and similar, graphs, trees | Nov/23/2024 04:51 PM |
| 275A | Lights Out | 900 | implementation | Oct/14/2024 08:49 PM |
| 1606A | AB Balance | 900 | strings | Sep/22/2024 02:23 PM |
| 96A | Football | 900 | implementation, strings | Sep/17/2024 09:28 PM |
| 1896B | AB Flipping | 900 | greedy, strings, two pointers | Sep/13/2024 09:56 AM |
| 1833B | Restore the Weather | 900 | greedy, sortings | Aug/29/2024 02:02 PM |
| 2154B | Make it Zigzag | 1000 | constructive algorithms, greedy | Nov/25/2025 11:09 AM |
| 1927C | Choose the Different Ones! | 1000 | brute force, greedy, math | Oct/18/2025 08:35 PM |
| 43A | Football | 1000 | strings | Jul/30/2025 08:26 PM |
| 1931C | Make Equal Again | 1000 | brute force, greedy, math | May/22/2025 07:50 PM |
| 139A | Petr and Book | 1000 | implementation | May/21/2025 09:24 AM |
| 165A | Supercentral Point | 1000 | implementation | May/21/2025 09:13 AM |
| 450A | Jzzhu and Children | 1000 | implementation | May/18/2025 08:30 PM |
| 272A | Dima and Friends | 1000 | implementation, math | May/14/2025 08:48 PM |
| 1051B | Relatively Prime Pairs | 1000 | greedy, math, number theory | Apr/22/2025 08:32 PM |
| 1033A | King Escape | 1000 | dfs and similar, graphs, implementation | Apr/21/2025 09:16 PM |
| 1634C | OKEA | 1000 | constructive algorithms | Apr/21/2025 08:42 PM |
| 1182A | Filling Shapes | 1000 | dp, math | Apr/20/2025 02:15 PM |
| 1020B | Badge | 1000 | brute force, dfs and similar, graphs | Apr/17/2025 09:09 AM |
| 2037C | Superultra's Favorite Permutation | 1000 | constructive algorithms, greedy, math, number theory | Nov/17/2024 11:09 PM |
| 1A | Theatre Square | 1000 | math | Oct/18/2024 08:23 AM |
| 69A | Young Physicist | 1000 | implementation, math | Oct/08/2024 08:37 PM |
| 1968C | Assembly via Remainders | 1000 | constructive algorithms, number theory | Oct/04/2024 01:10 PM |
| 1883C | Raspberries | 1000 | dp, math | Sep/26/2024 09:01 PM |
| 939B | Hamster Farm | 1000 | implementation | Sep/22/2024 03:59 PM |
| 2002B | Removals Game | 1000 | constructive algorithms, games | Sep/22/2024 02:42 PM |
| 352A | Jeff and Digits | 1000 | brute force, implementation, math | Sep/22/2024 01:49 PM |
| 1849B | Monsters | 1000 | greedy, math, sortings | Aug/29/2024 01:39 PM |
| 1991B | AND Reconstruction | 1100 | bitmasks, constructive algorithms, greedy | Mar/04/2026 07:10 AM |
| 224A | Parallelepiped | 1100 | brute force, geometry, math | May/23/2025 07:49 AM |
| 227B | Effective Approach | 1100 | implementation | May/14/2025 11:50 AM |
| 313B | Ilya and Queries | 1100 | dp, implementation | Apr/20/2025 01:47 PM |
| 287A | IQ Test | 1100 | brute force, implementation | Apr/17/2025 09:37 AM |
| 2043B | Digits | 1100 | math, number theory | Jan/03/2025 09:02 PM |
| 331C1 | The Great Julya Calendar | 1100 | dp | Nov/26/2024 06:48 PM |
| 2014C | Robin Hood in Town | 1100 | binary search, greedy, math | Oct/19/2024 02:08 PM |
| 2025B | Binomial Coefficients, Kind Of | 1100 | combinatorics, dp, math | Oct/14/2024 10:53 PM |
| 1873E | Building an Aquarium | 1100 | binary search, sortings | Sep/21/2024 03:46 PM |
| 706B | Interesting drink | 1100 | binary search, dp, implementation | Sep/21/2024 03:43 PM |
| 1996C | Sort | 1200 | dp, greedy, sortings, strings | Mar/04/2026 08:01 AM |
| 902B | Coloring a Tree | 1200 | dfs and similar, dsu, greedy | May/30/2025 08:39 PM |
| 474B | Worms | 1200 | binary search, implementation | May/27/2025 08:05 PM |
| 1613C | Poisoned Dagger | 1200 | binary search | May/06/2025 07:56 PM |
| 1433D | Districts Connection | 1200 | constructive algorithms, dfs and similar | Apr/23/2025 08:07 PM |
| 1514B | AND 0, Sum Big | 1200 | bitmasks, combinatorics, math | Dec/29/2024 08:10 PM |
| 1327B | Princesses and Princes | 1200 | brute force, graphs, greedy | Dec/29/2024 08:04 PM |
| 776B | Sherlock and his girlfriend | 1200 | constructive algorithms, number theory | Nov/17/2024 02:40 PM |
| 1843D | Apple Tree | 1200 | combinatorics, dfs and similar, dp, math, trees | Oct/23/2024 09:09 AM |
| 2020B | Brightness Begins | 1200 | binary search, math | Oct/08/2024 03:59 AM |
| 433B | Kuriyama Mirai's Stones | 1200 | dp, implementation, sortings | Oct/07/2024 09:01 AM |
| 1713C | Build Permutation | 1200 | constructive algorithms, dp, math | Sep/27/2024 03:34 AM |
| 1294B | Collecting Packages | 1200 | implementation, sortings | Sep/21/2024 03:55 PM |
| 1454C | Sequence Transformation | 1200 | greedy, implementation | Sep/21/2024 03:54 PM |
| 1619C | Wrong Addition | 1200 | implementation | Sep/21/2024 03:53 PM |
| 1334A | Level Statistics | 1200 | implementation, math | Sep/19/2024 01:51 PM |
| 1352C | K-th Not Divisible by n | 1200 | binary search, math | Sep/18/2024 09:46 PM |
| 466A | Cheap Travel | 1200 | implementation | Sep/18/2024 09:25 PM |
| 492B | Vanya and Lanterns | 1200 | binary search, implementation, math, sortings | Sep/18/2024 09:16 PM |
| 459A | Pashmak and Garden | 1200 | implementation | Sep/18/2024 10:09 AM |
| 1006C | Three Parts of the Array | 1200 | binary search, data structures, two pointers | Aug/29/2024 04:25 PM |
| 1927D | Find the Different Ones! | 1300 | binary search, brute force, data structures, dp, dsu, greedy, two pointers | Oct/19/2025 10:54 AM |
| 893C | Rumor | 1300 | dfs and similar, graphs, greedy | May/30/2025 08:27 PM |
| 862B | Mahmoud and Ehab and the bipartiteness | 1300 | dfs and similar, graphs, trees | May/30/2025 08:11 PM |
| 2025C | New Game | 1300 | binary search, brute force, greedy, implementation, sortings, two pointers | May/26/2025 11:50 AM |
| 1669H | Maximal AND | 1300 | bitmasks, greedy, math | May/06/2025 08:18 PM |
| 1294C | Product of Three Numbers | 1300 | greedy, math, number theory | Apr/06/2025 02:47 PM |
| 222B | Cosmic Tables | 1300 | data structures, implementation | Jan/10/2025 09:16 AM |
| 1879C | Make it Alternating | 1300 | combinatorics, dp, greedy | Oct/09/2024 09:36 PM |
| 1945D | Seraphim the Owl | 1300 | dp, greedy | Sep/27/2024 09:22 PM |
| 1352D | Alice, Bob and Candies | 1300 | implementation | Sep/21/2024 04:03 PM |
| 1955C | Inhabitant of the Deep Sea | 1300 | greedy, implementation, math | Sep/21/2024 05:46 AM |
| 451B | Sort the Array | 1300 | implementation, sortings | Sep/18/2024 10:41 AM |
| 25A | IQ test | 1300 | brute force | Sep/17/2024 10:02 PM |
| 1927E | Klever Permutation | 1400 | constructive algorithms, math, two pointers | Oct/19/2025 11:19 AM |
| 277A | Learning Languages | 1400 | dfs and similar, dsu | Jun/01/2025 09:47 AM |
| 1893A | Anonymous Informant | 1400 | brute force, dfs and similar, graphs, implementation | May/23/2025 10:20 AM |
| 1634B | Fortune Telling | 1400 | bitmasks, math | May/07/2025 08:53 PM |
| 1670C | Where is the Pizza? | 1400 | data structures, dfs and similar, dsu, graphs, implementation, math | May/04/2025 09:00 PM |
| 180C | Letter | 1400 | dp | Apr/20/2025 03:04 PM |
| 1609C | Complex Market Analysis | 1400 | binary search, dp, implementation, number theory, schedules, two pointers | Oct/15/2024 09:21 PM |
| 2008F | Sakurako's Box | 1400 | combinatorics, math, number theory | Oct/13/2024 10:01 AM |
| 505B | Mr. Kitayuta's Colorful Graph | 1400 | dfs and similar, dp, dsu, graphs | Oct/12/2024 12:39 PM |
| 1918C | XOR-distance | 1400 | bitmasks, greedy, implementation, math | Oct/04/2024 07:33 AM |
| 1526B | I Hate 1111 | 1400 | dp, math, number theory | Sep/27/2024 06:39 PM |
| 1426D | Non-zero Segments | 1500 | constructive algorithms, data structures, greedy, sortings | May/20/2025 08:13 PM |
| 329B | Biridian Forest | 1500 | dfs and similar, shortest paths | Apr/19/2025 02:10 PM |
| 1391C | Cyclic Permutations | 1500 | combinatorics, dp, graphs, math | Apr/10/2025 09:15 PM |
| 1325C | Ehab and Path-etic MEXs | 1500 | constructive algorithms, dfs and similar, greedy, trees | Nov/21/2024 08:42 PM |
| 1999F | Expected Median | 1500 | combinatorics, math | Oct/13/2024 11:16 AM |
| 1876B | Effects of Anti Pimples | 1500 | combinatorics, number theory, sortings | Oct/13/2024 10:44 AM |
| 771A | Bear and Friendship Condition | 1500 | dfs and similar, dsu, graphs | Oct/12/2024 01:11 PM |
| 977E | Cyclic Components | 1500 | dfs and similar, dsu, graphs | Oct/12/2024 10:42 AM |
| 670D2 | Magic Powder - 2 | 1500 | binary search, implementation | Oct/09/2024 10:22 AM |
| 760B | Frodo and pillows | 1500 | binary search, greedy | Oct/08/2024 02:08 PM |
| 165B | Burning Midnight Oil | 1500 | binary search, implementation | Oct/08/2024 01:14 PM |
| 1881E | Block Sequence | 1500 | dp | Oct/01/2024 04:21 PM |
| 659D | Bicycle Race | 1500 | geometry, implementation, math | Sep/01/2024 01:23 PM |
| 780C | Andryusha and Colored Balloons | 1600 | dfs and similar, graphs, greedy, trees | May/30/2025 09:07 PM |
| 1056D | Decorate Apple Tree | 1600 | constructive algorithms, dfs and similar, dp, graphs, greedy, sortings, trees | Apr/19/2025 02:35 PM |
| 1526C2 | Potions (Hard Version) | 1600 | data structures, greedy | Nov/09/2024 07:45 PM |
| 1957C | How Does the Rook Move? | 1600 | combinatorics, dp, math | Oct/11/2024 03:05 PM |
| 371C | Hamburgers | 1600 | binary search, brute force | Oct/09/2024 10:41 AM |
| 785C | Anton and Fairy Tale | 1600 | binary search, math | Oct/08/2024 11:11 AM |
| 1826D | Running Miles | 1700 | brute force, dp, greedy | May/20/2025 09:04 PM |
| 1611E1 | Escape The Maze (easy version) | 1700 | dfs and similar, greedy, shortest paths, trees, two pointers | May/03/2025 02:11 PM |
| 2029C | New Rating | 1700 | binary search, data structures, dp, greedy | Nov/16/2024 08:47 PM |
| 1081D | Maximum Distance | 1800 | dsu, graphs, shortest paths, sortings | Oct/12/2024 11:51 AM |
| 1912K | Kim's Quest | 1800 | bitmasks, combinatorics, dp | Oct/11/2024 08:39 PM |
| 961E | Tufurama | 1900 | data structures | May/15/2025 12:01 PM |
| 61E | Enemy is weak | 1900 | data structures, trees | May/14/2025 10:53 AM |
| 1012B | Chemical table | 1900 | constructive algorithms, dfs and similar, dsu, graphs, matrices | Oct/12/2024 01:30 PM |
| 2114F | Small Operations | 2000 | binary search, brute force, dfs and similar, dp, math, number theory, sortings | Jun/29/2025 01:46 PM |
| 2B | The least round way | 2000 | dp, math | Jan/15/2025 03:42 PM |
| 1486D | Max Median | 2100 | binary search, data structures, dp | Feb/16/2025 02:00 PM |