GithubHelp home page GithubHelp logo

cpp-programming-contest-environment's Introduction

2-Click C++ Programming Contest Environment

This repository make it possible for programmers to create C++ programming contest environment by 2-Click.

Why is it useful?

It is very tedious job to install all necessary compilers and tools to local computer. There might be some errors to overcome to submit C++ program to programming contest service. What programmers want to do is not developping environment but developping program.

This repository uses VSCode Dev Container to create the environment with 2-Click.

Tested Environments

  • Windows 10
  • Mac with Intel Chip
  • Mac with Apple Chip

Getting started

Requirements

Install the following applications.

Setup environment

Open this repository with VSCode. Click left bottom corner of the VSCode window as follows, then choose "Reopen in Container".

doc/open_dev_container.png

Wait for a while. After builds and setups, you can write code in dev container environment. (First time, it takes for long time, but next time, it's quick to open the environment.)

This environment contains the following tools.

Solve programming content problem

For example, let's solve AtCoder Library Practice Contest .

There are three tasks to do.

  1. Login (Once)
  2. Download problem
  3. Solve and submit

First, login to the contest page to submit code afterwards.

To login/download/submit problem, the dev container uses oj tool. In this repository, there is the specific VSCode task to login contest site.

Choose Terminal -> Run Task from VSCode menu, then choose login. You should enter, https://atcoder.jp/contests/practice2 as url, your atcoder username as password and your atcoder password as password. If you haven't created account, please create it for register.

doc/login.png

Second, choose Terminal -> Run Task from VSCode menu, then choose download code.

doc/download_code.png

Enter the problem URL https://atcoder.jp/contests/practice2 to the input and click enter. Inside the task, oj-prepare https://atcoder.jp/contests/practice2 is executed, automatically problem set is donwloaded to under contest/atcoder.jp/practice2 directory.

doc/donwloaded_problems.png

Open, contest/atcoder.jp/practice2/practice2_a/main.cpp in VSCode, then solve the problem.

Lastly, you can submit the code to AtCoder. Choose Terminal -> Run Task from VSCode menu while opening the solved main.cpp code, then choose submit code.

Boom! The code is tested and submitted to the contest. If it has any error, you can see it on Terminal.

Tips

Use debugger

To debug code, click Run start Debugging in menu while opening code. Then, input should be put in terminal. The following shows how to debug the code.

cpp-env.mp4

Use git to commit problem codes.

Any file under content directory, it is ignored by .gitignore. You can delete contest line from .gitignore to commit these files.

cpp-programming-contest-environment's People

Contributors

wapa5pow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cpp-programming-contest-environment's Issues

Fail to run on Mac M1 environment.

Error message

failed to solve with frontend dockerfile.v0: failed to create LLB definition: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.