結果
| 問題 |
No.1299 Random Array Score
|
| コンテスト | |
| ユーザー |
iomir
|
| 提出日時 | 2023-04-02 00:49:01 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 609 bytes |
| コンパイル時間 | 1,582 ms |
| コンパイル使用メモリ | 169,440 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-24 14:31:57 |
| 合計ジャッジ時間 | 4,417 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 3 WA * 31 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
#define all(v) v.begin(),v.end()
using ll = long long;
using ull = unsigned long long;
using vll=vector<ll>;
using vvll = vector<vector<ll>>;
const ll INF=1ll<<60;
using vp=vector<pair<ll, ll>>;
ll mod=998244353;
ll powmod(ll x,ll n,ll m){
ll res=1;
while(n>0){
if(n&1) res*=x;
x*=x;
res%=m;
x%=m;
n>>=1;
}
return res;
}
int main(){
ll N,K;
cin>>N>>K;
vll A(N);
ll sum=0;
for(int i=0;i<N;i++){
cin>>A[i];
sum+=A[i];
}
cout << sum*powmod(2,K,mod)%mod << endl;
}
iomir