結果
問題 |
No.806 木を道に
|
ユーザー |
![]() |
提出日時 | 2019-05-28 16:27:56 |
言語 | PHP (843.2) |
結果 |
WA
|
実行時間 | - |
コード長 | 557 bytes |
コンパイル時間 | 1,862 ms |
コンパイル使用メモリ | 32,016 KB |
実行使用メモリ | 32,912 KB |
最終ジャッジ日時 | 2024-09-17 15:43:53 |
合計ジャッジ時間 | 33,273 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | WA * 13 OLE * 14 |
コンパイルメッセージ
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;