<% if (problem.allowedEdit && !problem.is_public) { %>未公开<% } %>"; //echo "$MSG_PROBLEM".$row['problem_id']."--". $row['title'].""; //echo "

$id: ".$row['title']."

"; } else { $id = $row['problem_id']; //echo "$MSG_PROBLEM ".$PID[$pid].": ".$row['title']." "; echo "$MSG_PROBLEM " . $PID[$pid] . ": " . $row['title']; } if ($row['defunct'] == "Y") echo "$MSG_RESERVED"; ?>

MB S
$MSG_SUBMIT"; echo "$MSG_SUBMIT_RECORD"; echo "$MSG_STATISTICS"; if ($OJ_BBS) echo "$MSG_BBS"; } else { echo "$MSG_RETURN_CONTEST"; if ($contest_is_over) echo "$MSG_SUBMIT"; else echo "$MSG_SUBMIT"; echo "$MSG_GLOBAL$MSG_SUBMIT_RECORD"; echo "$MSG_THIS_CONTEST$MSG_SUBMIT_RECORD"; } if (!file_exists($OJ_DATA . "/" . $id . "/solution.name")) echo "$MSG_SHOW_OFF"; ?>
)'>
" . $s . ""; // 删除代码块里的html字符防止引起混乱 $s = preg_replace_callback('/(```.*?```|`[^`]*`)/s', function ($matches) { $ss = str_replace('
', '', $matches[0]); return $ss; }, $s); // 特殊转义 $s = str_replace("
", "\n", $s); // 把
中间的html字符转成原始字符
      $s = preg_replace_callback('/
(.*?)<\/pre>/s', function ($matches) {
        $content = $matches[1];
        $content = htmlspecialchars_decode($content, ENT_QUOTES);
        $content = str_replace("<", "<", $content);
        $content = str_replace(">", ">", $content);
        $content = str_replace("&", "&", $content);
        $content = str_replace(""", "\"", $content);
        $content = str_replace("'", "'", $content);
        return "
" . $content . "
"; }, $s); return $s; } ?>

Markdown原文
' . 
                  $row['description'] .
                '
'; } ?>

1 && count($inputChunks) === count($outputChunks)) { $pairs = array(); for ($index = 0; $index < count($inputChunks); $index++) { $pairs[] = array( 'input' => $inputChunks[$index], 'output' => $outputChunks[$index] ); } return $pairs; } } return array(); } function format_sample_code($text) { return htmlspecialchars(trim_sample_chunk($text), ENT_NOQUOTES, 'UTF-8'); } function format_sample_attr($text) { return htmlentities(trim_sample_chunk($text), ENT_QUOTES, 'UTF-8'); } $sampleInputText = normalize_sample_text($row['sample_input']); $sampleOutputText = normalize_sample_text($row['sample_output']); $samplePairs = build_sample_pairs($sampleInputText, $sampleOutputText); $showSampleIndex = count($samplePairs) > 1; $singleSampleInput = trim_sample_chunk($sampleInputText); $singleSampleOutput = trim_sample_chunk($sampleOutputText); ?> $samplePair) { ?>

$MSG_SUBMIT"; echo "$MSG_SUBMIT_RECORD"; echo "$MSG_STATISTICS"; if ($OJ_BBS) echo "$MSG_BBS"; } else { echo "$MSG_RETURN_CONTEST"; if ($contest_is_over) echo "$MSG_SUBMIT"; else echo "$MSG_SUBMIT"; echo "$MSG_SUBMIT_RECORD"; } if (!file_exists($OJ_DATA . "/" . $id . "/solution.name")) echo "$MSG_SHOW_OFF"; ?>