Skip to content

kazuya0202/atcoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AtCoder

Links

Setup

Requirements

Install and activate venv

uv sync

If you haven't activated venv, execute below:

source venv/bin/activate

Login

It is required to download and submit problems.

oj login https://atcoder.jp

Note

atcoder-tools The first time you execute atcoder-tools command, you are asked to log in.

Create ~/.atcodertools.toml

Copy atcodertools.toml in current directory to ~/.atcodertools.toml.

cp atcodertools.toml ~/.atcodertools.toml

Configure keybinding

  1. Open keybindings.json in vscode. (Command Pallete > Preferences: Open Keyboard Shortcuts (JSON))
  2. Append below to keybindings.json:
    {
        "key": "ctrl+shift+c",
        "command": "workbench.action.tasks.runTask",
        "when": "editorTextFocus",
        "args": "AtCoder_Test"
    },
    {
        "key": "cmd+ctrl+shift+s",
        "command": "workbench.action.tasks.runTask",
        "when": "editorTextFocus",
        "args": "AtCoder_Submit"
    }

Note

AtCoder_Test and AtCoder_Submit are task names in .vscode/tasks.json.

Usage

Download problems

sh tools/download_problem.sh <CONTEST_ID>
# e.g. sh download_problem.sh abc326

Download problems sequentially

before executing below command, edit variables (start, end) in tools/seq_download_problem.py

python tools/seq_download_problems.py

Write a program

<CONTEST_ID>/<PROBLEM_LEVEL>/main.py
# e.g. abc326/A/main.py

Test

in <CONTEST_ID>/<PROBLEM_LEVEL>/main.py

Execute with shortcut (shift + ctrl + c) in macOS.
Then open new terminal and execute test automatically.

This shortcut is added to keybindings.json in vscode.

Submit

Execute with shortcut (cmd + shift + ctrl + s) in macOS.
Then open new terminal and execute submit automatically.

This shortcut is added to keybindings.json in vscode.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Languages