結果

問題 No.3090 Knapsack Function
ユーザー nasutarou1341nasutarou1341
提出日時 2022-04-01 21:49:24
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 305 bytes
コンパイル時間 240 ms
コンパイル使用メモリ 82,576 KB
実行使用メモリ 87,832 KB
最終ジャッジ日時 2024-04-30 13:43:00
合計ジャッジ時間 3,953 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
52,692 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 39 ms
53,740 KB
testcase_05 AC 40 ms
52,344 KB
testcase_06 WA -
testcase_07 AC 41 ms
53,036 KB
testcase_08 AC 43 ms
53,864 KB
testcase_09 WA -
testcase_10 AC 41 ms
53,348 KB
testcase_11 AC 42 ms
53,204 KB
testcase_12 AC 41 ms
53,044 KB
testcase_13 AC 43 ms
53,144 KB
testcase_14 AC 42 ms
54,104 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 420 ms
87,688 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
uw = [list(map(int, input().split())) for _ in range(N)]

uw.sort()
if uw[0][0] == 1:
  print("Yes")
  exit()

if uw[0][0] != 2:
  print("No")
  exit()

print("No")
exit()
w2 = []
w3 = []

for u, w in uw:
  if u == 2:
    w2.append(w)
  elif u == 3:
    w3.append(w)

w2.sort()
w3.sort()
0