<th>内存使用</th> <th>返回</th> </tr> <tr> <?php $nodata = false; for ($P = 1; $P <= $d['datacnt']; $P++) { $Cp->run($P); flush(); ?> <td><?php echo $P; ?> </td> <td><?php echo $Cp->getresult(); ?> </td> <td><?php echo $Cp->getthisscore(); ?> </td> <td><?php printf("%.3f s", $Cp->runtime / 1000.0); ?> </td> <td><?php echo $Cp->memory; ?> KB</td> <td><?php
$info['pid'] = $d['pid']; $info['uid'] = $d['uid']; $info['language'] = $d['lang']; $info['pname'] = $d['filename']; $info['datacnt'] = $d['datacnt']; $info['timelimit'] = $d['timelimit']; $info['memorylimit'] = $d['memorylimit']; $info['plugin'] = $d['plugin']; $info['compiledir'] = $cdir; $Cp = new Compiler($info); $free = $Cp->getgds($_POST['judger']); if (!$free) { echo "No Grader!Please Wait and Retry."; exit; } $Cp->lock(); $Cp->getdir(); $csucc = $Cp->compile(); if (!$csucc) { echo "0!C"; $Cp->s_detail = "C"; } else { for ($P = 1; $P <= $d[datacnt]; $P++) { $Cp->run($P); $Cp->getresult(); } $Cp->getscore(); echo "{$Cp->s_score}!{$Cp->s_detail}!" . $Cp->gettotaltime() . "!" . $Cp->getmemory(); } $Cp->writedb_comp($_POST['csid']); $Cp->unlock();