結果
| 問題 | No.1639 最小通信路 |
| コンテスト | |
| ユーザー |
ntuda
|
| 提出日時 | 2021-08-18 22:09:52 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 296 bytes |
| 記録 | |
| コンパイル時間 | 259 ms |
| コンパイル使用メモリ | 85,376 KB |
| 実行使用メモリ | 82,816 KB |
| 最終ジャッジ日時 | 2026-04-28 07:43:36 |
| 合計ジャッジ時間 | 4,135 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 37 WA * 6 |
ソースコード
N = int(input())
ABC = [list(map(int,input().split())) for _ in range(N*(N-1)//2)]
ABC.sort(key = lambda x:x[2])
ctd = set()
ans = 0
for abc in ABC:
a,b,c = abc
if a in ctd and b in ctd:
continue
else:
ans = max(ans,c)
ctd.add(a)
ctd.add(b)
print(ans)
ntuda