結果

問題 No.1325 Subsequence Score
ユーザー 👑 NachiaNachia
提出日時 2020-12-22 20:10:14
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 207 ms / 2,000 ms
コード長 349 bytes
コンパイル時間 4,686 ms
コンパイル使用メモリ 199,980 KB
実行使用メモリ 7,476 KB
最終ジャッジ日時 2023-10-21 13:02:50
合計ジャッジ時間 6,159 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 3 ms
4,348 KB
testcase_06 AC 3 ms
4,348 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 2 ms
4,348 KB
testcase_09 AC 2 ms
4,348 KB
testcase_10 AC 2 ms
4,348 KB
testcase_11 AC 2 ms
4,348 KB
testcase_12 AC 2 ms
4,348 KB
testcase_13 AC 202 ms
7,420 KB
testcase_14 AC 58 ms
6,292 KB
testcase_15 AC 170 ms
6,800 KB
testcase_16 AC 192 ms
7,228 KB
testcase_17 AC 86 ms
6,292 KB
testcase_18 AC 51 ms
6,292 KB
testcase_19 AC 205 ms
7,468 KB
testcase_20 AC 28 ms
4,348 KB
testcase_21 AC 71 ms
6,292 KB
testcase_22 AC 88 ms
6,292 KB
testcase_23 AC 207 ms
7,476 KB
testcase_24 AC 204 ms
7,476 KB
testcase_25 AC 205 ms
7,476 KB
testcase_26 AC 204 ms
7,476 KB
testcase_27 AC 205 ms
7,476 KB
testcase_28 AC 3 ms
4,348 KB
testcase_29 AC 2 ms
4,348 KB
testcase_30 AC 2 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
}
0