結果
問題 |
No.2393 Bit Grid Connected Component
|
ユーザー |
|
提出日時 | 2023-07-21 16:55:35 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 311 bytes |
コンパイル時間 | 2,573 ms |
コンパイル使用メモリ | 242,616 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-21 18:43:27 |
合計ジャッジ時間 | 4,239 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 14 WA * 6 |
ソースコード
#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 + (1 << y)) >> y) << y; for (long long i = 0; i < 62; i++) { if (t & (1LL << i)) { cout << (1LL << i) - 1 << '\n'; break; } } } }