cd ~
echo 'export PATH="~f103207425/.local/bin:$PATH"' >> ~/.profile
source ~/.bashrc
- Clone this project
git clone https://github.com/josix/oj-cli.git
- Update
HOSTvariable value in fileoj-cli/constants.pyto the OnlineJudge URL you accessing - Update Shebang(
#!/opt/csw/bin/python2.7) value to a suitable one inoj.py
Use oj login to login to the account in OnlineJudge. It required you to enter your account information so that oj-cli could access OnlineJudge service successfully. After entering your username and password. oj-cli will respond if you login successfully or not.
No argument required. Only enter oj login and fill the account information to login to OnlineJudge.
$ oj login
Usernme:
Password:
Use oj get_assign <assign_no> to download the latest assignment from contest. The downloaded files are stored in folder hwX or exX. The folder includes testing data, output data, and template C script, which are named as 1.in, 1.out, and hwX.c(or exX.c) separately.
oj get_assign only required one argument to execute.
assign_no represents your assign number like hw1, ex1, etc. oj-cli will prompt Invalid Assign Number! if the input assign number has not opened.
$ oj get_assign hw2
$ oj get_assign ex3
Use oj submit <assign_no> <code_file> to submit your code to contest.
oj get_assign required two arguments to execute.
assign_no represents your assign number like hw1, ex1, etc. oj-cli will prompt Invalid Assign Number! if the input assign number has not opened.
code_file is the path to your script. oj will read the file then submit this answer to OnlineJudge Service.
$ oj submit hw2 hw2.c
$ oj submit ex3 ../ex3.c