编程语言更新
This commit is contained in:
parent
5a1cbc7420
commit
0e812a439f
|
@ -8,8 +8,8 @@
|
|||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<module name="api" />
|
||||
<module name="DataBackup" />
|
||||
<module name="JudgeServer" />
|
||||
<module name="DataBackup" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
</component>
|
||||
|
|
|
@ -48,7 +48,8 @@ public class JudgeServiceImpl extends ServiceImpl<JudgeMapper, Judge> implements
|
|||
public Judge Judge(Problem problem, Judge judge) {
|
||||
|
||||
// c和c++为一倍时间和空间,其它语言为2倍时间和空间
|
||||
if (!judge.getLanguage().equals("C++") && !judge.getLanguage().equals("C")) {
|
||||
if (!judge.getLanguage().equals("C++") && !judge.getLanguage().equals("C")&&
|
||||
!judge.getLanguage().equals("C++ With O2") && !judge.getLanguage().equals("C With O2")) {
|
||||
problem.setTimeLimit(problem.getTimeLimit() * 2);
|
||||
problem.setMemoryLimit(problem.getMemoryLimit() * 2);
|
||||
}
|
||||
|
|
|
@ -145,9 +145,13 @@ public class Constants {
|
|||
{2} --> exeName
|
||||
*/
|
||||
public enum CompileConfig {
|
||||
C("C", "main.c", "main", 3000L, 10000L, 256 * 1024 * 1024L, "/usr/bin/gcc -DONLINE_JUDGE -O2 -w -fmax-errors=3 -std=c11 {1} -lm -o {2}", defaultEnv),
|
||||
C("C", "main.c", "main", 3000L, 10000L, 256 * 1024 * 1024L, "/usr/bin/gcc -DONLINE_JUDGE -w -fmax-errors=3 -std=c11 {1} -lm -o {2}", defaultEnv),
|
||||
|
||||
CPP("C++", "main.cpp", "main", 10000L, 20000L, 512 * 1024 * 1024L, "/usr/bin/g++ -DONLINE_JUDGE -O2 -w -fmax-errors=3 -std=c++14 {1} -lm -o {2}", defaultEnv),
|
||||
CWithO2("C With O2", "main.c", "main", 3000L, 10000L, 256 * 1024 * 1024L, "/usr/bin/gcc -DONLINE_JUDGE -O2 -w -fmax-errors=3 -std=c11 {1} -lm -o {2}", defaultEnv),
|
||||
|
||||
CPP("C++", "main.cpp", "main", 10000L, 20000L, 512 * 1024 * 1024L, "/usr/bin/g++ -DONLINE_JUDGE -w -fmax-errors=3 -std=c++14 {1} -lm -o {2}", defaultEnv),
|
||||
|
||||
CPPWithO2("C++ With O2", "main.cpp", "main", 10000L, 20000L, 512 * 1024 * 1024L, "/usr/bin/g++ -DONLINE_JUDGE -O2 -w -fmax-errors=3 -std=c++14 {1} -lm -o {2}", defaultEnv),
|
||||
|
||||
JAVA("Java", "Main.java", "Main.class", 5000L, 10000L, 512 * 1024 * 1024L, "/usr/bin/javac -d {0} -encoding utf8 ./{1}", defaultEnv),
|
||||
|
||||
|
@ -236,8 +240,12 @@ public class Constants {
|
|||
public enum RunConfig {
|
||||
C("C", "{0}/{1}", "main", defaultEnv),
|
||||
|
||||
CWithO2("C With O2", "{0}/{1}", "main", defaultEnv),
|
||||
|
||||
CPP("C++", "{0}/{1}", "main", defaultEnv),
|
||||
|
||||
CPPWithO2("C++ With O2", "{0}/{1}", "main", defaultEnv),
|
||||
|
||||
JAVA("Java", "/usr/bin/java Main", "Main.class", defaultEnv),
|
||||
|
||||
PYTHON2("Python2", "/usr/bin/python {1}", "main", defaultEnv),
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue