結果
問題 |
No.3046 White Tiger vs Monster
|
ユーザー |
|
提出日時 | 2025-03-21 02:25:46 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 582 bytes |
コンパイル時間 | 3,286 ms |
コンパイル使用メモリ | 276,472 KB |
実行使用メモリ | 7,328 KB |
最終ジャッジ日時 | 2025-03-22 22:32:06 |
合計ジャッジ時間 | 11,225 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 70 WA * 10 |
ソースコード
#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]; 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]); } bool G[59][59]; for(int i=0;i<d;i++) for(int j=0;j<d;j++) G[i][j]=i==j; for(int i=0;i<ltd.size();i++){ b^=ltd[i]; int tmp=bit_width(ltd[i])-1; for(int j=0;j<tmp;j++) if(~ltd[i]>>j&1) G[j][tmp]=1; } cout<<ltd.size()+1<<endl; }