{"id":16158753,"url":"https://github.com/omar-besbes/competitive-programming","last_synced_at":"2025-07-11T14:36:39.689Z","repository":{"id":163280158,"uuid":"482630877","full_name":"omar-besbes/competitive-programming","owner":"omar-besbes","description":"A collection of C++ solutions for various competitive programming events and platforms, including AtCoder, CSES, Codeforces, France-IOI, ICPC, IEEEXtreme, and Winter Cup.","archived":false,"fork":false,"pushed_at":"2024-12-02T15:44:57.000Z","size":664,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-06T01:46:05.902Z","etag":null,"topics":["acpc","atcoder","beginner-friendly","cmake","codeforces","competitive-programming","cpp","cses","france-ioi","ieeextreme","tcpc"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/omar-besbes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-04-17T20:52:40.000Z","updated_at":"2025-02-22T10:25:04.000Z","dependencies_parsed_at":"2024-04-10T01:46:23.797Z","dependency_job_id":"8b055d8e-1f5f-4927-8622-876dffe16bea","html_url":"https://github.com/omar-besbes/competitive-programming","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/omar-besbes/competitive-programming","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omar-besbes%2Fcompetitive-programming","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omar-besbes%2Fcompetitive-programming/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omar-besbes%2Fcompetitive-programming/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omar-besbes%2Fcompetitive-programming/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omar-besbes","download_url":"https://codeload.github.com/omar-besbes/competitive-programming/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omar-besbes%2Fcompetitive-programming/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264833288,"owners_count":23670617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["acpc","atcoder","beginner-friendly","cmake","codeforces","competitive-programming","cpp","cses","france-ioi","ieeextreme","tcpc"],"created_at":"2024-10-10T01:54:57.082Z","updated_at":"2025-07-11T14:36:38.909Z","avatar_url":"https://github.com/omar-besbes.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Competitive Programming Solutions\n\nHey there! 👋 Welcome to my repository where I keep my C/C++ solutions for various competitive programming events and platforms.\n\n## Solutions\n\nAll solutions are in the [`solutions` directory](./solutions).\n\n### Platforms I Use\n\nYou can find my solutions for problems from these platforms:\n\n- \u003ca href=\"https://atcoder.jp\" target=\"_blank\"\u003eAtCoder\u003c/a\u003e -\n[Solutions](./solutions/AtCoder)\n- \u003ca href=\"https://cses.fi/problemset/\" target=\"_blank\"\u003eCSES\u003c/a\u003e -\n[Solutions](./solutions/CSES)\n- \u003ca href=\"https://codeforces.com\" target=\"_blank\"\u003eCodeforces\u003c/a\u003e -\n[Solutions](./solutions/Codeforces)\n- \u003ca href=\"https://www.france-ioi.org/algo/chapters.php\" target=\"_blank\"\u003eFrance-IOI\u003c/a\u003e -\n[Solutions](./solutions/France-IOI)\n\n### Events I Compete In\n\nThese are some of the competitive programming events I’ve participated in:\n\n- \u003ca href=\"https://icpc.global\" target=\"_blank\"\u003eICPC\u003c/a\u003e -\n[Solutions](./solutions/ICPC)\n- \u003ca href=\"https://ieeextreme.org\" target=\"_blank\"\u003eIEEEXtreme\u003c/a\u003e -\n[Solutions](./solutions/IEEEXtreme)\n- \u003ca href=\"https://www.facebook.com/INSATWinterCup/\" target=\"_blank\"\u003eWinter Cup\u003c/a\u003e -\n[Solutions](./solutions/WinterCup)\n\n## Getting started\n\nTo run the solutions in this repository, you'll need the following tools:\n\n- A `C/C++` compiler like `gcc`.\n- A `C/C++` debugger such as `gdb` (optional).\n- `CMake` and `ninja` for managing binaries.\n\n\u003e [!Note]\n\u003e\n\u003e `VSCode` users don't have to to use CMake/Ninja anymore.  \n\u003e Just clone the project and you should be able to run/debug the active file directly\n\u003e from the run/debug button in the top right corner.\n\u003e\n\n## CMake/Ninja Setup Instructions\n\n\u003e [!Note]\n\u003e\n\u003e Why should I use `CMake` to use this repository ?\n\u003e\n\u003e Originally, I used `CMake` to keep the binaries (the files generated when you\n\u003e run/debug solutions) separate from the source files.\n\u003e Both `CLion` and `VSCode` support `CMake`, which was handy as I hadn’t settled on a\n\u003e specific editor at the time.  \n\u003e Later when I discovered that `VSCode` tasks and launch configurations could work\n\u003e without `CMake`, I switched to a simpler setup,\n\u003e while keeping `CMake` functionality for those who prefer it.\n\u003e\n\u003e To be clear, **`CMake` is not mandatory**. Feel free to run the solutions however you\n\u003e prefer (but you'll be on your own).\n\u003e\n\nThis project uses `CMake` to compile all solution files into a separate build directory, typically named `build`. In my configuration, the default directory is `.build`, but you can change this in `CMakePresets.json`.\n\nTo run a solution, you'll need to *configure* and *build* the project:\n\n- `CMake` will recursively scan the repository for all `cpp` files during the *configure* step.\n- It will then compile these files during the *build* step, placing the binaries in `.build/default/bin`.\n- Binaries are named in the format: `\u003cdirectory_name\u003e--\u003cfilename\u003e`.\n\n`CMake` presets simplify this process, allowing you to configure and build the project with predefined settings. The repository currently includes a `default` preset for your convenience.\n\n### Running Solutions\n\nThere are different ways to execute solutions depending on your editor or IDE:\n\n- **Visual Studio Code:**  \n  Install the [CMake Tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) extension. You'll see new icons in the status bar, allowing you to choose a preset, build the project, and run a solution with just a few clicks.\n\n- **CLion:**  \n  CLion should automatically detect the `CMake` configuration. To run a solution, simply click the green *Run* button in the top-right corner of the editor.\n\n- **Other Editors/IDEs:**  \n  Refer to your editor's documentation for `CMake` integration instructions.\n\n- **Terminal:**  \n  If your editor/IDE doesn't support `CMake` integration, you can use the terminal commands:\n  - First-time setup: `cmake --preset default`\n  - Build the project: `cmake --build --preset default`\n  - Run a solution: `./.build/default/bin/\u003ctarget_name\u003e`\n\n### Reproducing This Setup in Another Repository\n\n#### CMake Configuration\n\nThe `CMake` setup is managed through two key files: `CMakeLists.txt` and `CMakePresets.json`.\n\n- `CMakeLists.txt`: Configures how `CMake` detects source files and assigns target names to binaries, allowing you to run solutions without navigating to the binary's directory.\n\n- `CMakePresets.json`: Configures the build directory location, generator, and other settings.\n\nTo replicate this setup, copy these two files to your new repository and adjust them as needed.\n\n#### Visual Studio Code Configuration\n\nFor `VSCode`, I used to use the [CMake Tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) extension. You may customize the status bar appearance in `.vscode/settings.json`. You can learn more about configuring the status bar for this extension [here](https://github.com/microsoft/vscode-cmake-tools/blob/main/docs/cmake-options-configuration.md).\n\n## Report an issue with a solution\n\nGenerally speaking, I include solutions in this repository that have been submitted and accepted.\nHowever, there may be instances where solutions were not accepted or the version is outdated.\nIf you encounter such issues, please feel free to open an issue in this repository.\n\nGood luck with your problem solving! 🚀\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomar-besbes%2Fcompetitive-programming","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomar-besbes%2Fcompetitive-programming","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomar-besbes%2Fcompetitive-programming/lists"}