結果
問題 | No.2393 Bit Grid Connected Component |
ユーザー |
![]() |
提出日時 | 2023-07-28 21:22:28 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 209 ms / 2,000 ms |
コード長 | 269 bytes |
コンパイル時間 | 1,640 ms |
コンパイル使用メモリ | 166,280 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-06 17:20:35 |
合計ジャッジ時間 | 3,102 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 20 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ int T; cin >> T; for (int i = 0; i < T; i++){ long long x; int y; cin >> x >> y; while ((x >> (y + 1) & 1) == 1){ y++; } cout << ((long long) 1 << (y + 1)) - 1 << endl; } }