Skip to content

v0.2 Basic Usage

陈鼫RWHTYFZ edited this page Jan 17, 2023 · 4 revisions

Config

0.Install dependency and this tool

git clone https://github.com/CroMarmot/yxr-atcoder-core.git
cd yxr-atcoder-core
pip3 install -e .
git clone https://github.com/CroMarmot/oiTerminal -b He
cd oiTerminal
pip3 install -e .
# enable auto completion
./auto-completion/gen-ot-auto-completion.sh
source /tmp/ot-auto-completion.sh

1.Init folder

oi init

2.Manual config codeforces RCPC(no longer need)

.oiTerminal/CF_RCPC, example:

ea139348c88a2cc70d700f898c8b0d0a

the RCPC field in your browser's codeforces.com's cookie

3.Add new account

replace Cro-Marmot with your handle

oi config account new Codeforces Cro-Marmot

4.Config template

oi config template new PLATFORM NAME PATH COMPILE EXECUTE LANGID

NAME is nickname for this config

PATH replace /mycode/template/Main.cpp with your template code path

COMPILE: Compile command

EXECUTE: Execute command

LANGID: 73 is for GNU G++20 11.2.0 (64 bit, winlibs) in Codeforces (different in different platforms, later will supported, supported in v0.1)`

Example:

oi config template new Codeforces C++20 "/mycode/template/Main.cpp" "clang++ -o Main Main.cpp -std=gnu++17 -O2 -g -Wall -Wcomma -Wextra -fsanitize=integer,undefined,null,alignment" "./Main" 73

Daily use

0.Fetch a contest

oi contest fetch Codeforces 1713

1.Sample data testing after writing the code

in your code folder

oi test

2.Submit your code

in your code folder

oi submit

More Usage

oi --help
oi config --help
oi contest --help