This repository contains solutions to various competitive programming problems, implemented in C++, C#, and Python. Each folder corresponds to a specific problem or topic, with implementations in one or more languages.
- File:
Day1_ORBS/orbs.cpp
- Description: Solution to the "ORBS" problem, likely involving operations on orbs with weights and selection logic.
- Files:
Day1_Route/route.cpp
,Day1_Route/route.h
,Day1_Route/grader.cpp
,Day1_Route/test_route.cpp
,Day1_Route/test_grader.cpp
- Description: Implements a route assignment algorithm. Includes a grader and test files for validation.
- File:
Day1_Sculpture/sculpture.cpp
- Description: Solves the "Sculpture" problem, likely involving dynamic programming and segment trees for optimal arrangement.
- File:
Day2_Bit_String/bit_string.cpp
- Description: Handles bit string manipulations and queries, possibly using dynamic programming.
- File:
Day2_Lover/lover.cpp
- Description: Solution for the "Lover" problem, involving prefix sums and dynamic programming for segment partitioning.
- File:
Day2_Tour/tour.cpp
- Description: Solves the "Tour" problem, involving graph traversal and path calculations.
- File:
Day1_ORBS/OrbsApp/Program.cs
- Description: C# implementation of the ORBS problem, using collections and LINQ for efficient operations.
- File:
Day1_Route/RouteApp/Program.cs
- Description: C# version of the route assignment problem, with input/output handling and route logic.
- File:
Day1_Sculpture/SculptureApp/Program.cs
- Description: C# solution for the Sculpture problem, using segment trees and dynamic programming.
- File:
Day2_Bit_String/BitStringApp/Program.cs
- Description: C# implementation for bit string queries and dynamic programming.
- File:
Day2_Lover/LoverApp/Program.cs
- Description: C# solution for the Lover problem, using prefix sums and dynamic programming.
- File:
Day2_Tour/TourApp/Program.cs
- Description: C# implementation of the Tour problem, involving graph traversal and path comparison.
- File:
Day2_Tour/tour_v2.py
- Description: Python implementation of the Tour problem, using threading for fast input and graph traversal logic.
- Each folder may contain a
Readme/
subfolder with problem statements or additional documentation. - The
.vscode/
folder contains configuration for building and debugging in Visual Studio Code.
You can set up a C++ development environment using Chocolatey:
-
Install Chocolatey (if not already installed):
Open PowerShell as Administrator and run:Set-ExecutionPolicy Bypass -Scope Process -Force; ` [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; ` iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
-
Install a C++ compiler and build tools:
choco install mingw choco install cmake
-
(Optional) Install Visual Studio Code:
choco install vscode
-
Add MinGW to your PATH:
Chocolatey usually adds it automatically, but if not, addC:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin
to your system PATH. -
Verify installation:
Open a new terminal and run:g++ --version cmake --version
Now you can build and run C++ programs from the terminal or within VS Code.
To enhance your C++ development experience in Visual Studio Code, follow these steps:
-
Install the C/C++ Extension:
- Open Visual Studio Code.
- Go to the Extensions view by clicking the square icon on the sidebar or pressing
Ctrl+Shift+X
. - Search for
C/C++
by Microsoft. - Click Install.
-
(Optional) Install Additional Helpful Extensions:
- CMake Tools (for CMake project integration)
- Code Runner (to quickly run code snippets)
- Better C++ Syntax (for improved syntax highlighting)
-
Configure IntelliSense and Build Tasks:
- After installing, open a C++ file. The extension will prompt you to install recommended tools if needed.
- You can configure build tasks by pressing
Ctrl+Shift+B
and selecting a build configuration or creating a new one.
-
Debugging:
- Set breakpoints and press
F5
to start debugging. - Make sure your compiler (e.g., MinGW) is in your system PATH.
- Set breakpoints and press
For more details, see the official documentation.