結果
| 問題 | No.806 木を道に |
| コンテスト | |
| ユーザー |
しのっち
|
| 提出日時 | 2019-05-28 16:27:56 |
| 言語 | PHP (8.5.4) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 557 bytes |
| 記録 | |
| コンパイル時間 | 171 ms |
| コンパイル使用メモリ | 36,656 KB |
| 実行使用メモリ | 37,036 KB |
| 最終ジャッジ日時 | 2026-04-06 08:44:47 |
| 合計ジャッジ時間 | 33,000 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 10 OLE * 17 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php
$apex = [];
$operation = 0;
$node = trim(fgets(STDIN));
for ($i = 0; $i < $node; ++$i) {
$string_array = explode(" ", trim(fgets(STDIN)));
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;
しのっち