結果
| 問題 |
No.2329 Nafmo、イカサマをする
|
| コンテスト | |
| ユーザー |
ntuda
|
| 提出日時 | 2023-06-10 12:51:13 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 429 bytes |
| コンパイル時間 | 364 ms |
| コンパイル使用メモリ | 82,124 KB |
| 実行使用メモリ | 442,340 KB |
| 最終ジャッジ日時 | 2025-01-02 18:40:51 |
| 合計ジャッジ時間 | 8,270 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 39 TLE * 1 |
ソースコード
N,M,K = map(int,input().split())
A = list(map(int,input().split())) + [0]
#N,M,K = 100,1000000000,6
#from random import randint
#A = [randint(1,1000000000) for _ in range(N)]
S = [0]
for i in range(K):
S2 = set()
for a in A:
for b in S:
d = a + b
if d <= M:
S2.add(d)
S = S2
#print(i,len(S))
ans = 0
for s in S:
if s <= M:
ans = max(ans,s)
print(ans)
ntuda