結果
| 問題 | No.2132 1 or X Game |
| コンテスト | |
| ユーザー |
ぷら
|
| 提出日時 | 2022-11-07 01:47:09 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 510 bytes |
| 記録 | |
| コンパイル時間 | 2,016 ms |
| コンパイル使用メモリ | 191,836 KB |
| 最終ジャッジ日時 | 2025-02-08 19:06:54 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | WA * 11 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
constexpr int mod = 998244353;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int t;
cin >> t;
while(t--) {
long long n,x;
cin >> n >> x;
if(x%2 == 1) {
cout << (n+1)/2%mod << "\n";
}
else {
if(n < x) {
cout << (n+1)/2%mod << "\n";
}
else {
cout << (x/2+(n-x)/2+1)%mod << "\n";
}
}
}
}
ぷら