結果
問題 | No.2717 Sum of Subarray of Subsequence |
ユーザー |
![]() |
提出日時 | 2024-04-05 21:44:31 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 419 ms / 2,000 ms |
コード長 | 286 bytes |
コンパイル時間 | 245 ms |
コンパイル使用メモリ | 82,384 KB |
実行使用メモリ | 103,912 KB |
最終ジャッジ日時 | 2024-10-01 01:59:51 |
合計ジャッジ時間 | 7,004 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
mod = 998244353def f(l):res = pow(2,l,mod) + l * pow(2,l-1,mod)res %= modreturn resN = int(input())A = list(map(int,input().split()))ans = 0for l in range(N):r = N - 1 - lres = f(l) * f(r)res %= modres *= A[l]res %= modans += resans %= modprint(ans)