# [Vijos1693] Miku_Nobody

2 1
0 1
2

1

Vijos 1693

## 代码 Code

``````#include <stdio.h>
#include <iostream>
#include <cstring>
#include <algorithm>
#include <cmath>
using namespace std;
const int inf=0x7fffffff/27.11;
const int maxn=405;
int i,j,t,n,m,l,r,k,z,y,x;
struct edge
{
int to,nx,vl;
}e[maxn*maxn];
bool used[maxn];
int a[maxn],b[maxn];
int cnt=0,ans=0;
inline void ins(int u,int v)
{
}
bool crosspath(int s)
{
int i,j,t,u,v,w;
{
v=e[i].to;
if (!used[v])
{
used[v]=true;
if (!match[v] || crosspath(match[v]))
{
match[v]=s;
return true;
}
}
}
return false;
}
inline void hungary()
{
int i,j,t;
for (i=1;i<=n;i++)
{
memset(used,false,sizeof(used));
if (crosspath(i)) ans++;
}
}
inline bool can(int a,int b)
{
int i,j,t;
t=a^b;
while (t>0)
{
if ((t&1)==0) return false;
t>>=1;
}
return true;
}
int main()
{
memset(match,0,sizeof(match));
scanf("%d%d",&n,&m);
for (i=1;i<=n;i++) scanf("%d",&a[i]);
for (i=1;i<=m;i++) scanf("%d",&a[n+i]);
for (i=1;i<=n;i++) for (j=1;j<=m;j++) if (can(a[i],a[n+j])) ins(i,n+j);
hungary();
if (ans==0) printf("I want nobody nobody but you\n");
else printf("%d\n",ans);
return 0;
}``````