結果
問題 |
No.2329 Nafmo、イカサマをする
|
ユーザー |
![]() |
提出日時 | 2023-05-28 15:05:42 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 491 bytes |
コンパイル時間 | 467 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 108,544 KB |
最終ジャッジ日時 | 2024-12-27 04:34:00 |
合計ジャッジ時間 | 6,438 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 14 WA * 26 |
ソースコード
from collections import deque import bisect import heapq n,m,k = map(int, input().split()) n+=1 a = list(map(int, input().split())) a.append(0) sum3 = set() for i1 in range(n): now1 = a[i1] for i2 in range(n): now2 = now1+a[i2] for i3 in range(n): sum3.add(now2+a[i3]) sum3 = list(sum3) sum3.sort() bisect.bisect(a,55) ans = 0 for a in sum3: b = m-a i = bisect.bisect(sum3,b)-1 now = a+sum3[i] if(now<=m): ans = max(ans, now) print(ans)