結果

問題 No.1570 Blocks
ユーザー ygd.ygd.
提出日時 2021-06-29 18:14:38
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 349 bytes
コンパイル時間 303 ms
コンパイル使用メモリ 87,288 KB
実行使用メモリ 87,688 KB
最終ジャッジ日時 2023-09-08 03:16:42
合計ジャッジ時間 13,359 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,344 KB
testcase_01 AC 69 ms
71,484 KB
testcase_02 AC 183 ms
81,584 KB
testcase_03 AC 211 ms
82,300 KB
testcase_04 AC 172 ms
80,952 KB
testcase_05 AC 176 ms
80,920 KB
testcase_06 AC 178 ms
80,660 KB
testcase_07 AC 103 ms
77,796 KB
testcase_08 AC 207 ms
82,348 KB
testcase_09 AC 226 ms
82,648 KB
testcase_10 AC 199 ms
81,796 KB
testcase_11 AC 210 ms
82,300 KB
testcase_12 AC 232 ms
82,504 KB
testcase_13 AC 231 ms
83,336 KB
testcase_14 AC 252 ms
86,588 KB
testcase_15 AC 152 ms
80,288 KB
testcase_16 AC 244 ms
87,688 KB
testcase_17 AC 154 ms
80,572 KB
testcase_18 AC 204 ms
81,588 KB
testcase_19 AC 150 ms
80,776 KB
testcase_20 AC 149 ms
80,288 KB
testcase_21 AC 206 ms
84,124 KB
testcase_22 AC 70 ms
71,288 KB
testcase_23 AC 71 ms
71,456 KB
testcase_24 AC 69 ms
71,512 KB
testcase_25 AC 70 ms
71,336 KB
testcase_26 AC 74 ms
71,608 KB
testcase_27 AC 70 ms
71,324 KB
testcase_28 AC 69 ms
71,428 KB
testcase_29 AC 70 ms
71,452 KB
testcase_30 AC 68 ms
71,488 KB
testcase_31 AC 68 ms
71,560 KB
testcase_32 AC 230 ms
82,492 KB
testcase_33 AC 236 ms
82,756 KB
testcase_34 AC 223 ms
82,324 KB
testcase_35 AC 234 ms
82,608 KB
testcase_36 AC 228 ms
82,820 KB
testcase_37 AC 226 ms
82,688 KB
testcase_38 WA -
testcase_39 AC 252 ms
87,220 KB
testcase_40 AC 227 ms
82,880 KB
testcase_41 AC 238 ms
82,392 KB
testcase_42 AC 252 ms
84,852 KB
testcase_43 AC 253 ms
84,844 KB
testcase_44 AC 252 ms
84,848 KB
testcase_45 AC 253 ms
84,932 KB
testcase_46 AC 236 ms
82,556 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    N = int(input())
    Z = []
    for i in range(N):
        a,b = map(int,input().split())
        Z.append((a,b))
    Z.sort(key = lambda x: x[1])
    #print(Z)

    w = 0
    for i in range(N):
        a,b = Z[i]
        if w > b:
            print("No");exit()
        w += a
    print("Yes")

if __name__ == '__main__':
    main()
0