結果

問題 No.3090 Knapsack Function
ユーザー hir355hir355
提出日時 2022-04-01 21:59:21
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 271 bytes
コンパイル時間 132 ms
コンパイル使用メモリ 82,360 KB
実行使用メモリ 79,668 KB
最終ジャッジ日時 2024-04-30 13:58:35
合計ジャッジ時間 2,310 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 AC 34 ms
52,496 KB
testcase_03 RE -
testcase_04 RE -
testcase_05 AC 32 ms
51,940 KB
testcase_06 AC 34 ms
52,956 KB
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 AC 39 ms
52,544 KB
testcase_11 RE -
testcase_12 AC 34 ms
52,572 KB
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 AC 101 ms
77,800 KB
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
ma = 0
v = [0] * n
w = [0] * n
for i in range(n):
    v[i], w[i] = map(int, input().split())
for i in range(n):
    if w[i] == 1:
        ma = max(ma, v)
for i in range(n):
    if ma * w[i] < v[i]:
        print('No')
        break
else:
    print('Yes')
0