xxx

 
#include
#include
#include
#define zhi 1999993
#define inf 2000000
using namespace std;
struct zhangzijian
{
    int wo,pre,bug,pt;
}miao,h[inf];
int pt[100][2],num,data[100],n,m;
bool done[inf],*p;
int answer[100],ans,ans_hash,hash;
int bint(int n)
{
    n&=0xffffffff;
    n=(n&0x55555555)+((n>>1)&0x55555555);
    n=(n&0x33333333)+((n>>2)&0x33333333);
    n=(n&0x0f0f0f0f)+((n>>4)&0x0f0f0f0f);
    n=(n&0x00ff00ff)+((n>>8)&0x00ff00ff);
    n=(n&0x0000ffff)+((n>>16)&0x0000ffff);
    return n;
}
int getnums(int s[])
{
    char c;
    int num = 0,pos=0;
    while(1){
        num=0;
        while(c=getchar())
            if(c<='9'&&c>='0' && c!='\n') break;
        while(c<='9'&&c>='0'){
            num=num*10+c-'0';
            c = getchar();
        }
        s[++pos]=num;
        if(c=='\n') break;
    }
    return pos;
}
int pd0()
{
    int ret=0xffffffff;
    for(int i=1;i<=num;i++)
        ret^=1<<(data[i]-1);
    return ret;
}
int pd1()
{
    int ret=0x00000000;
    for(int i=1;i<=num;i++)
        ret|=1<<(data[i]-1);
    return ret;
}
void sou(int hash)
{
    int i=0,j;
    while (h[hash].pt){
        answer[i]=h[hash].pt^h[h[hash].pre].pt;
        j=0;
        while (answer[i]){
           answer[i]>>=1;
           j++;
        }
        answer[i++]=j;
        hash=h[hash].pre;
    }
}
int main()
{
    freopen("in","r",stdin);
    freopen("out","w",stdout);
    scanf("%d%d",&n,&m);
    getchar();
    ans=num=getnums(data);
    queue q;
    h[pd1()%zhi].bug=pd1();
    q.push(pd1()%zhi);
    for(int i=1;i<=n;i++){
        num=getnums(data);
        pt[i][0]=pd0();
        num=getnums(data);
        pt[i][1]=pd1();
    }
    while(!q.empty()){
        int now=q.front();
        q.pop();
        int i=-1;
        while(i>i)&1)continue;
            patch|=1<0;i--) if(answer[i])
        printf("%d ",answer[i]);
    printf("%d\n",answer[0]);
    return 0;
}

你可能感兴趣的:(学习笔记,patch,c,n2)