結果
問題 | No.1570 Blocks |
ユーザー |
|
提出日時 | 2021-12-23 19:25:01 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 349 bytes |
コンパイル時間 | 85 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 29,584 KB |
最終ジャッジ日時 | 2024-09-17 17:57:31 |
合計ジャッジ時間 | 15,374 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 44 WA * 1 |
ソースコード
N = int(input())l = []for _ in range(N):a,b = map(int,input().split())l.append((b,a))l.sort(reverse = True)Sum = [0] * NSum[0] = l[-1][1]for i in range(1,N):Sum[i] = Sum[i-1] + l[-1-i][1]Sum.insert(0,0)import sysfor i in range(N):b = l[i][0]if b < Sum[-2-i]:print('No')exit()print('Yes')