結果
| 問題 |
No.2393 Bit Grid Connected Component
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-07-28 22:03:26 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 437 bytes |
| コンパイル時間 | 1,623 ms |
| コンパイル使用メモリ | 193,384 KB |
| 最終ジャッジ日時 | 2025-02-15 20:26:16 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 13 WA * 3 TLE * 1 -- * 3 |
ソースコード
#include <bits/stdc++.h>
// #include "atcoder/modint"
using i64 = long long;
// using Fp = atcoder::modint998244353;
int main() {
int T;
std::cin >> T;
while (T--) {
i64 x, y;
std::cin >> x >> y;
while (true) {
if (x & (1 << (y + 1))) {
++y;
} else {
break;
}
}
std::cout << (1 << (y + 1)) - 1 << std::endl;
}
}