結果
問題 | No.1817 Reversed Edges |
ユーザー |
|
提出日時 | 2022-01-21 21:45:56 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 207 bytes |
コンパイル時間 | 498 ms |
コンパイル使用メモリ | 82,436 KB |
実行使用メモリ | 90,604 KB |
最終ジャッジ日時 | 2024-11-25 23:24:40 |
合計ジャッジ時間 | 7,668 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 4 WA * 19 |
ソースコード
n = int(input())edges = [sorted(list(map(int, input().split())), reverse=True) for _ in range(n - 1)]edges.sort()cnt = [0] * nfor a, b in edges:a -= 1; b -= 1cnt[a] = cnt[b] + 1print(*cnt, sep="\n")