結果
| 問題 |
No.3046 White Tiger vs Monster
|
| ユーザー |
|
| 提出日時 | 2025-03-21 02:28:19 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 580 bytes |
| コンパイル時間 | 3,328 ms |
| コンパイル使用メモリ | 278,108 KB |
| 実行使用メモリ | 7,328 KB |
| 最終ジャッジ日時 | 2025-03-22 22:32:17 |
| 合計ジャッジ時間 | 11,236 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 10 WA * 70 |
ソースコード
#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()<<endl;
}