結果
問題 | No.2393 Bit Grid Connected Component |
ユーザー |
|
提出日時 | 2023-07-28 22:03:54 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 203 ms / 2,000 ms |
コード長 | 441 bytes |
コンパイル時間 | 1,596 ms |
コンパイル使用メモリ | 192,788 KB |
最終ジャッジ日時 | 2025-02-15 20:26:43 |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 20 |
ソースコード
#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 & (1ll << (y + 1))) { ++y; } else { break; } } std::cout << (1ll << (y + 1)) - 1 << std::endl; } }