結果
| 問題 | No.1570 Blocks |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-03-21 21:19:52 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 257 ms / 2,000 ms |
| コード長 | 211 bytes |
| コンパイル時間 | 326 ms |
| コンパイル使用メモリ | 82,112 KB |
| 実行使用メモリ | 91,192 KB |
| 最終ジャッジ日時 | 2024-10-09 12:03:36 |
| 合計ジャッジ時間 | 11,756 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 45 |
ソースコード
n = int(input())
ab = [list(map(int, input().split())) for _ in range(n)]
ab.sort(key = lambda x:x[0] + x[1])
tot = 0
for a, b in ab:
if tot > b:
print("No")
exit()
tot += a
print("Yes")