OnlineJudge/judge/language.py
virusdefender dd7fe6ee44 给编译器也增加超时保护
比如使用include</dev/random>就可能导致编译器卡死,增加了一个编译超时。
重命名了exception模块
整理了部分格式
2015-07-07 21:04:38 +08:00

29 lines
728 B
Python

# coding=utf-8
languages = {
"1": {
"name": "c",
"src_name": "main.c",
"code": 1,
"compile_command": "gcc -DONLINE_JUDGE -O2 -Wall -std=c99 -pipe {src_path} -lm -o {exe_path}main",
"execute_command": "{exe_path}main"
},
"2": {
"name": "cpp",
"src_name": "main.cpp",
"code": 2,
"compile_command": "g++ -DONLINE_JUDGE -O2 -Wall -std=c++11 -pipe {src_path} -lm -o {exe_path}main",
"execute_command": "{exe_path}main"
},
"3": {
"name": "java",
"src_name": "Main.java",
"code": 3,
"compile_command": "javac {src_path} -d {exe_path}",
"execute_command": "java -cp {exe_path} Main"
}
}