結果
| 問題 | No.1325 Subsequence Score |
| コンテスト | |
| ユーザー |
👑 Nachia
|
| 提出日時 | 2020-12-22 20:10:14 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 131 ms / 2,000 ms |
| コード長 | 349 bytes |
| 記録 | |
| コンパイル時間 | 1,076 ms |
| コンパイル使用メモリ | 211,444 KB |
| 実行使用メモリ | 7,680 KB |
| 最終ジャッジ日時 | 2026-06-16 04:50:40 |
| 合計ジャッジ時間 | 3,988 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using LL=long long;
using ULL=unsigned long long;
#define rep(i,n) for(int i=0; i<(n); i++)
const ULL M=998244353;
const int Z=500000;
int N;
ULL A[Z];
int main(){
cin>>N;
rep(i,N) cin>>A[i];
ULL a=0; rep(i,N) a+=(i+2)*A[i]%M; a%=M;
rep(i,N-1) a=a*2%M;
a=a*(M/2+1)%M;
cout<<a<<endl;
return 0;
}
Nachia