結果

問題 No.1325 Subsequence Score
ユーザー t33f
提出日時 2020-12-22 20:04:28
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 308 bytes
コンパイル時間 712 ms
コンパイル使用メモリ 66,304 KB
最終ジャッジ日時 2025-01-17 06:08:32
ジャッジサーバーID
(参考情報)
judge4 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 26 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
constexpr int M = 998244353;
int main() {
    int n; cin >> n;
    long long ans = 0;
    for (int i = 0; i < n; i++) {
        long long a; cin >> a;
        ans += (i + 2) * a % M;
    }
    for (int i = 2; i < n; i++) ans = ans * 2 % M;
    cout << ans << endl;
}
0