@@ -1442,62 +1442,6 @@ public function parseMetadata(string $raw_metadata): array
14421442 return $ res ;
14431443 }
14441444
1445- public function getRunConfig (ContestProblem $ problem , Submission $ submission , int $ overshoot = 0 ): string
1446- {
1447- $ memoryLimit = $ problem ->getProblem ()->getMemlimit ();
1448- $ outputLimit = $ problem ->getProblem ()->getOutputlimit ();
1449- if (empty ($ memoryLimit )) {
1450- $ memoryLimit = $ this ->config ->get ('memory_limit ' );
1451- }
1452- if (empty ($ outputLimit )) {
1453- $ outputLimit = $ this ->config ->get ('output_limit ' );
1454- }
1455- $ runExecutable = $ this ->getImmutableRunExecutable ($ problem );
1456-
1457- return $ this ->jsonEncode (
1458- [
1459- 'time_limit ' => $ problem ->getProblem ()->getTimelimit () * $ submission ->getLanguage ()->getTimeFactor (),
1460- 'memory_limit ' => $ memoryLimit ,
1461- 'output_limit ' => $ outputLimit ,
1462- 'process_limit ' => $ this ->config ->get ('process_limit ' ),
1463- 'entry_point ' => $ submission ->getEntryPoint (),
1464- 'pass_limit ' => $ problem ->getProblem ()->getMultipassLimit (),
1465- 'hash ' => $ runExecutable ->getHash (),
1466- 'overshoot ' => $ overshoot ,
1467- ]
1468- );
1469- }
1470-
1471- public function getCompareConfig (ContestProblem $ problem ): string
1472- {
1473- $ compareExecutable = $ this ->getImmutableCompareExecutable ($ problem );
1474- return $ this ->jsonEncode (
1475- [
1476- 'script_timelimit ' => $ this ->config ->get ('script_timelimit ' ),
1477- 'script_memory_limit ' => $ this ->config ->get ('script_memory_limit ' ),
1478- 'script_filesize_limit ' => $ this ->config ->get ('script_filesize_limit ' ),
1479- 'compare_args ' => $ problem ->getProblem ()->getSpecialCompareArgs (),
1480- 'combined_run_compare ' => $ problem ->getProblem ()->getCombinedRunCompare (),
1481- 'hash ' => $ compareExecutable ->getHash (),
1482- ]
1483- );
1484- }
1485-
1486- public function getCompileConfig (Submission $ submission ): string
1487- {
1488- $ compileExecutable = $ submission ->getLanguage ()->getCompileExecutable ()->getImmutableExecutable ();
1489- return $ this ->jsonEncode (
1490- [
1491- 'script_timelimit ' => $ this ->config ->get ('script_timelimit ' ),
1492- 'script_memory_limit ' => $ this ->config ->get ('script_memory_limit ' ),
1493- 'script_filesize_limit ' => $ this ->config ->get ('script_filesize_limit ' ),
1494- 'language_extensions ' => $ submission ->getLanguage ()->getExtensions (),
1495- 'filter_compiler_files ' => $ submission ->getLanguage ()->getFilterCompilerFiles (),
1496- 'hash ' => $ compileExecutable ->getHash (),
1497- ]
1498- );
1499- }
1500-
15011445 /**
15021446 * @return array<string, string>
15031447 */
@@ -1630,9 +1574,9 @@ private function actuallyCreateJudgetasks(int $priority, Judging $judging, int $
16301574 ':compile_script_id ' => $ compileExecutable ->getImmutableExecId (),
16311575 ':compare_script_id ' => $ this ->getImmutableCompareExecutable ($ problem )->getImmutableExecId (),
16321576 ':run_script_id ' => $ this ->getImmutableRunExecutable ($ problem )->getImmutableExecId (),
1633- ':compile_config ' => $ this ->getCompileConfig ($ submission ),
1634- ':run_config ' => $ this ->getRunConfig ($ problem , $ submission , $ overshoot ),
1635- ':compare_config ' => $ this ->getCompareConfig ($ problem ),
1577+ ':compile_config ' => $ this ->config -> getCompileConfig ($ submission ),
1578+ ':run_config ' => $ this -> config ->getRunConfig ($ problem , $ submission , $ overshoot ),
1579+ ':compare_config ' => $ this ->config -> getCompareConfig ($ problem ),
16361580 ];
16371581
16381582 $ judgetaskDefaultParamNames = array_keys ($ judgetaskInsertParams );
0 commit comments