<?php /* @var Model_Problem $problem */ if (isset($cid)) { echo View::factory('contest/header', array('title' => $title, 'contest' => $contest, 'cid' => $cid)); } ?> <h1 class="page-title"><?php if (isset($cid)) { echo e::contest_pid($pid); } else { echo $problem['problem_id']; } ?> - <?php echo $problem['title']; ?> </h1> <div class="contest-info"> <p> <?php echo __('problem.show.time_limit'); ?> <span class="label label-warning"><?php echo $problem['time_limit']; echo __('problem.show.second'); ?> </span> <?php echo __('problem.show.memory_limit'); ?>
" method="POST"> <fieldset> <?php if ($cid) { ?> <input type="hidden" value="<?php echo $cid; ?> " name="cid"/> <input type="hidden" value="<?php echo $cpid; ?> " name="cpid"/> <div class="title-contest-problem"> <h3><?php echo __('problem.submit.problem_:cpid_of_:cid', array(':cpid' => e::contest_pid($cpid), ':cid' => $cid)); ?> </h3> </div> <?php } else { ?> <div class="form-group"> <label class="control-label col-sm-3" for="pid"><?php echo __('problem.submit.problem_id'); ?> </label> <div class="col-sm-9"> <input class="form-control" name="pid" value="<?php echo $pid; ?>
foreach (OJ::$result as $rt) { echo "<th>{$rt}</th>"; } ?> <th>TOTAL</th> </tr> </thead> <tbody> <?php $number_of_problem = $contest->number_of_problems(); for ($index = 0; $index < $number_of_problem; $index++) { $total = 0; ?> <tr> <td><?php echo e::contest_pid($index); ?> </td> <?php foreach (array_keys(OJ::$result) as $result_type) { ?> <td><?php if ($result[$index][$result_type]) { echo $result[$index][$result_type]; $total += $result[$index][$result_type]; } else { echo '-'; } ?> </td> <?php
public function display_order() { return e::contest_pid($this->num); }
/** * @dataProvider providerCPID */ public function test_contest_problem_id($pid, $expect) { $this->assertSame($expect, e::contest_pid($pid)); }