結果
| 問題 | No.2957 Combo Deck Builder |
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2024-10-30 19:03:15 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 455 ms / 1,000 ms |
| コード長 | 292 bytes |
| 記録 | |
| コンパイル時間 | 298 ms |
| コンパイル使用メモリ | 85,504 KB |
| 実行使用メモリ | 110,040 KB |
| 最終ジャッジ日時 | 2026-05-06 00:14:15 |
| 合計ジャッジ時間 | 13,542 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 38 |
ソースコード
R=range J=lambda:map(int,input().split()) N,*_=J() A=[[[]for i in R(N+1)]for s in R(2)] a=0 for _ in R(N): C,X,Y=J() if X<Y:a+=X;A[0][N-C]+=[X-Y] else:a+=Y;A[1][C]+=[Y-X] import heapq for t in A: s=[] for c in R(N): for x in t[c]:heapq.heappush(s,x) if s:a-=heapq.heappop(s) print(a)