結果

問題 No.412 花火大会
ユーザー ntuda
提出日時 2025-08-09 12:36:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 36 ms / 2,000 ms
コード長 407 bytes
コンパイル時間 273 ms
コンパイル使用メモリ 82,688 KB
実行使用メモリ 60,820 KB
最終ジャッジ日時 2025-08-09 12:36:58
合計ジャッジ時間 2,113 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

from bisect import bisect_left
BCD = list(map(int,input().split()))
N = int(input())
E = list(map(int,input().split()))
E.sort()
BCD.sort()
B,C,D = BCD
b = bisect_left(E,B)
if B == C:
    c = b + 1
else:
    c = bisect_left(E,C)
if C == D:
    d = c + 1
else:
    d = bisect_left(E,D)
ans = 0
for i in range(d,N):
    for j in range(c,i):
        for k in range(b,j):
            ans += pow(2,k)
print(ans)
0