結果

問題 No.1325 Subsequence Score
ユーザー jensen
提出日時 2021-01-03 22:11:13
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 390 bytes
コンパイル時間 89 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 66,144 KB
最終ジャッジ日時 2024-10-13 16:00:03
合計ジャッジ時間 3,958 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 TLE * 1
other -- * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import combinations
n=int(input())
a=list(map(int,input().split()))
point=0

def score(l):
    score=0
    for i in range(len(l)):
        score+=l[i]*(i+1)
    return score

for i in range(1,n+1):
    m=list(combinations(range(n),i))
    for j in m:
        p=[]
        for k in range(len(j)):
            p.append(a[j[k]])   
        point+=score(p)
print(point%998244353)
0