結果
問題 | No.617 Nafmo、買い出しに行く |
ユーザー | nebukuro09 |
提出日時 | 2017-12-18 13:04:48 |
言語 | Bash (Bash 5.1.16) |
結果 |
TLE
|
実行時間 | - |
コード長 | 350 bytes |
コンパイル時間 | 261 ms |
コンパイル使用メモリ | 5,344 KB |
実行使用メモリ | 8,764 KB |
最終ジャッジ日時 | 2023-08-22 05:23:48 |
合計ジャッジ時間 | 5,125 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 7 ms
7,512 KB |
testcase_01 | AC | 7 ms
8,764 KB |
testcase_02 | AC | 13 ms
4,380 KB |
testcase_03 | AC | 306 ms
4,376 KB |
testcase_04 | AC | 7 ms
4,376 KB |
testcase_05 | AC | 635 ms
4,380 KB |
testcase_06 | TLE | - |
testcase_07 | -- | - |
testcase_08 | -- | - |
testcase_09 | -- | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
ソースコード
tr '\n' ' ' | gawk '{ n = $1 k = $2 ans = 0 for (mask = 0; mask < lshift(1, n); mask++) { tmp = 0 for (i = 0; i < n; i++) { if (and(mask, lshift(1, i))) { tmp = tmp + $(i+3) } } if (tmp <= k && tmp > ans) { ans = tmp } } print(ans) }'