結果
| 問題 |
No.1570 Blocks
|
| コンテスト | |
| ユーザー |
👑 Kazun
|
| 提出日時 | 2021-06-27 22:43:19 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 219 bytes |
| コンパイル時間 | 344 ms |
| コンパイル使用メモリ | 82,532 KB |
| 実行使用メモリ | 86,988 KB |
| 最終ジャッジ日時 | 2024-06-25 11:56:22 |
| 合計ジャッジ時間 | 14,600 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 44 WA * 1 |
ソースコード
N=int(input())
Block=[]
for _ in range(N):
a,b=map(int,input().split())
Block.append((a,b))
Block.sort(key=lambda t:t[::-1])
X=0
for a,b in Block:
if X>b:
exit(print("No"))
X+=a
print("Yes")
Kazun