結果
| 問題 |
No.632 穴埋め門松列
|
| コンテスト | |
| ユーザー |
mondo
|
| 提出日時 | 2019-08-13 15:17:33 |
| 言語 | PHP (843.2) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 615 bytes |
| コンパイル時間 | 64 ms |
| コンパイル使用メモリ | 30,872 KB |
| 実行使用メモリ | 31,560 KB |
| 最終ジャッジ日時 | 2024-09-19 13:27:29 |
| 合計ジャッジ時間 | 787 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 6 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php
$line = explode(" ", trim(fgets(STDIN)));
$i = array_search("?", $line);
$line[$i] = 4;
if ($line[0] < $line[1] && $line[1] > $line[2]
&& count(array_unique($line)) == 3) {
$cnt++;
$ans = 4;
}
if ($line[0] > $line[1] && $line[1] < $line[2]
&& count(array_count_values($line)) == 3) {
$cnt++;
$ans = 4;
}
$line[$i] = 1;
if ($line[0] < $line[1] && $line[1] > $line[2]
&& count(array_unique($line)) == 3) {
$cnt++;
$ans = 1;
}
if ($line[0] > $line[1] && $line[1] < $line[2]
&& count(array_unique($line)) == 3) {
$cnt++;
$ans = 1;
}
echo $cnt == 1 ? $ans : "14";
mondo