From 3cffb81354aac30059bef53406b6dcb96e262782 Mon Sep 17 00:00:00 2001 From: Cassio de Campos Date: Fri, 10 Nov 2017 23:28:48 +0000 Subject: bf --- src/admin/run.php | 2 +- src/frun.php | 11 +++++------ src/fscore.php | 2 +- src/judge/runchief.php | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/admin/run.php b/src/admin/run.php index 4293881..cc0bb46 100644 --- a/src/admin/run.php +++ b/src/admin/run.php @@ -89,7 +89,7 @@ if(isset($_POST)) { $us = DBAllUserNames($_SESSION["usertable"]["contestnumber"]); for ($i=0; $i\n"; else echo "\n"; diff --git a/src/frun.php b/src/frun.php index d920e74..473c4a5 100644 --- a/src/frun.php +++ b/src/frun.php @@ -15,7 +15,6 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . //////////////////////////////////////////////////////////////////////////////// -// Last modified 29/aug/2017 by cassio@ime.usp.br function DBDropRunTable() { $c = DBConnect(); @@ -499,16 +498,16 @@ function DBUpdateRunAutojudging($contest, $site, $number, $ip, $answer, $stdout, $a["runproblem"] == 11 || $a["runproblem"] == 12 || $a["runproblem"] == 13) - && $retval != 4 && $retval != 6)) { // but WA and TLE are automatic for all problems - - if($b["siteautojudge"]!="t") { + && $retval != 4 && $retval != 6)) { // but WA:6 and TLE:4 are automatic for all problems + if($retval != 1 && $retval != 6 && $retval != 4) { + //if($b["siteautojudge"]!="t") { // && (($retval != 1 && $retval != 6) || $a["runproblem"] == 1 || $a["runproblem"] == 2) ) { //cassiopc incluir automatic judging of some codes 1:YES WA:6 DBExec($c, "commit work", "DBUpdateRunAutojudging(commit)"); LOGLevel("Autojudging answered a run (run=$number, site=$site, contest=$contest, answer='$answer', retval=$retval)", 3); return true; - } + //} + } } - //echo "DEBUG: $contest, $site, " .$a["usernumber"].", $site, $number, $retval\n"; if(DBUpdateRunO($contest, $site, $a["usernumber"], $site, $number, $retval, $c)==false) { DBExec($c, "rollback work", "DBUpdateRunAutoJudging(rollback)"); diff --git a/src/fscore.php b/src/fscore.php index ec03091..6faeb63 100644 --- a/src/fscore.php +++ b/src/fscore.php @@ -374,7 +374,7 @@ function DBScoreSite($contest, $site, $verifylastmile, $hor=-1, $data=null) { if ($i>=$n) break; if($a[$i]["anstime"] <= $ta && $a[$i]["user"]==$user && $a[$i]["problem"]==$problem && $a[$i]["yes"]=='t') { $timet = (int) (($a[$i]["time"])/60); - if(!isset($resp[$user . '-' . $site]["first"]) || $timet < $resp[$user . '-' . $site]["first"]) + if(!isset($resp[$user . '-' . $site]["first"]) || $timet > $resp[$user . '-' . $site]["first"]) // > means last run, < would be first run $resp[$user . '-' . $site]["first"] = $timet; $time += $timet; $resp[$user . '-' . $site]["problem"][$problem]["time"] = $timet; diff --git a/src/judge/runchief.php b/src/judge/runchief.php index a4cd443..7238bed 100644 --- a/src/judge/runchief.php +++ b/src/judge/runchief.php @@ -89,7 +89,7 @@ if(isset($_POST)) { for ($i=0; $i\n"; else echo "\n"; -- cgit v1.2.3