:bar_chart: Codeforces CLI (提交、解析、测试等)。支持比赛、体育馆、组、acmsguru、Windows、macOS、Linux,7 MB
:bar_chart: Codeforces CLI (提交、解析、测试等)。支持比赛、体育馆、组、acmsguru、Windows、macOS、Linux,7 MB
Codeforces Tool is a command-line interface tool for Codeforces.
It's fast, small, cross-platform and powerful.
Installation | Usage | FAQ | 中文
Pull requests are always welcome.
You can download the pre-compiled binary file in here.
Then enjoy the cf-tool~
Or you can compile it from the source (go >= 1.12):
$ go get github.com/xalanq/cf-tool
$ cd $GOPATH/src/github.com/xalanq/cf-tool
$ go build -ldflags "-s -w" cf.go
If you don't know what's the $GOPATH, please see here https://github.com/golang/go/wiki/GOPATH.
Let's simulate a competition.
cf race 1136 or cf race https://codeforces.com/contest/1136
To start competing the contest 1136!
If the contest has not started yet, cf will count down. If the contest have started or the countdown ends, cf will use the default browser to open dashboard's page and problems' page, and fetch all samples to the local.
cd ./cf/contest/1136/a (May be different from this, please notice the message on your screen)
Enter the directory of problem A, the directory should contain all samples of the problem.
cf gen
Generate a code with the default template. The filename of the code is problem id by default.
vim a.cpp
Use Vim to write the code (It depends on yourself).
cf test
Compile and test all samples.
cf submit
Submit the code.
cf list
List problems' stats of the contest.
cf stand
Open the standings' page of the contest.
…
The placeholders inside the template will be replaced with the corresponding content when you run cf gen.
$%U%$ Handle (e.g. xalanq)
$%Y%$ Year (e.g. 2019)
$%M%$ Month (e.g. 04)
$%D%$ Day (e.g. 09)
$%h%$ Hour (e.g. 08)
$%m%$ Minute (e.g. 05)
$%s%$ Second (e.g. 00)
/* Generated by powerful Codeforces Tool
* You can download the binary file in here https://github.com/xalanq/cf-tool (Windows, macOS, Linux)
* Author: $%U%$
* Time: $%Y%$-$%M%$-$%D%$ $%h%$:$%m%$:$%s%$
**/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
return 0;
}
Codeforces Tool is a command-line tool. You should run it in terminal.
cf commandYou should put the cf program to a path (e.g. /usr/bin/ in Linux) which has been added to system environment variable PATH.
Or just google "how to add a path to system environment variable PATH".
Create two extra testcase files inK.txt and ansK.txt (K is a string with 0~9).
Use this Infinidat/infi.docopt_completion.
Note: If there is a new version released (especially a new command added), you should run docopt-completion cf again.
暂无开放 Issues,或尚未同步最近议题。