結果
| 問題 | No.3057 Tree Distance Set |
| コンテスト | |
| ユーザー |
detteiuu
|
| 提出日時 | 2026-08-16 17:16:52 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 310 bytes |
| 記録 | |
| コンパイル時間 | 523 ms |
| コンパイル使用メモリ | 96,112 KB |
| 実行使用メモリ | 83,456 KB |
| 最終ジャッジ日時 | 2026-08-16 17:17:01 |
| 合計ジャッジ時間 | 7,032 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 20 |
ソースコード
K = int(input())
D = list(map(int, input().split()))
S = [0]
edge = []
for i in range(150):
edge.append((i, i+1, 1))
idx = 151
for d in D:
edge.append((d//2, idx, d//2))
S.append(idx)
idx += 1
print(len(edge))
for u, v, w in edge:
print(u+1, v+1, w)
print(len(S))
print(*[s+1 for s in S])
detteiuu