結果
問題 | No.2393 Bit Grid Connected Component |
ユーザー |
![]() |
提出日時 | 2023-07-28 21:35:51 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 205 ms / 2,000 ms |
コード長 | 287 bytes |
コンパイル時間 | 500 ms |
コンパイル使用メモリ | 67,664 KB |
最終ジャッジ日時 | 2025-02-15 20:07:46 |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 20 |
ソースコード
#include<iostream> using namespace std; void solve(){ long long x, y; cin >> x >> y; long long t=1LL<<y; for(int i=y+1;i<63;++i){ if((x>>i&1)==0){ t = 1LL << i; break; } } cout<<t-1<<endl; return; } int main(){ int t; cin >> t; while(t--) solve(); return 0; }