Language: C++

a[999],b[999],c[999],d[999],p[333],i,j,x,y,z;main(){for(;scanf("%d%d%d",a,b,c)&&(*a+=*b+*c);){for(i=332;i;p[i--]=2);for(i=0,scanf("%d",p);i++<*p;scanf("%d%d%d%d",a+i,b+i,c+i,d+i));for(i=0;i++<*p;)for(j=0;j++<*p;d[j]?p[a[j]]=p[b[j]]=p[c[j]]=1:(x=p[a[j]]&1)&(y=p[b[j]]&1)?p[c[j]]=0:x&(z=p[c[j]])?p[b[j]]=0:y&z?p[a[j]]=0:0);for(i=0;i<*a;printf("%d\n",p[++i]));}exit(0);}

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a[999],b[999],c[999],d[999],p[333],i,j,x,y,z;main(){for(;scanf("%d%d%d",a,b,c)&&(*a+=*b+*c);){for(i=332;i;p[i--]=2);for(i=0,scanf("%d",p);i++<*p;scanf("%d%d%d%d",a+i,b+i,c+i,d+i));for(i=0;i++<*p;)for(j=0;j++<*p;d[j]?p[a[j]]=p[b[j]]=p[c[j]]=1:(x=p[a[j]]&1)&(y=p[b[j]]&1)?p[c[j]]=0:x&(z=p[c[j]])?p[b[j]]=0:y&z?p[a[j]]=0:0);for(i=0;i<*a;printf("%d\n",p[++i]));}exit(0);}
      | ^
a.cc:1:46: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    1 | a[999],b[999],c[999],d[999],p[333],i,j,x,y,z;main(){for(;scanf("%d%d%d",a,b,c)&&(*a+=*b+*c);){for(i=332;i;p[i--]=2);for(i=0,scanf("%d",p);i++<*p;scanf("%d%d%d%d",a+i,b+i,c+i,d+i));for(i=0;i++<*p;)for(j=0;j++<*p;d[j]?p[a[j]]=p[b[j]]=p[c[j]]=1:(x=p[a[j]]&1)&(y=p[b[j]]&1)?p[c[j]]=0:x&(z=p[c[j]])?p[b[j]]=0:y&z?p[a[j]]=0:0);for(i=0;i<*a;printf("%d\n",p[++i]));}exit(0);}
      |                                              ^~~~
a.cc: In function 'int main()':
a.cc:1:73: error: 'a' was not declared in this scope
    1 | a[999],b[999],c[999],d[999],p[333],i,j,x,y,z;main(){for(;scanf("%d%d%d",a,b,c)&&(*a+=*b+*c);){for(i=332;i;p[i--]=2);for(i=0,scanf("%d",p);i++<*p;scanf("%d%d%d%d",a+i,b+i,c+i,d+i));for(i=0;i++<*p;)for(j=0;j++<*p;d[j]?p[a[j]]=p[b[j]]=p[c[j]]=1:(x=p[a[j]]&1)&(y=p[b[j]]&1)?p[c[j]]=0:x&(z=p[c[j]])?p[b[j]]=0:y&z?p[a[j]]=0:0);for(i=0;i<*a;printf("%d\n",p[++i]));}exit(0);}
      |                                                                         ^
a.cc:1:75: error: 'b' was not declared in this scope
    1 | a[999],b[999],c[999],d[999],p[333],i,j,x,y,z;main(){for(;scanf("%d%d%d",a,b,c)&&(*a+=*b+*c);){for(i=332;i;p[i--]=2);for(i=0,scanf("%d",p);i++<*p;scanf("%d%d%d%d",a+i,b+i,c+i,d+i));for(i=0;i++<*p;)for(j=0;j++<*p;d[j]?p[a[j]]=p[b[j]]=p[c[j]]=1:(x=p[a[j]]&1)&(y=p[b[j]]&1)?p[c[j]]=0:x&(z=p[c[j]])?p[b[j]]=0:y&z?p[a[j]]=0:0);for(i=0;i<*a;printf("%d\n",p[++i]));}exit(0);}
      |                                                                           ^
a.cc:1:77: error: 'c' was not declared in this scope
    1 | a[999],b[999],c[999],d[999],p[333],i,j,x,y,z;main(){for(;scanf("%d%d%d",a,b,c)&&(*a+=*b+*c);){for(i=332;i;p[i--]=2);for(i=0,scanf("%d",p);i++<*p;scanf("%d%d%d%d",a+i,b+i,c+i,d+i));for(i=0;i++<*p;)for(j=0;j++<*p;d[j]?p[a[j]]=p[b[j]]=p[c[j]]=1:(x=p[a[j]]&1)&(y=p[b[j]]&1)?p[c[j]]=0:x&(z=p[c[j]])?p[b[j]]=0:y&z?p[a[j]]=0:0);for(i=0;i<*a;printf("%d\n",p[++i]));}exit(0);}
      |                                                                             ^
a.cc:1:58: error: 'scanf' was not declared in this scope
    1 | a[999],b[999],c[999],d[999],p[333],i,j,x,y,z;main(){for(;scanf("%d%d%d",a,b,c)&&(*a+=*b+*c);){for(i=332;i;p[i--]=2);for(i=0,scanf("%d",p);i++<*p;scanf("%d%d%d%d",a+i,b+i,c+i,d+i));for(i=0;i++<*p;)for(j=0;j++<*p;d[j]?p[a[j]]=p[b[j]]=p[c[j]]=1:(x=p[a[j]]&1)&(y=p[b[j]]&1)?p[c[j]]=0:x&(z=p[c[j]])?p[b[j]]=0:y&z?p[a[j]]=0:0);for(i=0;i<*a;printf("%d\n",p[++i]));}exit(0);}
      |                                                          ^~~~~
a.cc:1:99: error: 'i' was not declared in this scope
    1 | a[999],b[999],c[999],d[999],p[333],i,j,x,y,z;main(){for(;scanf("%d%d%d",a,b,c)&&(*a+=*b+*c);){for(i=332;i;p[i--]=2);for(i=0,scanf("%d",p);i++<*p;scanf("%d%d%d%d",a+i,b+i,c+i,d+i));for(i=0;i++<*p;)for(j=0;j++<*p;d[j]?p[a[j]]=p[b[j]]=p[c[j]]=1:(x=p[a[j]]&1)&(y=p[b[j]]&1)?p[c[j]]=0:x&(z=p[c[j]])?p[b[j]]=0:y&z?p[a[j]]=0:0);for(i=0;i<*a;printf("%d\n",p[++i]));}exit(0);}
      |                                                                                                   ^
a.cc:1:107: error: 'p' was not declared in this scope
    1 | a[999],b[999],c[999],d[999],p[333],i,j,x,y,z;main(){for(;scanf("%d%d%d",a,b,c)&&(*a+=*b+*c);){for(i=332;i;p[i--]=2);for(i=0,scanf("%d",p);i++<*p;scanf("%d%d%d%d",a+i,b+i,c+i,d+i));for(i=0;i++<*p;)for(j=0;j++<*p;d[j]?p[a[j]]=p[b[j]]=p[c[j]]=1:(x=p[a[j]]&1)&(y=p[b[j]]&1)?p[c[j]]=0:x&(z=p[c[j]])?p[b[j]]=0:y&z?p[a[j]]=0:0);for(i=0;i<*a;printf("%d\n",p[++i]));}exit(0);}
      |                                                                                                           ^
a.cc:1:121: error: 'i' was not declared in this scope
    1 | a[999],b[999],c[999],d[999],p[333],i,j,x,y,z;main(){for(;scanf("%d%d%d",a,b,c)&&(*a+=*b+*c);){for(i=332;i;p[i--]=2);for(i=0,scanf("%d",p);i++<*p;scanf("%d%d%d%d",a+i,b+i,c+i,d+i));for(i=0;i++<*p;)for(j=0;j++<*p;d[j]?p[a[j]]=p[b[j]]=p[c[j]]=1:(x=p[a[j]]&1)&(y=p[b[j]]&1)?p[c[j]]=0:x&(z=p[c[j]])?p[b[j]]=0:y&z?p[a[j]]=0:0);for(i=0;i<*a;printf("%d\n",p[++i]));}exit(0);}
      |                                                                                                                         ^
a.cc:1:136: error: 'p' was not declared in this scope
    1 | a[999],b[999],c[999],d[999],p[333],i,j,x,y,z;main(){for(;scanf("%d%d%d",a,b,c)&&(*a+=*b+*c);){for(i=332;i;p[i--]=2);for(i=0,scanf("%d",p);i++<*p;scanf("%d%d%d%d",a+i,b+i,c+i,d+i));for(i=0;i++<*p;)for(j=0;j++<*p;d[j]?p[a[j]]=p[b[j]]=p[c[j]]=1:(x=p[a[j]]&1)&(y=p[b[j]]&1)?p[c[j]]=0:x&(z=p[c[j]])?p[b[j]]=0:y&z?p[a[j]]=0:0);for(i=0;i<*a;printf("%d\n",p[++i]));}exit(0);}
      |                                                                                                                                        ^
a.cc:1:175: error: 'd' was not declared in this scope
    1 | a[999],b[999],c[999],d[999],p[333],i,j,x,y,z;main(){for(;scanf("%d%d%d",a,b,c)&&(*a+=*b+*c);){for(i=332;i;p[i--]=2);for(i=0,scanf("%d",p);i++<*p;scanf("%d%d%d%d",a+i,b+i,c+i,d+i));for(i=0;i++<*p;)for(j=0;j++<*p;d[j]?p[a[j]]=p[b[j]]=p[c[j]]=1:(x=p[a[j]]&1)&(y=p[b[j]]&1)?p[c[j]]=0:x&(z=p[c[j]])?p[b[j]]=0:y&z?p[a[j]]=0:0);for(i=0;i<*a;printf("%d\n",p[++i]));}exit(0);}
      |                                                                                                                                                                               ^
a.cc:1:185: error: 'i' was not declared in this scope
    1 | a[999],b[999],c[999],d[999],p[333],i,j,x,y,z;main(){for(;scanf("%d%d%d",a,b,c)&&(*a+=*b+*c);){for(i=332;i;p[i--]=2);for(i=0,scanf("%d",p);i++<*p;scanf("%d%d%d%d",a+i,b+i,c+i,d+i));for(i=0;i++<*p;)for(j=0;j++<*p;d[j]?p[a[j]]=p[b[j]]=p[c[j]]=1:(x=p[a[j]]&1)&(y=p[b[j]]&1)?p[c[j]]=0:x&(z=p[c[j]])?p[b[j]]=0:y&z?p[a[j]]=0:0);for(i=0;i<*a;printf("%d\n",p[++i]));}exit(0);}
      |                                                                                                                                                                                         ^
a.cc:1:194: error: 'p' was not declared in this scope
    1 | a[999],b[999],c[999],d[999],p[333],i,j,x,y,z;main(){for(;scanf("%d%d%d",a,b,c)&&(*a+=*b+*c);){for(i=332;i;p[i--]=2);for(i=0,scanf("%d",p);i++<*p;scanf("%d%d%d%d",a+i,b+i,c+i,d+i));for(i=0;i++<*p;)for(j=0;j++<*p;d[j]?p[a[j]]=p[b[j]]=p[c[j]]=1:(x=p[a[j]]&1)&(y=p[b[j]]&1)?p[c[j]]=0:x&(z=p[c[j]])?p[b[j]]=0:y&z?p[a[j]]=0:0);for(i=0;i<*a;printf("%d\n",p[++i]));}exit(0);}
      |                                                                                                                                                                                                  ^
a.cc:1:201: error: 'j' was not declared in this scope
    1 | a[999],b[999],c[999],d[999],p[333],i,j,x,y,z;main(){for(;scanf("%d%d%d",a,b,c)&&(*a+=*b+*c);){for(i=332;i;p[i--]=2);for(i=0,scanf("%d",p);i++<*p;scanf("%d%d%d%d",a+i,b+i,c+i,d+i));for(i=0;i++<*p;)for(j=0;j++<*p;d[j]?p[a[j]]=p[b[j]]=p[c[j]]=1:(x=p[a[j]]&1)&(y=p[b[j]]&1)?p[c[j]]=0:x&(z=p[c[j]])?p[b[j]]=0:y&z?p[a[j]]=0:0);for(i=0;i<*a;printf("%d\n",p[++i]));}exit(0);}
      |                                                                                                                                                                                                         ^
a.cc:1:212: error: 'd' was not declared in this scope
    1 | a[999],b[999],c[999],d[999],p[333],i,j,x,y,z;main(){for(;scanf("%d%d%d",a,b,c)&&(*a+=*b+*c);){for(i=332;i;p[i--]=2);for(i=0,scanf("%d",p);i++<*p;scanf("%d%d%d%d",a+i,b+i,c+i,d+i));for(i=0;i++<*p;)for(j=0;j++<*p;d[j]?p[a[j]]=p[b[j]]=p[c[j]]=1:(x=p[a[j]]&1)&(y=p[b[j]]&1)?p[c[j]]=0:x&(z=p[c[j]])?p[b[j]]=0:y&z?p[a[j]]=0:0);for(i=0;i<*a;printf("%d\n",p[++i]));}exit(0);}
      |                                                                                                                                                                                                                    ^
a.cc:1:244: error: 'x' was not declared in this scope
    1 | a[999],b[999],c[999],d[999],p[333],i,j,x,y,z;main(){for(;scanf("%d%d%d",a,b,c)&&(*a+=*b+*c);){for(i=332;i;p[i--]=2);for(i=0,scanf("%d",p);i++<*p;scanf("%d%d%d%d",a+i,b+i,c+i,d+i));for(i=0;i++<*p;)for(j=0;j++<*p;d[j]?p[a[j]]=p[b[j]]=p[c[j]]=1:(x=p[a[j]]&1)&(y=p[b[j]]&1)?p[c[j]]=0:x&(z=p[c[j]])?p[b[j]]=0:y&z?p[a[j]]=0:0);for(i=0;i<*a;printf("%d\n",p[++i]));}exit(0);}
      |                                                                                                                                                                                                                                                    ^
a.cc:1:258: error: 'y' was not declared in this scope
    1 | a[999],b[999],c[999],d[999],p[333],i,j,x,y,z;main(){for(;scanf("%d%d%d",a,b,c)&&(*a+=*b+*c);){for(i=332;i;p[i--]=2);for(i=0,scanf("%d",p);i++<*p;scanf("%d%d%d%d",a+i,b+i,c+i,d+i));for(i=0;i++<*p;)for(j=0;j++<*p;d[j]?p[a[j]]=p[b[j]]=p[c[j]]=1:(x=p[a[j]]&1)&(y=p[b[j]]&1)?p[c[j]]=0:x&(z=p[c[j]])?p[b[j]]=0:y&z?p[a[j]]=0:0);for(i=0;i<*a;printf("%d\n",p[++i]));}exit(0);}
      |                                                                                                                                                                                                                                                                  ^
a.cc:1:284: error: 'z' was not declared in this scope
    1 | a[999],b[999],c[999],d[999],p[333],i,j,x,y,z;main(){for(;scanf("%d%d%d",a,b,c)&&(*a+=*b+*c);){for(i=332;i;p[i--]=2);for(i=0,scanf("%d",p);i++<*p;scanf("%d%d%d%d",a+i,b+i,c+i,d+i));for(i=0;i++<*p;)for(j=0;j++<*p;d[j]?p[a[j]]=p[b[j]]=p[c[j]]=1:(x=p[a[j]]&1)&(y=p[b[j]]&1)?p[c[j]]=0:x&(z=p[c[j]])?p[b[j]]=0:y&z?p[a[j]]=0:0);for(i=0;i<*a;printf("%d\n",p[++i]));}exit(0);}
      |