結果
問題 | No.2113 Distance Sequence 1.5 |
ユーザー |
|
提出日時 | 2024-09-24 21:45:36 |
言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 263 bytes |
コンパイル時間 | 2,005 ms |
コンパイル使用メモリ | 202,596 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-24 21:45:39 |
合計ジャッジ時間 | 2,860 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 11 WA * 10 |
ソースコード
#include<bits/stdc++.h>using namespace std;using ll=long long;#include<atcoder/modint>using mint=atcoder::modint998244353;int main(){ll N,M,K;cin>>N>>M>>K;cout<<(mint(M-K)*(mint(K).pow(2*N)-mint(K-1).pow(2*N))+mint(K).pow(2*N)).val()<<endl;}