結果
問題 | No.2329 Nafmo、イカサマをする |
ユーザー |
![]() |
提出日時 | 2023-05-29 20:27:52 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 756 bytes |
コンパイル時間 | 489 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 378,880 KB |
最終ジャッジ日時 | 2024-12-28 10:17:25 |
合計ジャッジ時間 | 8,169 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 39 TLE * 1 |
ソースコード
#MMA Contest 015 H ''' ここからAfterContest。 持ち点0。カードを上限K枚まで引く。バーストはM点超え。 引くならN枚から1枚を選び、得点に加算し、「カードを戻す」 Nは小さいしさ、愚直にシミュレーション、あ、だめですか。だめじゃないですね、やります。 2ケースTLE。たった2ケース・・・ ''' f=lambda:list(map(int,input().split())) N,M,K=f(); A=f(); candidate=set([0]); ans=0 for k in range(K): score=set(); hantei=False for now in candidate: for next in A: if now+next<=M: score.add(now+next); hantei=True if now+next>ans: ans=now+next candidate=score if not hantei: break print(ans)