結果
問題 |
No.1817 Reversed Edges
|
ユーザー |
|
提出日時 | 2022-01-21 21:45:42 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 220 bytes |
コンパイル時間 | 639 ms |
コンパイル使用メモリ | 81,960 KB |
実行使用メモリ | 94,480 KB |
最終ジャッジ日時 | 2024-11-25 23:24:22 |
合計ジャッジ時間 | 8,172 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | WA * 23 |
ソースコード
n = int(input()) edges = [sorted(list(map(int, input().split())), reverse=True) for _ in range(n - 1)] edges.sort() print(edges) cnt = [0] * n for a, b in edges: a -= 1; b -= 1 cnt[a] = cnt[b] + 1 print(*cnt, sep="\n")