結果
| 問題 |
No.2492 Knapsack Problem?
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-10-25 23:44:21 |
| 言語 | Lua (LuaJit 2.1.1734355927) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 136 bytes |
| コンパイル時間 | 212 ms |
| コンパイル使用メモリ | 6,816 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-25 07:48:29 |
| 合計ジャッジ時間 | 954 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 |
ソースコード
n, w = io.read("*n", "*n")
c = -1
for i = 1, n do
a, b = io.read("*n", "*n")
if b <= w then
c = math.max(c, a)
end
end
print(c)