結果

問題 No.1299 Random Array Score
ユーザー yamakeyamake
提出日時 2020-11-27 21:47:50
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 81 ms / 2,000 ms
コード長 798 bytes
コンパイル時間 726 ms
コンパイル使用メモリ 77,096 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-10-01 05:17:35
合計ジャッジ時間 3,633 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 75 ms
4,380 KB
testcase_04 AC 72 ms
4,384 KB
testcase_05 AC 56 ms
4,376 KB
testcase_06 AC 50 ms
4,376 KB
testcase_07 AC 52 ms
4,376 KB
testcase_08 AC 72 ms
4,380 KB
testcase_09 AC 4 ms
4,376 KB
testcase_10 AC 29 ms
4,376 KB
testcase_11 AC 9 ms
4,380 KB
testcase_12 AC 48 ms
4,376 KB
testcase_13 AC 70 ms
4,380 KB
testcase_14 AC 49 ms
4,376 KB
testcase_15 AC 50 ms
4,376 KB
testcase_16 AC 50 ms
4,376 KB
testcase_17 AC 11 ms
4,380 KB
testcase_18 AC 33 ms
4,376 KB
testcase_19 AC 37 ms
4,376 KB
testcase_20 AC 20 ms
4,376 KB
testcase_21 AC 2 ms
4,380 KB
testcase_22 AC 12 ms
4,376 KB
testcase_23 AC 49 ms
4,376 KB
testcase_24 AC 55 ms
4,384 KB
testcase_25 AC 50 ms
4,376 KB
testcase_26 AC 3 ms
4,376 KB
testcase_27 AC 14 ms
4,376 KB
testcase_28 AC 10 ms
4,376 KB
testcase_29 AC 17 ms
4,376 KB
testcase_30 AC 47 ms
4,380 KB
testcase_31 AC 18 ms
4,380 KB
testcase_32 AC 69 ms
4,380 KB
testcase_33 AC 80 ms
4,376 KB
testcase_34 AC 29 ms
4,380 KB
testcase_35 AC 81 ms
4,376 KB
testcase_36 AC 29 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<queue>
#include<cstdio>
#include<cmath>
using namespace std;
#define rep(i,n) for(int i=0;i<n;++i)
#define rep1(i,n) for(int i=1;i<=n;++i)
#define ALL(x) x.begin(),x.end()
#define debug(output) cout<<#output<<"= "<<output<<endl
using lint=long long;
int MOD=998244353;

long long myPow(long long x, long long n, long long m){
        if(n == 0)
            return 1;
        if(n % 2 == 0)
            return myPow(x * x % m, n / 2, m);
        else
            return x * myPow(x, n - 1, m) % m;
    }

signed main(){
    lint n,k;cin>>n>>k;
    vector<int> a(n);
    rep(i,n)cin>>a[i];
    lint res=0;
    rep(i,n)res+=a[i];
    res%=MOD;
    res*=myPow(2,k,MOD);
    res%=MOD;
    cout<<res<<"\n";
    return 0;
}
0