結果
問題 |
No.2393 Bit Grid Connected Component
|
ユーザー |
|
提出日時 | 2023-07-21 16:58:13 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 221 ms / 2,000 ms |
コード長 | 313 bytes |
コンパイル時間 | 2,629 ms |
コンパイル使用メモリ | 242,640 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-21 18:45:41 |
合計ジャッジ時間 | 4,352 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 20 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int T; long long x, y; cin >> T; for (int _ = 0; _ < T; _++) { cin >> x >> y; long long t = ((x + (1LL << y)) >> y) << y; for (long long i = 0; i < 62; i++) { if (t & (1LL << i)) { cout << (1LL << i) - 1 << '\n'; break; } } } }