結果
問題 |
No.2105 Avoid MeX
|
ユーザー |
![]() |
提出日時 | 2022-10-21 23:35:51 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 438 bytes |
コンパイル時間 | 3,017 ms |
コンパイル使用メモリ | 245,936 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-01 07:45:57 |
合計ジャッジ時間 | 5,550 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 RE * 3 |
other | AC * 7 RE * 12 |
ソースコード
#include <bits/stdc++.h> #include <atcoder/modint> using Fp = atcoder::modint998244353; void solve(std::istream& is, std::ostream& os) { int C, X; is >> C >> X; if (X == 0) { os << Fp(C + 1).inv().val() << '\n'; } else if (X <= C) { os << (1 - Fp(X + 1).inv()).val() << '\n'; } else { std::abort(); } } int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); solve(std::cin, std::cout); }