結果
問題 | No.1570 Blocks |
ユーザー |
![]() |
提出日時 | 2021-10-14 10:31:31 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 264 bytes |
コンパイル時間 | 351 ms |
コンパイル使用メモリ | 82,240 KB |
実行使用メモリ | 86,996 KB |
最終ジャッジ日時 | 2024-09-17 16:31:11 |
合計ジャッジ時間 | 11,609 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge6 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 44 WA * 1 |
ソースコード
n = int(input())total = 0AB = []for i in range(n):a, b = map(int, input().split())AB.append((a, b))total += aAB.sort(key=lambda x:(-x[1], -x[0]))for a, b in AB:if b < total-a:print('No')exit()total -= aprint('Yes')