結果
| 問題 | No.617 Nafmo、買い出しに行く |
| コンテスト | |
| ユーザー |
senden_lite
|
| 提出日時 | 2017-12-27 12:34:30 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 429 bytes |
| 記録 | |
| コンパイル時間 | 122 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 63,124 KB |
| 最終ジャッジ日時 | 2024-12-21 07:43:23 |
| 合計ジャッジ時間 | 30,231 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 11 TLE * 9 |
ソースコード
i = input().split()
N = int(i[0])
K = int(i[1])
a =[0]*N
for i in range(N):
a[i] = int(input())
b = [True] + [False]*K
for i in range(N):
n = a[i]
for j in range(len(b)):
if b[-(j+1)] != False:
index = len(b)-j-1
if n + index <= K and b[n+index] == False:
b[n+index] = True
for i in range(len(b)):
if b[-(i+1)] != False:
print(len(b)-i-1)
break
senden_lite