結果
| 問題 |
No.1299 Random Array Score
|
| コンテスト | |
| ユーザー |
chacoder1
|
| 提出日時 | 2020-11-27 22:38:17 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 476 bytes |
| コンパイル時間 | 2,081 ms |
| コンパイル使用メモリ | 191,688 KB |
| 最終ジャッジ日時 | 2025-01-16 08:01:22 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 3 WA * 31 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int pow_mod(long long n,long long m,long long p){
if(p==0) return 1;
else if(p%2==1){
return pow_mod(n,m,p-1)*n%m;
}
else{
long long t=pow_mod(n,m,p/2);
return t*t%m;
}
}
int main(){
ll N,K;
cin>>N>>K;
ll A[N];
ll sum=0;
for(ll i=0;i<N;i++){
cin>>A[i];
sum+=A[i];
}
ll ans;
ans=sum*pow_mod(2,998244353,K);
ans%=998244353;
cout<<ans<<endl;
return 0;
}
chacoder1