結果
| 問題 | No.806 木を道に |
| コンテスト | |
| ユーザー |
しのっち
|
| 提出日時 | 2019-05-28 15:16:00 |
| 言語 | PHP (843.2) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 571 bytes |
| 記録 | |
| コンパイル時間 | 1,739 ms |
| コンパイル使用メモリ | 32,268 KB |
| 実行使用メモリ | 38,160 KB |
| 最終ジャッジ日時 | 2024-09-17 15:42:24 |
| 合計ジャッジ時間 | 15,051 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 12 OLE * 9 -- * 6 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php
$apex = [];
$operation = 0;
$line = "";
while (!feof(STDIN)) {
$string = trim(fgets(STDIN));
if (strpos($string,' ') !== false){
$string_array = explode(" ", $string);
if (isset($string_array[ $value[0] ])) $string_array[ $value[0] ]++;
else $string_array[ $value[0] ] = 1;
if (isset($string_array[ $value[1] ])) $string_array[ $value[1] ]++;
else $string_array[ $value[1] ] = 1;
}
}
$side_num = array_count_values($apex);
while ($side_num[1] > 2) {
$operation++;
$side_num[1]--;
}
echo $operation;
しのっち