JudgeServer/client/Python/languages.py
2016-10-07 17:32:11 +08:00

66 lines
2.0 KiB
Python

# coding=utf-8
from __future__ import unicode_literals
c_lang_config = {
"compile": {
"src_name": "main.c",
"exe_name": "main",
"max_cpu_time": 3000,
"max_real_time": 5000,
"max_memory": 128 * 1024 * 1024,
"compile_command": "/usr/bin/gcc -DONLINE_JUDGE -O2 -w -fmax-errors=3 -std=c99 -static {src_path} -lm -o {exe_path}",
},
"run": {
"command": "{exe_path}",
"seccomp_rule": "c_cpp"
},
"spj_compile": {
"src_name": "spj-{spj_version}.c",
"exe_name": "spj-{spj_version}",
"max_cpu_time": 3000,
"max_real_time": 5000,
"max_memory": 1024 * 1024 * 1024,
"compile_command": "/usr/bin/gcc -DONLINE_JUDGE -O2 -w -fmax-errors=3 -std=c99 {src_path} -lm -o {exe_path}"
},
"spj_config": {
"exe_name": "spj-{spj_version}",
"command": "{exe_path} {in_file_path} {user_out_file_path}",
"seccomp_rule": "c_cpp"
}
}
cpp_lang_config = {
"name": "cpp",
"compile": {
"src_name": "main.cpp",
"exe_name": "main",
"max_cpu_time": 3000,
"max_real_time": 5000,
"max_memory": 128 * 1024 * 1024,
"compile_command": "/usr/bin/g++ -DONLINE_JUDGE -O2 -w -fmax-errors=3 -std=c++11 {src_path} -lm -o {exe_path}",
},
"run": {
"command": "{exe_path}",
"seccomp_rule": "c_cpp",
"max_process_number": -1
}
}
java_lang_config = {
"name": "java",
"compile": {
"src_name": "Main.java",
"exe_name": "Main",
"max_cpu_time": 3000,
"max_real_time": 5000,
"max_memory": -1,
"compile_command": "/usr/bin/javac {src_path} -d {exe_dir} -encoding UTF8"
},
"run": {
"command": "/usr/bin/java -cp {exe_dir} -Xss1M -XX:MaxPermSize=16M -XX:PermSize=8M -Xms16M -Xmx{max_memory}k -Djava.security.manager -Djava.security.policy==/etc/java_policy -Djava.awt.headless=true Main",
"seccomp_rule": None,
"max_process_number": -1
}
}