update compiler

This commit is contained in:
virusdefender 2018-03-18 10:29:34 +08:00
parent 8455a856a1
commit 108ad33977

View File

@ -24,7 +24,7 @@ int main() {
"max_cpu_time": 3000, "max_cpu_time": 3000,
"max_real_time": 5000, "max_real_time": 5000,
"max_memory": 256 * 1024 * 1024, "max_memory": 256 * 1024 * 1024,
"compile_command": "/usr/bin/gcc -DONLINE_JUDGE -O2 -w -fmax-errors=3 -std=c99 {src_path} -lm -o {exe_path}", "compile_command": "/usr/bin/gcc -DONLINE_JUDGE -O2 -w -fmax-errors=3 -std=c11 {src_path} -lm -o {exe_path}",
}, },
"run": { "run": {
"command": "{exe_path}", "command": "{exe_path}",
@ -38,7 +38,7 @@ _c_lang_spj_compile = {
"max_cpu_time": 3000, "max_cpu_time": 3000,
"max_real_time": 5000, "max_real_time": 5000,
"max_memory": 1024 * 1024 * 1024, "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}" "compile_command": "/usr/bin/gcc -DONLINE_JUDGE -O2 -w -fmax-errors=3 -std=c11 {src_path} -lm -o {exe_path}"
} }
_c_lang_spj_config = { _c_lang_spj_config = {
@ -71,7 +71,7 @@ int main() {
"max_cpu_time": 3000, "max_cpu_time": 3000,
"max_real_time": 5000, "max_real_time": 5000,
"max_memory": 512 * 1024 * 1024, "max_memory": 512 * 1024 * 1024,
"compile_command": "/usr/bin/g++ -DONLINE_JUDGE -O2 -w -fmax-errors=3 -std=c++11 {src_path} -lm -o {exe_path}", "compile_command": "/usr/bin/g++ -DONLINE_JUDGE -O2 -w -fmax-errors=3 -std=c++14 {src_path} -lm -o {exe_path}",
}, },
"run": { "run": {
"command": "{exe_path}", "command": "{exe_path}",
@ -85,7 +85,7 @@ _cpp_lang_spj_compile = {
"max_cpu_time": 3000, "max_cpu_time": 3000,
"max_real_time": 5000, "max_real_time": 5000,
"max_memory": 1024 * 1024 * 1024, "max_memory": 1024 * 1024 * 1024,
"compile_command": "/usr/bin/g++ -DONLINE_JUDGE -O2 -w -fmax-errors=3 -std=c++11 {src_path} -lm -o {exe_path}" "compile_command": "/usr/bin/g++ -DONLINE_JUDGE -O2 -w -fmax-errors=3 -std=c++14 {src_path} -lm -o {exe_path}"
} }
_cpp_lang_spj_config = { _cpp_lang_spj_config = {
@ -168,12 +168,12 @@ _py3_lang_config = {
languages = [ languages = [
{"config": _c_lang_config, "spj": {"compile": _c_lang_spj_compile, "config": _c_lang_spj_config}, {"config": _c_lang_config, "spj": {"compile": _c_lang_spj_compile, "config": _c_lang_spj_config},
"name": "C", "description": "GCC 4.8", "content_type": "text/x-csrc"}, "name": "C", "description": "GCC 5.4", "content_type": "text/x-csrc"},
{"config": _cpp_lang_config, "spj": {"compile": _cpp_lang_spj_compile, "config": _cpp_lang_spj_config}, {"config": _cpp_lang_config, "spj": {"compile": _cpp_lang_spj_compile, "config": _cpp_lang_spj_config},
"name": "C++", "description": "G++ 4.8", "content_type": "text/x-c++src"}, "name": "C++", "description": "G++ 5.4", "content_type": "text/x-c++src"},
{"config": _java_lang_config, "name": "Java", "description": "OpenJDK 1.7", "content_type": "text/x-java"}, {"config": _java_lang_config, "name": "Java", "description": "OpenJDK 1.7", "content_type": "text/x-java"},
{"config": _py2_lang_config, "name": "Python2", "description": "Python 2.7", "content_type": "text/x-python"}, {"config": _py2_lang_config, "name": "Python2", "description": "Python 2.7", "content_type": "text/x-python"},
{"config": _py3_lang_config, "name": "Python3", "description": "Python 3", "content_type": "text/x-python"}, {"config": _py3_lang_config, "name": "Python3", "description": "Python 3.5", "content_type": "text/x-python"},
] ]
spj_languages = list(filter(lambda item: "spj" in item, languages)) spj_languages = list(filter(lambda item: "spj" in item, languages))