userCanSeeProblemStatistics(Auth::user()) || UOJResponse::page403(); } UOJProblem::cur()->userCanView(Auth::user(), ['ensure' => true]); function scoreDistributionData() { $data = array(); $res = DB::selectAll([ "select score, count(*) from submissions", "where", [ "problem_id" => UOJProblem::info('id'), ["score", "is not", null], UOJSubmission::sqlForUserCanView(Auth::user(), UOJProblem::cur()) ], "group by score", "order by score" ], DB::NUM); $has_score_0 = false; $has_score_100 = false; foreach ($res as $row) { if ($row[0] == 0) { $has_score_0 = true; } else if ($row[0] == 100) { $has_score_100 = true; } $score = UOJSubmission::roundedScore($row[0]) * 100; $data[] = ['score' => $score, 'count' => $row[1]]; } if (!$has_score_0) { array_unshift($data, ['score' => 0, 'count' => 0]); } if (!$has_score_100) { $data[] = ['score' => 10000, 'count' => 0]; } return $data; } $data = scoreDistributionData(); $pre_data = $data; $suf_data = $data; for ($i = 0; $i < count($data); $i++) { $data[$i]['score'] /= 100; } for ($i = 1; $i < count($data); $i++) { $pre_data[$i]['count'] += $pre_data[$i - 1]['count']; } for ($i = count($data) - 1; $i > 0; $i--) { $suf_data[$i - 1]['count'] += $suf_data[$i]['count']; } $submissions_sort_by_choice = !isset($_COOKIE['submissions-sort-by-code-length']) ? 'time' : 'tot_size'; if (UOJContest::cur()) { $PageTitle = UOJProblem::cur()->getTitle(['with' => 'letter', 'simplify' => true]); } else { $PageTitle = UOJProblem::cur()->getTitle(['with' => 'id']); } ?>
[ 'name' => UOJLocale::get('contests::contest dashboard'), 'url' => UOJContest::cur()->getUri(), ], 'submissions' => [ 'name' => UOJLocale::get('contests::contest submissions'), 'url' => UOJContest::cur()->getUri('/submissions'), ], 'standings' => [ 'name' => UOJLocale::get('contests::contest standings'), 'url' => UOJContest::cur()->getUri('/standings'), ], ]; if (UOJContest::cur()->progress() > CONTEST_TESTING) { $tabs_info['after_contest_standings'] = [ 'name' => UOJLocale::get('contests::after contest standings'), 'url' => UOJContest::cur()->getUri('/after_contest_standings'), ]; $tabs_info['self_reviews'] = [ 'name' => UOJLocale::get('contests::contest self reviews'), 'url' => UOJContest::cur()->getUri('/self_reviews'), ]; } if (UOJContest::cur()->userCanManage(Auth::user())) { $tabs_info['backstage'] = [ 'name' => UOJLocale::get('contests::contest backstage'), 'url' => UOJContest::cur()->getUri('/backstage'), ]; } ?>

getTitle(['with' => 'letter', 'simplify' => true]) ?> getTitle(['with' => 'id']) ?>


UOJProblem::info('id') ], $orderby, [ 'judge_time_hidden' => '', 'problem_hidden' => true, 'table_name' => 'best_ac_submissions, submissions', 'problem' => UOJProblem::cur(), 'table_config' => [ 'div_classes' => ['table-responsive', 'mb-3'], 'table_classes' => ['table', 'mb-0', 'text-center'], ] ], Auth::user()); ?>