結果
問題 |
No.3046 White Tiger vs Monster
|
ユーザー |
|
提出日時 | 2025-03-22 01:07:13 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 511 bytes |
コンパイル時間 | 3,821 ms |
コンパイル使用メモリ | 279,980 KB |
実行使用メモリ | 7,328 KB |
最終ジャッジ日時 | 2025-03-22 22:32:33 |
合計ジャッジ時間 | 12,228 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 60 WA * 20 |
ソースコード
#include<bits/stdc++.h> using namespace std; typedef unsigned long long ull; int main(){ int n; ull a[200000],b; cin>>n>>b; for(int i=0;i<n;i++) cin>>a[i]; sort(a,a+n); int d=bit_width(b)-1; vector<ull>ltd,eqd; for(int i=0;i<n;i++){ int tmp=bit_width(a[i])-1; if(tmp<d) ltd.push_back(a[i]); if(tmp==d) eqd.push_back(a[i]); } for(int i=0;i<ltd.size();i++) b^=ltd[i]; if(eqd.empty()){ cout<<ltd.size()<<endl; return 0; } if(b>=eqd[0]){ cout<<ltd.size()+1<<endl; return 0; } }