結果
| 問題 |
No.2113 Distance Sequence 1.5
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-10-29 14:48:01 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 395 bytes |
| コンパイル時間 | 1,427 ms |
| コンパイル使用メモリ | 167,780 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-06 13:30:40 |
| 合計ジャッジ時間 | 2,187 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 11 WA * 10 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/modint>
using namespace std;
using namespace atcoder;
using mint = modint998244353;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
long long n, m, k; cin >> n >> m >> k; n *= 2;
if (m < k) {
cout << 0;
} else {
cout << ((m - k + 1) * mint(k).pow(n) - (m - k) * mint(k - 1).pow(n)).val();
}
}