結果

問題 No.2329 Nafmo、イカサマをする
ユーザー pありpあり
提出日時 2023-05-28 15:05:42
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 491 bytes
コンパイル時間 263 ms
コンパイル使用メモリ 87,316 KB
実行使用メモリ 110,496 KB
最終ジャッジ日時 2023-08-27 11:24:05
合計ジャッジ時間 7,317 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 94 ms
71,588 KB
testcase_01 AC 100 ms
76,772 KB
testcase_02 AC 96 ms
71,492 KB
testcase_03 WA -
testcase_04 AC 95 ms
71,612 KB
testcase_05 AC 95 ms
71,360 KB
testcase_06 AC 94 ms
71,468 KB
testcase_07 AC 92 ms
71,424 KB
testcase_08 AC 110 ms
77,568 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 101 ms
76,640 KB
testcase_17 WA -
testcase_18 AC 108 ms
77,812 KB
testcase_19 WA -
testcase_20 AC 114 ms
77,732 KB
testcase_21 AC 133 ms
83,364 KB
testcase_22 AC 111 ms
77,860 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 118 ms
77,880 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 100 ms
77,112 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 AC 181 ms
91,872 KB
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 AC 230 ms
109,360 KB
testcase_42 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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)
  
  
0