A gedit plugin which can test OI codes.
- Test your OI codes fast.
- Highly customizable: almost all things of OI Tool can be customized.
- Multiunctions: support building, testing multiple testcases, and stress testing against another program.
- Operating system: Linux
- Do NOT put files with extension with prefix
ya(such asa.yaerrandf.yainfo) in the same folder with your code.
Download the files in releases and copy them to ~/.config/gedit/tools.
The configuration file should be named .ya in your user folder.
The configuration file should be named .ya in the workspace folder.
The configuration file should be named <name>.ya in the workspace folder.
The configuration file should be like:
key1 = value1
key2 = "value2" # String should be quoted in " "
...
keyn = valuen
# You can insert comments starting with "#" in the configuration file.If there is no configuration file found, then the default setting will be used.
- Open your source file
<name>.<ext>. After building, the executable file will be named<exe>(<exe>=<name>). - Put your testcases in
<i>.inand<i>.ans. (<i>is the ID of the testcases, ranging in [0,<testcases>]) - Press the shortcut key
F5. - You can see the results in the panel below.
Judge results are:
AC(Answer correct),WA(Wrong answer),TLE(Time limit exceeded) andRE(Runtime error). Yourstdoutandstderrare redirected to<exe><i>.outand<exe>.<i>.yaerrrespectively.
| Key | Type | Default Value | Description |
|---|---|---|---|
time_limit |
Integer | 5 | Time limit. Unit: second |
memory_limit |
Integer | 512 | Memory limit. Unit: MB |
compiler |
String | g++ <file> -o <exe> -lm -O2 -std=c++11 &> <err> |
Compile command. <file>: source file. <exe>: executable file. <err>: compiler output file. |
judger |
String | diff <out> <ans> -w -B -q &> /dev/null |
Judger of the output. <in>: input file. <out>: output file. <ans>: answer file. <err>: judger output file. |
input_file |
String | <i>.in |
Input file. <i>: testcase ID. <exe>: executable file. |
output_file |
String | <exe><i>.out |
Output file. <i>: testcase ID. <exe>: executable file. |
answer_file |
String | <i>.ans |
Answer file. <i>: testcase ID. <exe>: executable file. |
It is similar to "OI Tool - Build and run testcases".
The only difference is that "OI Tool - Build" will only build the source file and it will not run testcases.
The shortcut key for "OI Tool - Build" is Ctrl + F5.
- Put your program's executable file
<program>, standard program's executable file<std>and input generator's executable file<gen>in the workspace folder. - Press the shortcut key
Ctrl + Shift + F12. - The first generated data that caused a
WAwill be copied in<program>.yainand<std>.yaout. Yourstdoutandstderrare redirected to<program>.yaoutand<program>.yaerrrespectively.
| Key | Type | Default Value | Description |
|---|---|---|---|
program |
String | a |
Your program's executable file. |
std |
String | f |
Standard program's executable file. |
gen |
String | g |
Input generator's executable file. |
judger |
String | diff <out> <ans> -w -B -q &> /dev/null |
Judger of the output. <in>: input file. <out>: output file. <ans>: answer file. <err>: judger output file. |
