criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <iostream>

using namespace std;

int main(){
	int n;  cin >> n;
	int m;  cin >> m;
	int k[1000] = {};
	for(int i = 0; i < m; i++){
		cin >> k[i];
	}

	int num[200];
	for(int i = 0; i < 2 * n; i++){
		num[i] = i + 1;
	}

	for(int i = 0; i < m; i++){
		if(k[i] != 0){
			int shafled[200];
			for(int j = 1; j < 2 * n - k[i]; j++){
				shafled[j - 1] = k[i] + j;	
			}
			for(int j = 0; j < k[i]; j++){
				shafled[j + 2 * n - k[i]] = j + 1; 
			}
			for(int j = 0; j < 2 * n; j++){
				nmu[i] = shafled[i];
			} 
		}else{
			for(int j = 0; j < 2 * n; j += 2){
				int shafled[200];
				shafled[j] = j + 1;
				shafled[j + 1] = n + j + 1;
			}
			for(int j = 0; j < 2 * n; j++){
				nmu[i] = shafled[i];
			} 
		}
	}
	for(int i = 0; i < 2 *n ; i++){
		cout << num[i] << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:33: error: 'nmu' was not declared in this scope; did you mean 'num'?
   28 |                                 nmu[i] = shafled[i];
      |                                 ^~~
      |                                 num
a.cc:37:33: error: 'nmu' was not declared in this scope; did you mean 'num'?
   37 |                                 nmu[i] = shafled[i];
      |                                 ^~~
      |                                 num
a.cc:37:42: error: 'shafled' was not declared in this scope
   37 |                                 nmu[i] = shafled[i];
      |                                          ^~~~~~~
Language: C++

#include <iostream>

using namespace std;

int main(){
	int n;  cin >> n;
	int m;  cin >> m;
	int k[1000] = {};
	for(int i = 0; i < m; i++){
		cin >> k[i];
	}

	int num[200];
	for(int i = 0; i < 2 * n; i++){
		num[i] = i + 1;
	}

	for(int i = 0; i < m; i++){
		if(k[i] != 0){
			int shafled[200];
			for(int j = 1; j < 2 * n - k[i]; j++){
				shafled[j - 1] = k[i] + j;	
			}
			for(int j = 0; j < k[i]; j++){
				shafled[j + 2 * n - k[i]] = j + 1; 
			}
			for(int j = 0; j < 2 * n; j++){
				nmu[i] = shafled[i];
			} 
		}else{
			for(int j = 0; j < 2 * n; j += 2){
				int shafled[200];
				shafled[j] = j + 1;
				shafled[j + 1] = n + j + 1;
			}
			for(int j = 0; j < 2 * n; j++){
				num[i] = shafled[i];
			} 
		}
	}
	for(int i = 0; i < 2 *n ; i++){
		cout << num[i] << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:33: error: 'nmu' was not declared in this scope; did you mean 'num'?
   28 |                                 nmu[i] = shafled[i];
      |                                 ^~~
      |                                 num
a.cc:37:42: error: 'shafled' was not declared in this scope
   37 |                                 num[i] = shafled[i];
      |                                          ^~~~~~~
Language: C++

#include <iostream>

using namespace std;

int main(){
	int n;  cin >> n;
	int m;  cin >> m;
	int k[1000] = {};
	for(int i = 0; i < m; i++){
		cin >> k[i];
	}

	int num[200];
	for(int i = 0; i < 2 * n; i++){
		num[i] = i + 1;
	}

	for(int i = 0; i < m; i++){
		if(k[i] != 0){
			int shafled[200];
			for(int j = 1; j < 2 * n - k[i]; j++){
				shafled[j - 1] = k[i] + j;	
			}
			for(int j = 0; j < k[i]; j++){
				shafled[j + 2 * n - k[i]] = j + 1; 
			}
			for(int j = 0; j < 2 * n; j++){
				num[i] = shafled[i];
			} 
		}else{
			for(int j = 0; j < 2 * n; j += 2){
				int shafled[200];
				shafled[j] = j + 1;
				shafled[j + 1] = n + j + 1;
			}
			for(int j = 0; j < 2 * n; j++){
				num[i] = shafled[i];
			} 
		}
	}
	for(int i = 0; i < 2 *n ; i++){
		cout << num[i] << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:42: error: 'shafled' was not declared in this scope
   37 |                                 num[i] = shafled[i];
      |                                          ^~~~~~~
Language: C++

#include<iostream>
using namespace std;
void riffle(int n,int card[]);
void cut(int k,int n,int card[]);
int main(){
int n,m,k,i;
cin>>n>>m;
int card[n*2];
for(i=0;i<n*2;i++)card[i]=i+1;


for(i=0;i<m;i++){
cin>>k;
if(k!=0)cut(k,n,card);else riffle(n,card);
}
for(i=0;i<2*n;i++)cout<<card[i]<<endl;
return 0;
}
void cut(int k,int n,int card[]){
int a[n],b[n],i;
for(i=0;i<k;i++)a[i]=card[i];
for(i=k;i<2*n;i++)b[i-k]=card[i];
for(i=k;i<2*n;i++)card[i-k]=b[i-k];
for(i=0;i<k;i++)card[i+(2*n)-k]=a[i];
}
void riffle(int n,int card[]){
    int a[n],b[n],i,j=0;
for(i=0;i<n;i++)a[i]=card[i];
for(i=n;i<2*n;i++)b[i-n]=card[i];
for(i=0;i<n;i++){
    card[j]=a[i];
    card[j+1]=b[i];
    j+=2;
}
}
}

Compiler output:
a.cc:36:1: error: expected declaration before '}' token
   36 | }
      | ^
Language: C++

riffle = lambda half, x: [j for i in zip(x[:half], x[half:]) for j in i]
cut = lambda index, x: x[index:] + x[:index]

cards = [str(x) for x in range(1, int(input())*2 + 1)]
half = int(len(cards) / 2)
for _ in range(int(input())):
  order = int(input())
  if order == 0:
    cards = riffle(half, cards)
  else:
    cards = cut(order, cards)
print("\n".join(cards))

Compiler output:
a.cc:1:1: error: 'riffle' does not name a type
    1 | riffle = lambda half, x: [j for i in zip(x[:half], x[half:]) for j in i]
      | ^~~~~~
Language: C++

#include <iostream>
#include <vector>
using namespace std;

void shuffle(int n, vector<int> stock);
void cut(int n, int k, vector<int> stock);
int main() {
  int n, m;
  int k;
  cin >> n;
  cin >> m;
  for (int i = 0; i < m; i++) {
    cin >> k;
    if (k == 0) shuffle(n, stock);
    else cut(n, k, stock);
  }
  for (int i = 0; i < n; i++) {
    cout << stock[i] << endl;
  }
  return 0;
}
void shuffle(int n, vector<int> stock) {
  vector<int> res;
  for (int i = 0; i < n / 2; i++) {
    res.push_back(stock[i]);
    res.push_back(stock[i + n]);
  }
  for (int i = 0; i < n; i++) stock[i] = res[i];
}
void cut(int n, int k, vector<int> stock) {
  vector<int> res;
  for (int i = k; i < n; i++) res.push_back(stock[i]);
  for (int i = 0; i < k; i++) res.push_back(stock[i]);
  for (int i = 0; i < n; i++) stock[i] = res[i];
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:28: error: 'stock' was not declared in this scope
   14 |     if (k == 0) shuffle(n, stock);
      |                            ^~~~~
a.cc:15:20: error: 'stock' was not declared in this scope
   15 |     else cut(n, k, stock);
      |                    ^~~~~
a.cc:18:13: error: 'stock' was not declared in this scope
   18 |     cout << stock[i] << endl;
      |             ^~~~~
Language: C++

#include <iostream>
#include <vector>
using namespace std;

void shuffle(vector<int>& stock);
void cut(int k, vector<int>& stock);
int main() {
  int n, m, k;
  int size = 2 * n;
  vector<int> stock;
  cin >> n;
  cin >> m;
  for (int i = 0; i < size; i++) stock.push_back(i + 1);
  for (int i = 0; i < m; i++) {
    cin >> k;
    if (k == 0) shuffle(stock);
    else cut(k, stock);
  }
  for (int i = 0; i < size; i++) cout << stock[i] << endl;
  return 0;
}
void shuffle(vector<int>& stock) {
  vector<int> res;
  int size = stock.size();
  for (int i = 0; i < n; i++) {
    res.push_back(stock[i]);
    res.push_back(stock[i + n]);
  }
  for (int i = 0; i < size; i++) stock[i] = res[i];
}
void cut(int k, vector<int>& stock) {
  int size = stock.size();
  vector<int> res;
  for (int i = k; i < size; i++) res.push_back(stock[i]);
  for (int i = 0; i < k; i++) res.push_back(stock[i]);
  for (int i = 0; i < size; i++) stock[i] = res[i];
}

Compiler output:
a.cc: In function 'void shuffle(std::vector<int>&)':
a.cc:25:23: error: 'n' was not declared in this scope
   25 |   for (int i = 0; i < n; i++) {
      |                       ^
Language: C++

#include "stdafx.h"
#include "cstdio"
#include <vector>
#include <iostream>

using namespace std;

inline vector<int> shuffle(vector<int> stock) {
	vector<int> result;
	int n = stock.size() / 2; //stock???????????????????´???°???????????§?????£???n?????£??\
	for (int i = 0; i < n; i++) {
		result.push_back(stock[i]);//result???stock[i]?????????
		result.push_back(stock[i + n]);//result???stock[i+n]??????????????????
	}
	return stock; //stock?????????????????????????????????
}
inline vector<int> cut(vector<int> stock, int k) {
	vector<int> result;
	for (int i = k; i < stock.size(); i++)
		result.push_back(stock[i]);
	for (int i = 0; i < k; i++)
		result.push_back(stock[i]);
	return result;
}
int main() {
	int n, m;
	cin >> n;
	cin >> m;
	cout << n << endl;// end line = ??????
	vector<int> stock(2 * n);//()???????´???°
	for (int i = 0; i < 2 * n; i++)
		stock[i] = i + 1;
	for (int i = 0; i < m; i++) {
		int k;
		cin >> k;
		cout << k;
		if (k == 0) {
			stock = shuffle(stock);
		}

		else {
			stock = cut(stock, k);
		}

	}
	for (int i = 0; i<stock.size(); i++){
		printf("%d\n", stock[i]);
	
	}
	return 0;


}

Compiler output:
a.cc:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++


#include "stdafx.h"
#include "cstdio"
#include <vector>
#include <iostream>

using namespace std;

inline vector<int> shuffle(vector<int> stock) {
	vector<int> result;
	int n = stock.size() / 2; //stock???????????????????´???°???????????§?????£???n?????£??\
	for (int i = 0; i < n; i++) {
		result.push_back(stock[i]);//result???stock[i]?????????
		result.push_back(stock[i + n]);//result???stock[i+n]??????????????????
	}
	return stock; //stock?????????????????????????????????
}
inline vector<int> cut(vector<int> stock, int k) {
	vector<int> result;
	for (int i = k; i < stock.size(); i++)
		result.push_back(stock[i]);
	for (int i = 0; i < k; i++)
		result.push_back(stock[i]);
	return result;
}
int main() {
	int n, m;
	cin >> n;
	cin >> m;
	cout << n << endl;// end line = ??????
	vector<int> stock(2 * n);//()???????´???°
	for (int i = 0; i < 2 * n; i++)
		stock[i] = i + 1;
	for (int i = 0; i < m; i++) {
		int k;
		cin >> k;
		cout << k;
		if (k == 0) {
			stock = shuffle(stock);
		}

		else {
			stock = cut(stock, k);
		}

	}
	for (int i = 0; i<stock.size(); i++){
		printf("%d\n", stock[i]);
	
	}
	return 0;


}

Compiler output:
a.cc:2:10: fatal error: stdafx.h: No such file or directory
    2 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++


#include "stdafx.h"
#include "cstdio"
#include <vector>
#include <iostream>

using namespace std;

inline vector<int> shuffle(vector<int> stock) {
	vector<int> result;
	int n = stock.size() / 2; //stock???????????????????´???°???????????§?????£???n?????£??\
	for (int i = 0; i < n; i++) {
		result.push_back(stock[i]);//result???stock[i]?????????
		result.push_back(stock[i + n]);//result???stock[i+n]??????????????????
	}
	return stock; //stock?????????????????????????????????
}
inline vector<int> cut(vector<int> stock, int k) {
	vector<int> result;
	for (int i = k; i < stock.size(); i++)
		result.push_back(stock[i]);
	for (int i = 0; i < k; i++)
		result.push_back(stock[i]);
	return result;
}
int main() {
	int n, m;
	cin >> n;
	cin >> m;
	vector<int> stock(2 * n);//()???????´???°
	for (int i = 0; i < 2 * n; i++)
		stock[i] = i + 1;
	for (int i = 0; i < m; i++) {
		int k;
		cin >> k;
		if (k == 0) {
			stock = shuffle(stock);
		}
		else {
			stock = cut(stock, k);
		}

	}
	for (int i = 0; i<stock.size(); i++){
		//printf("%d\n", stock[i]);
		cout << stock[i];
	}
	return 0;


}

Compiler output:
a.cc:2:10: fatal error: stdafx.h: No such file or directory
    2 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <stdio.h>
#include <string.h>
#include <functional>
#include <algorithm>
#include <string>
#include <vector>
#include <algorithm>
#include <time.h>
#include <stdlib.h>

using namespace std;

int main (void)
{
  string a;
  int k,n,A,B,zzz;

  for (int i = 0; i < 100; i++)
  {
     cin >> n;
     cin >> a;

     for (int j = 0; j < 2n; j++)
     {
    	 cin >> k;
    	 A = 0;
    	 B = n;
    	 zzz = 0;
    	 if (k == 0)
    	 {
    		 for (int z = 0; z < n; z++)
    		 {
    			 a.substr(A,A + 1) = a.substr(z,n);
    			 A += 2;
    			 n++;
    		 }
    	 }
    	 else if (k > 1 && k < 100)
    	 {
    		 a.substr(0,k - 1) = a.substr(k,2n - 1);
    		 a.substr(k,2n - 1) = a.substr(0,k - 1);
    	 }
     }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:26: error: unable to find numeric literal operator 'operator""n'
   24 |      for (int j = 0; j < 2n; j++)
      |                          ^~
a.cc:41:49: error: unable to find numeric literal operator 'operator""n'
   41 |                  a.substr(0,k - 1) = a.substr(k,2n - 1);
      |                                                 ^~
a.cc:42:29: error: unable to find numeric literal operator 'operator""n'
   42 |                  a.substr(k,2n - 1) = a.substr(0,k - 1);
      |                             ^~
Language: C++

#include<stdio.h>
#include<string.h>
#include<stdlib.h>

int i,j;
int k[1002],n,m,a[204],b[204];

int main(){
	scanf("%d",&n);
	for(i=1;i<=n*2;i++)a[i]=i,b[i]=i;
	scanf("%d",&m);
	for(i=0;i<m;i++)fscanf("%d",&k[i]);
	
	for(i=0;i<m;i++){
		if(k[i]==0){
			for(j=1;j<=n*2;j++){
				if(j%2==1)b[j]=a[(j+1)/2];
				else b[j]=a[n+j/2];
			}
			for(j=1;j<=n*2;j++)a[j]=b[j];
		}else{
			for(j=1;j<=n*2;j++){
				if(j<=n*2-k[i])b[j]=a[k[i]+j];
				else b[j]=a[j-n*2+k[i]];
			}
			for(j=1;j<=n*2;j++)a[j]=b[j];
		}
	}
	
	for(i=1;i<=n*2;i++)printf("%d\n",a[i]);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:32: error: cannot convert 'const char*' to 'FILE*'
   12 |         for(i=0;i<m;i++)fscanf("%d",&k[i]);
      |                                ^~~~
      |                                |
      |                                const char*
In file included from a.cc:1:
/usr/include/stdio.h:422:37: note:   initializing argument 1 of 'int fscanf(FILE*, const char*, ...)'
  422 | extern int fscanf (FILE *__restrict __stream,
      |                    ~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

#include "stdio.h"

int c[200];
int c2[200];

int main()
{
int n;
scanf("%d",&n);
int m;
scanf("%d",&m);
for(int i = 0; i < 2 * n; i++)
{
c[i] = i + 1;
}
for(int i = 0; i < m; i++)
{
int w;
scanf("%d",&w);
if(w == 0)
{
for(int i = 0; i < n; i++)
{
c2[i * 2] = c[i];
c2[i * 2 + 1] = c[n + i];
}
}
else
{
int h = 0;
for(int i = w; i < 2 * n; i++)
{
c2[h] = c[i];
h++;
}
for(int i = 0; i < w; i++)
{
c2[h] = c[i];
}
}
for(int i = 0; i < 2 * n; i++)
{
c[i] = c2[i];
}
}
for(int i = 0; i < 2 * n; I++)
{
printf("%d\n",c[i]);
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:46:27: error: 'I' was not declared in this scope
   46 | for(int i = 0; i < 2 * n; I++)
      |                           ^
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Quality_Checking {

	public static void main(String[] args) throws Exception {
		// TODO ?????????????????????????????????????????????
		int[] arg =new int[100];
        int i=0,sum=0,num=0;
        int[] motor=null,cav=null,io=null,all=null;
        int[][] result=null;
        boolean first=true;

		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
            String line;
            while ((line = br.readLine()) != null) {
            	if(first){
            		String[] str=line.split(" ");
            		if(str[0].equals(str[1])&&str[2].equals(str[1])&&str[0].equals("0"))break;
            		io=new int[Integer.parseInt(str[0])];
            		motor=new int[Integer.parseInt(str[1])];
            		cav=new int[Integer.parseInt(str[2])];
            		all=new int[io.length+motor.length+cav.length+1];
            		for(int k=1;k<all.length;k++){
            			all[k]=2;
            		}
            		num=Integer.parseInt(br.readLine());
            		result=new int[num][4];
            		i=0;
            		first=false;
            	}else{
            		String[] str=line.split(" ");
            		for(int k=0;k<4;k++){
            			result[i][k]=Integer.parseInt(str[k]);
            		}
            		i++;
            		if(i==num){
            			for(int k=0;k<result.length;k++){
                			if(result[k][3]==1){
                				for(int j=0;j<3;j++){
                					all[result[k][j]]=1;
                				}
                			}
                		}
            			for(int k=0;k<result.length;k++){
                			if(result[k][3]==0){
                				if(all[result[k][0]]==1&&all[result[k][1]]==1){
                					all[result[k][2]]=0;
                				}else if(all[result[k][2]]==1&&all[result[k][1]]==1){
                					all[result[k][0]]=0;
                				}else if(all[result[k][0]]==1&&all[result[k][2]]==1){
                					all[result[k][1]]=0;
                				}
                			}
                		}
            			for(int k=1;k<all.length;k++){
            				System.out.println(all[k]);
            			}
            			first=true;
            		}
            	}
            }

        }
	}

}

Compiler output:
Main.java:4: error: class Quality_Checking is public, should be declared in a file named Quality_Checking.java
public class Quality_Checking {
       ^
1 error
Language: Java

import java.util.Scanner;

public class q6{
    public static void main(String[] args){
	final int WIN = 3, PASS = 1, FAIL = 0, UNKNOWN = 2;
	Scanner scn = new Scanner(System.in);

	int n;

	int den,mon,cab,total;
	byte[] glist;
	int[][] exps;
	boolean[] provedp;

	den = scn.nextInt();
	mon = scn.nextInt();
	cab = scn.nextInt();
	total = den+mon+cab;

	n = scn.nextInt();

	glist = new byte[total+1];
	provedp = new boolean[n];

	exps = new int[n][4];

	for(int i=0; i<glist.length; i++)
	    glist[i] = UNKNOWN;

	for(int i=0; i<n; i++) for(int j=0; j<4; j++)
	    exps[i][j] = scn.nextInt();

	boolean complete = true;

	while(complete){
	    complete = false;
	    for(int i=0; i<n; i++)
		if(provedp[i]){
		    continue;
		}else if(exps[i][WIN] == PASS){
		    complete = true;
		    for(int j=0; j<3; j++)
			glist[exps[i][j]] = PASS;
		    provedp[i] = true;
		}else{
		    int cnt = 0;
		    for(int j=0; j<3; j++)
			if(glist[exps[i][j]] == PASS)
			    cnt++;

		    if(cnt == 2){
			complete = true;
			for(int j=0; j<3; j++)
			    if(glist[exps[i][j]] == UNKNOWN)
				glist[exps[i][j]] = FAIL;
			provedp[i] = true;
		    }else{
			for(int j=0; j<3; j++)
			    if(exps[i][j] == FAIL){
				provedp[i] = true;
				complete = true;
			    }
		    }
		}
	}

	for(int i=1 ; i<=total; i++){
	    System.out.println(glist[i]);
	}

	
    }
}

Compiler output:
Main.java:3: error: class q6 is public, should be declared in a file named q6.java
public class q6{
       ^
1 error
Language: Java

import java.util.Scanner;

public class main{
    public static void main(String[] args){
	final int WIN = 3, PASS = 1, FAIL = 0, UNKNOWN = 2;
	Scanner scn = new Scanner(System.in);

	int n;

	int den,mon,cab,total;
	byte[] glist;
	int[][] exps;
	boolean[] provedp;

	den = scn.nextInt();
	mon = scn.nextInt();
	cab = scn.nextInt();
	total = den+mon+cab;

	n = scn.nextInt();

	glist = new byte[total+1];
	provedp = new boolean[n];

	exps = new int[n][4];

	for(int i=0; i<glist.length; i++)
	    glist[i] = UNKNOWN;

	for(int i=0; i<n; i++) for(int j=0; j<4; j++)
	    exps[i][j] = scn.nextInt();

	boolean complete = true;

	while(complete){
	    complete = false;
	    for(int i=0; i<n; i++)
		if(provedp[i]){
		    continue;
		}else if(exps[i][WIN] == PASS){
		    complete = true;
		    for(int j=0; j<3; j++)
			glist[exps[i][j]] = PASS;
		    provedp[i] = true;
		}else{
		    int cnt = 0;
		    for(int j=0; j<3; j++)
			if(glist[exps[i][j]] == PASS)
			    cnt++;

		    if(cnt == 2){
			complete = true;
			for(int j=0; j<3; j++)
			    if(glist[exps[i][j]] == UNKNOWN)
				glist[exps[i][j]] = FAIL;
			provedp[i] = true;
		    }else{
			for(int j=0; j<3; j++)
			    if(exps[i][j] == FAIL){
				provedp[i] = true;
				complete = true;
			    }
		    }
		}
	}

	for(int i=1 ; i<=total; i++){
	    System.out.println(glist[i]);
	}

	
    }
}

Compiler output:
Main.java:3: error: class main is public, should be declared in a file named main.java
public class main{
       ^
1 error
Language: Java

import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Scanner;
import java.util.Set;

public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		while (in.hasNext()) {
			int a = in.nextInt();
			int b = in.nextInt();
			int c = in.nextInt();
			if (a == 0 && b == 0 && c == 0) {
				break;
			}
			int m = in.nextInt();
			for (int i = 0; i < m; i++) {
				new Unit(in.nextInt(), in.nextInt(), in.nextInt(), in.nextInt());
			}
			for (int i = 1; i <= a + b + c; i++) {
				System.out.println(Parts.of(i).state);
			}
		}
	}
}

class Parts {
	final int num;
	int state = 2;
	final Set<Unit> needCheckUnits = new HashSet<Unit>();

	Parts(int num) {
		this.num = num;
	}

	static HashMap<Integer, Parts> map = new HashMap<Integer, Parts>();

	static Parts of(int num) {
		if (map.containsKey(num)) {
			return map.get(num);
		} else {
			Parts result = new Parts(num);
			map.put(num, result);
			return result;

		}
	}

	@Override
	public int hashCode() {
		return num;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		Parts other = (Parts) obj;
		if (num != other.num)
			return false;
		return true;
	}

	void setOK() {
		this.state = 1;
		for (Iterator<Unit> i = needCheckUnits.iterator(); i.hasNext();) {
			Unit unit = i.next();
			if (unit.isAllset()) {
				i.remove();
			}

		}
	}
}

class Unit {
	final Parts a, b, c;
	final boolean isOK;

	Unit(int i, int j, int k, int r) {
		a = Parts.of(i);
		b = Parts.of(j);
		c = Parts.of(k);
		isOK = (r == 1);
		isAllset();
	}

	boolean isAllset() {
		if (isOK) {
			a.setOK();
			b.setOK();
			c.setOK();
			return true;
		} else {
			boolean result = a.state == 0 && b.state == 0 && c.state == 0;
			result = result || c(a, b, c);
			result = result || c(b, c, a);
			result = result || c(c, a, b);
			return result;
		}
	}

	private boolean c(Parts x, Parts y, Parts z) {
		if (x.state == 2) {
			if (y.state == 1 && z.state == 1) {
				x.state = 0;
				return true;
			} else {
				x.needCheckUnits.add(this);
				int size = x.needCheckUnits.size();
			}
		}
		return false;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((a == null) ? 0 : a.hashCode());
		result = prime * result + ((b == null) ? 0 : b.hashCode());
		result = prime * result + ((c == null) ? 0 : c.hashCode());
		result = prime * result + (isOK ? 1231 : 1237);
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (!(obj instanceof Unit))
			return false;
		Unit other = (Unit) obj;
		if (a == null) {
			if (other.a != null)
				return false;
		} else if (!a.equals(other.a))
			return false;
		if (b == null) {
			if (other.b != null)
				return false;
		} else if (!b.equals(other.b))
			return false;
		if (c == null) {
			if (other.c != null)
				return false;
		} else if (!c.equals(other.c))
			return false;
		if (isOK != other.isOK)
			return false;
		return true;
	}

Compiler output:
Main.java:155: error: reached end of file while parsing
	}
	 ^
1 error
Language: C

#include<stdio.h>
#include<string.h>


int bitcnt( int bit )
{
	int ret = 0 ;

	int i ;
	for( i = 0 ; i < 3 ; ++i )
	{
		ret += ( bit >> i ) & 1 ;
	}

	return ret ;
}


int main()
{
	bool BOOL[ 1000 + 1 ] = { false } ;

	int ans[ 1000 + 1 ] ;

	int i[ 1000 + 1 ] ,I[ 100 + 1 ] = { 0 } ;
	int j[ 1000 + 1 ] ,J[ 100 + 1 ] = { 0 } ;
	int k[ 1000 + 1 ] ,K[ 100 + 1 ] = { 0 } ;

	int n ,m ;
	
	int lp ;
	for( lp = m = 0 ; lp < 3 ; ++lp )
	{
		scanf( "%d" ,&n ) ;

		m += n ;
	}

	scanf( "%d" ,&n ) ;


	for( lp = 1 ; lp <= n ; ++lp )
	{
		int ifs ;

		scanf( "%d %d %d %d" ,&i[ lp ] ,&j[ lp ] ,&k[ lp ] ,&ifs ) ;


		if( ifs )
		{
			I[ i[ lp ] ] = 4 ;
			J[ j[ lp ] ] = 2 ;
			K[ k[ lp ] ] = 1 ;

			ans[ i[ lp ] ] = ans[ j[ lp ] ] = ans[ k[ lp ] ] = 1 ;

			BOOL[ lp ] = true ;
		}

		else
		{
			ans[ I[ i[ lp ] ] ? 0 : i[ lp ] ] = ans[ J[ j[ lp ] ] ? 0 : j[ lp ] ] = ans[ K[ k[ lp ] ] ? 0 : k[ lp ] ] = 2 ;
		}
	}

	bool flg = true ;

	while( flg )
	{
		flg = false ;

		for( lp = 1 ; lp <= n ; ++lp )
		{
			if( BOOL[ lp ] == false && bitcnt( I[ i[ lp ] ] | J[ j[ lp ] ] | K[ k[ lp ] ] ) == 2 )
			{
				flg = BOOL[ lp ] = true ; 

				ans[ !( I[ i[ lp ] ] & 7 ) ? i[ lp ] : !( J[ j[ lp ] ] & 7 ) ? j[ lp ] : !( K[ k[ lp ] ] & 7 ) ? k[ lp ] : 0 ] = 0 ;
			}
		}
	}

	for( lp = 1 ; lp <= m ; ++lp )
	{
		printf( "%d\n" ,ans[ lp ] ) ;
	}

	return 0 ;
}

Compiler output:
main.c: In function 'main':
main.c:21:9: error: unknown type name 'bool'
   21 |         bool BOOL[ 1000 + 1 ] = { false } ;
      |         ^~~~
main.c:3:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    2 | #include<string.h>
  +++ |+#include <stdbool.h>
    3 | 
main.c:21:35: error: 'false' undeclared (first use in this function)
   21 |         bool BOOL[ 1000 + 1 ] = { false } ;
      |                                   ^~~~~
main.c:21:35: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:21:35: note: each undeclared identifier is reported only once for each function it appears in
main.c:57:38: error: 'true' undeclared (first use in this function)
   57 |                         BOOL[ lp ] = true ;
      |                                      ^~~~
main.c:57:38: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:66:9: error: unknown type name 'bool'
   66 |         bool flg = true ;
      |         ^~~~
main.c:66:9: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C

#include <cstdio>
#include <list>

#define N 100

using namespace std;

/** Crazy Motor-Cycle */
struct cmc
{
  int a;
  int b;
  int c;
};

/** Application main entry point. */
int
main (
  int     argc,
  char  * argv[ ]
  )
{
  int i;

  for ( ; ; )
  {
    list<struct cmc> lis;
    int d[ 3 * N ];
    int a, b, c;
    int n;

    scanf ( "%d%d%d", &a, &b, &c );
    if ( !( a | b | c ) ) break ;
    b += a; c += b;
    for ( i = 0; i < c; ++i )
    {
      d[ i ] = 2;
    }

    scanf ( "%d", &n );
    while ( n-- )
    {
      struct cmc t;
      int s;

      scanf ( "%d%d%d%d", &t.a, &t.b, &t.c, &s );
      --t.a; --t.b; --t.c;
      if ( s )
      {
        d[ t.a ] =
        d[ t.b ] =
        d[ t.c ] = 1;
      }
      else
      {
        lis.push_back ( t );
      }
    }

    for ( list<struct cmc>::iterator it = lis.begin ( )
        ; it != lis.end ( ); )
    {
      if ( ( d[ it->a ] == 2 && d[ it->b ] == 1 && d[ it->c ] == 1 )
        || ( d[ it->a ] == 1 && d[ it->b ] == 2 && d[ it->c ] == 1 )
        || ( d[ it->a ] == 1 && d[ it->b ] == 1 && d[ it->c ] == 2 ) )
      {
        if      ( d[ it->a ] == 2 ) d[ it->a ]  = 0;
        else if ( d[ it->b ] == 2 ) d[ it->b ]  = 0;
        else                        d[ it->c ]  = 0;
        lis.erase ( it );
        it = lis.begin ( );
      }
      else ++it;
    }

    for ( i = 0; i < c; ++i )
    {
      printf ( "%d\n", d[ i ] );
    }
  }

  return ( 0 );
}

Compiler output:
main.c:1:10: fatal error: cstdio: No such file or directory
    1 | #include <cstdio>
      |          ^~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>

int main(){
  while(1){
    int parts[350], a, b, c, n, i;
    int checks[1000][4];
    for(i = 0;i < 350;i++)parts[i] = 2;
    scanf("%d%d%d", &a, &b, &c);
    if(a == 0 && b == 0 && c == 0) return 0;
    scanf("%d", &n);
    for(i = 0;i < n;i++){
      scanf("%d%d%d%d", &check[i][0], &check[i][1], &check[i][2], &check[i][3]);
      if(check[i][3] == 1){
        parts[check[i][0]] = 1;
        parts[check[i][1]] = 1;
        parts[check[i][2]] = 1;
      }
    }
    for(i = 0;i < n;i++){
      if(check[i][3] == 0){
        if(parts[check[i][0]] * parts[check[i][1]] * parts[check[i][2]] == 2){
          if(parts[check[i][0]] == 2)parts[check[i][0]] = 0;
          if(parts[check[i][1]] == 2)parts[check[i][1]] = 0;
          if(parts[check[i][2]] == 2)parts[check[i][2]] = 0;
        }
      }
    }
    for(i = 1; i <= a + b + c;i++){
      printf("%d\n", parts[i]);
    }
  }
}  

Compiler output:
main.c: In function 'main':
main.c:12:26: error: 'check' undeclared (first use in this function); did you mean 'checks'?
   12 |       scanf("%d%d%d%d", &check[i][0], &check[i][1], &check[i][2], &check[i][3]);
      |                          ^~~~~
      |                          checks
main.c:12:26: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<stdio.h>

int a[1111],b[1111],c[1111],d[1111],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:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    5 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:12:3: error: 'exit' was not declared in this scope
   12 |   exit(0);
      |   ^~~~
a.cc:2:1: note: 'exit' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
    1 | #include<stdio.h>
  +++ |+#include <cstdlib>
    2 |
Language: C++

def f;gets.split.map &:to_i;end
while(n=f.inject:+)>0
m=[2]*n
t=[]
(1..f[0]).map{i,j,k,r=f;r>0?(m[i]=m[j]=m[k]=1;t.push i,j,k;nil):[i,j,k]}.map{|l|l&&((a=l-t).size>1||m[a[0]]=0)}
puts m
end

Compiler output:
a.cc:5:2: error: too many decimal points in number
    5 | (1..f[0]).map{i,j,k,r=f;r>0?(m[i]=m[j]=m[k]=1;t.push i,j,k;nil):[i,j,k]}.map{|l|l&&((a=l-t).size>1||m[a[0]]=0)}
      |  ^~~~
a.cc:1:1: error: 'def' does not name a type
    1 | def f;gets.split.map &:to_i;end
      | ^~~
a.cc:1:7: error: 'gets' does not name a type
    1 | def f;gets.split.map &:to_i;end
      |       ^~~~
a.cc:1:29: error: 'end' does not name a type
    1 | def f;gets.split.map &:to_i;end
      |                             ^~~
a.cc:5:73: error: expected unqualified-id before '.' token
    5 | (1..f[0]).map{i,j,k,r=f;r>0?(m[i]=m[j]=m[k]=1;t.push i,j,k;nil):[i,j,k]}.map{|l|l&&((a=l-t).size>1||m[a[0]]=0)}
      |                                                                         ^
a.cc:6:1: error: 'puts' does not name a type
    6 | puts m
      | ^~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <algorithm>

using namespace std;

int p[500];

int sakurako(int a, int b, int c){
	bool f1, f2, f3;
	f1 = (p[a] == 1 ? true : false);
	f2 = (p[b] == 1 ? true : false);
	f3 = (p[c] == 1 ? true : false);
	
	if (f1 && f2 && !f3) return c;
	if (f1 && !f2 && f3) return b;
	if (!f1 && f2 && f3) return a;
	return -1;
}

int main(void)
{
	int a, b, c, n;
	int ni[1200], nj[1200], nk[1200], nr[1200];
	
	while(cin >> a >> b >> c){
		if (a == 0) break;
		cin >> n;
		
		fill(p, p + 500, 2);
		
		for (int i = 0; i < n; i++){
			scanf("%d %d %d %d", &ni[i], &nj[i], &nk[i], &nr[i]);
			if (nr[i] == 1){
				p[ni[i]] = 1;
				p[nj[i]] = 1;
				p[nk[i]] = 1;
			}
		}
		
		for (int i = 0; i < n; i++){
			if (nr[i] == 0){
				int re = sakurako(ni[i], nj[i], nk[i]);
				if (re == -1) continue;
				p[re] = 0;
			}
		}
		
		for (int i = 1; i <= a + b + c; i++){
			printf("%d\n", p[i]);
		}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:54:2: error: expected '}' at end of input
   54 | }
      |  ^
a.cc:22:1: note: to match this '{'
   22 | {
      | ^
Language: C++

#include <cstdio>
#include <algorithm>
using namespace std;

int a, b, c, N, i[1000], j[1000], k[1000], r[1000], h[301];

int main(){
    while(scanf("%d%d%d", &a, &b, &c), a+b+c){
        scanf("%d", &N);
        for(int x = 0; x < N; x++){
            scanf("%d%d%d%d", i+x, j+x, k+x, r+x);
        }
        fill(h, h+a+b+c+1, 2);
        for(int x = 0; x < N; x++){
            if(r[x] == 1){
                h[i[x]] = h[j[x]] = h[k[x]] = 1;
            }
        }a
        for(int x = 0; x < N; x++){
            if(r[x]) continue;
            printf("%d %d %d\n", i[x], j[x], k[x]);
            if(h[i[x]]%2 + h[j[x]]%2 + h[k[x]]%2 == 2){
                if(h[i[x]]/2){
                    h[i[x]] = 0;
                }
                if(h[j[x]]/2){
                    h[j[x]] = 0;
                }
                if(h[k[x]]/2){
                    h[k[x]] = 0;
                }
            }
        }
        for(int x = 1; x <= a+b+c; x++){
            printf("%d\n", h[x]);
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:11: error: expected ';' before 'for'
   18 |         }a
      |           ^
      |           ;
   19 |         for(int x = 0; x < N; x++){
      |         ~~~
a.cc:19:24: error: 'x' was not declared in this scope
   19 |         for(int x = 0; x < N; x++){
      |                        ^
Language: C++

#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>

using namespace std;

int main(){
    int a,b,c,st[4],n,ch[1000][4],good[301]={0},sum,ans;
    
    
    while(1){
    scanf("%d%d%d%d",&a,&b,&c);
    
        if(a+b+c=0)break;
        
        scanf("%d",&n);
        
    st[0]=1;
    st[1]=a;
    st[2]=a+b;
    st[3]=a+b+c;
    
    for(int i=0;i<n;i++){
        for(int j=0;j<4;j++){
            scanf("%d",&ch[i][j]);
        }
    }
    
    for(int i=0;i<n;i++){
        if(ch[i][3]==1){
            for(int j=0;j<3;j++){
                good[ch[i][j]]=1;
            }
        }
    }
    
    for(int i=0;i<n;i++){
        sum=0;
        for(int j=0;j<3;j++)
            sum+=good[ch[i][j]];
        if(sum==2){
            for(int j=0;j<3;j++)
                if(good[ch[i][j]]!=1){
                    good[ch[i][j]]=-1;
                }
        }
    }
    
    for(int i=1;i<=a+b+c;i++){
        if(good[i]==-1)
            ans=0;
        else if(good[i]==1)
            ans=1;
        else
            ans=2;
        printf("%d\n",ans);
    }
    }
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:15: error: lvalue required as left operand of assignment
   20 |         if(a+b+c=0)break;
      |            ~~~^~
Language: C++

#include <bits/stdc++.h>
#define PB push_back
#define MP make_pair
#define REP(i,n) for (int i=0;i<(n);i++)
#define ALL(a) (a).begin(),(a).end()
#define INF 1000000001
#define MOD 10000
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> P;
const ull B=100000007;
int main(){
      int a,b,c,n;
      while(cin>>a>>b>>c&&a&&b&&c){
            cin>>n;
            int x[1000],y[1000],z[1000],r[1000];
            int f[a+b+c];
            REP(i,a+b+c)f[i]=2;
            int k=0;
            REP(i,n){
                  cin>>x[k]>>y[k]>>z[k]>>r[k];x[k]--;y[k]--;z[k]--;
                  if(r[k]==1){
                        f[x[k]]=f[y[k]]=f[z[k]]=1;
                  }else k++;
            }
            bool update=true;
            while(update){
                  update=false;
                  REP(i,k){
                        if(f[x[i]]==1&&f[y[i]]==1&&f[z[i]]==2){f[z[i]]=0;update=true;}
                        else if(f[x[i]]==1&&f[y[i]]==2&&f[z[i]]==1){f[y[i]]=0;update=true;}
                        else if(f[x[i]]==2&&f[y[i]]==1&&f[z[i]]==1){f[x[i]]=0;update=true;}
                  }
            }
            REP(i,a+b+c)cout<<f[i]<<endl;
      }

Compiler output:
a.cc: In function 'int main()':
a.cc:37:8: error: expected '}' at end of input
   37 |       }
      |        ^
a.cc:13:11: note: to match this '{'
   13 | int main(){
      |           ^
Language: C++

#include <iostream>
using namespace std;
int seihin[300];int test[1000][4];
int a,b,c,n;
bool henka
 
void check(){
	for(int i=0;i<n;i++){
		int p=0;int k;
		if(test[i][3] == 0){
		for(int j =0;j<=2;j++){
			if(seihin[test[i][j]-1]!=1){
				k=test[i][j]-1;
				p++;}
		}
		if(p==1 and seihin[k]==2){
			henka=true;
			seihin[k]=0;
		}
		}
	}
}
 
int main() {
while(1){
	henka=true;
for(int i = 0;i<300;i++){
	seihin[i]=2;
}
cin>>a>>b>>c;
if(a==0 and b==0 and c==0){break;}
cin>>n;
int y=a+b+c;
for(int i=0;i<n;i++){
	cin>>test[i][0]>>test[i][1]>>test[i][2]>>test[i][3];
}
for(int i = 0;i<n;i++){
	if(test[i][3]==1){
		for(int j=0;j<=2;j++){
			seihin[test[i][j]-1]=1;
		}
	}
}
 
while(henka==true){
	henka=false;
	check();
}
for(int i=0;i<y;i++){
	cout<<seihin[i]<<endl;
}
}
	return 0;
}

Compiler output:
a.cc:7:1: error: expected initializer before 'void'
    7 | void check(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:26:9: error: 'henka' was not declared in this scope
   26 |         henka=true;
      |         ^~~~~
a.cc:47:9: error: 'check' was not declared in this scope
   47 |         check();
      |         ^~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
int a,b,c,k,x[1000][4],p[500];
while(true){
for(int i=0;i<500;i++){p[i]=2;}
cin>>a>>b>>c;
if(a==0 && b==0 && c==0){break;}
cin>>k;
for(int i=0;i<k;i++){
cin>>x[i][0]>>x[i][1]>>x[i][2]>>x[i][3];
if(x[i][3]==1){p[x[i][0]]=1;p[x[i][1]]=1;p[x[i][2]]=1;}
}
for(int i=0;i<k;i++){
if(p[x[i][0]]==1 && p[x[i][1]]==1&& x[i][3]==0){p[x[i][2]]=0;}
if(p[x[i][0]]==1 && p[x[i][2]]==1&& x[i][3]==0){p[x[i][1]]=0;}
if(p[x[i][1]]==1 && p[x[i][2]]==1&& x[i][3]==0){p[x[i][0]]=0;}
}
for(int i=1;i<=a+b+c;i++){cout<<p[i]<<endl;}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:2: error: expected '}' at end of input
   21 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<iostream>
main(){
int a,b,c,k,x[1000][4],p[500];
while(true){
for(int i=0;i<500;i++){p[i]=2;}
std::cin>>a>>b>>c;
if(a==0){break;}
cin>>k;
for(int i=0;i<k;i++){cin>>x[i][0]>>x[i][1]>>x[i][2]>>x[i][3];
if(x[i][3]==1){p[x[i][0]]=1;p[x[i][1]]=1;p[x[i][2]]=1;}
}
for(int i=0;i<k;i++){
if(p[x[i][0]]==1&&p[x[i][1]]==1&&x[i][3]==0)
p[x[i][2]]=0;
if(p[x[i][0]]==1&&p[x[i][2]]==1&&x[i][3]==0)
p[x[i][1]]=0;
if(p[x[i][1]]==1&&p[x[i][2]]==1&&x[i][3]==0)
p[x[i][0]]=0;
}
for(int i=1;i<=a+b+c;i++){std::cout<<p[i]<<"\n";}
}
}

Compiler output:
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:8:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 | cin>>k;
      | ^~~
      | std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

#include <iostream>
using namespace std;

int main(){
    while(1){
        int a, b, c, n, list[1001][4], parts[301], judge, defect;

        cin >> a >> b >> c >> n;
        if(a == 0 && b == 0 && c == 0){
            break;
        }

        for(int i = 1; i <= a + b + c; i++){
            parts[i] = 2;
        }
        for(int i = 0; i < n; i++){
            for(int j = 0; j < 4; j++){
                cin >> list[i][j];
            }
            if(list[i][3] == 1){
                for(int k = 0; k < 3; k++){
                    parts[list[i][k]] = 1;
                }
            }
        }

        for(int i = 0; i < n; i++){
            if(!list[i][3]){
                judge = 0;
                for(int j = 0; j < 3; j++){
                    if(parts[list[i][j]] == 2){
                        defect = list[i][j];
                    } else{
                        judge += parts[list[i][j]];
                    }
                    if(judege == 2){
                        parts[defect] = 0;
                    }
                }
            }
        }

        for(int i = 1; i <= a + b + c; i++){
            cout << parts[i] << endl;
        }
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:24: error: 'judege' was not declared in this scope; did you mean 'judge'?
   36 |                     if(judege == 2){
      |                        ^~~~~~
      |                        judge
Language: C++

#include<bits/stdc++.h>
using namespace std;
int alist[10000],blist[10000],clist[10000],abc[10000],ans[10000];
int A,B,C,n,d,f,g,r;

int main(){

    while(1){
    alist[10000]={0};
    blist[10000]={0};
    clist[10000]={0};
    abc[10000]={0};
    ans[10000]={2};

    cin >> A >> B >> C;
    if(A==0&&B==0&&C==0)break;
    cin >> n;

    for(int i=0;i<n;i++){
    cin >> d >> f >> g >> r;
    alist[i]=d;
    blist[i]=f;
    clist[i]=g;A
    ans[i]=r;
    if(r==1){
        abc[d]=1;
        abc[f]=1;
        abc[g]=1;
    }else{
        if(abc[d]==0)abc[d]=2;
        if(abc[f]==0)abc[f]=2;
        if(abc[g]==0)abc[g]=2;
        }
    }

    for(int i=0;i<n;i++){
            if(ans[i]==0){
        if(abc[alist[i]]==1&&abc[blist[i]]==1&&abc[clist[i]]!=1)abc[clist[i]]=0;
        else if(abc[blist[i]]==1&&abc[clist[i]]==1&&abc[alist[i]]!=1)abc[alist[i]]=0;
        else if(abc[clist[i]]==1&&abc[alist[i]]==1&&abc[blist[i]]!=1)abc[blist[i]]=0;
                        }
    }



    for(int i=1;i<A+B+C+1;i++){
        cout << abc[i] << endl;
            }

    }


return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:17: error: expected ';' before 'ans'
   23 |     clist[i]=g;A
      |                 ^
      |                 ;
   24 |     ans[i]=r;
      |     ~~~
Language: C++


using namespace std;

int main(){
  int a,b,c,n,i,j,k,r,d[1000][4];
  int f[301]={0};
  int g[301]={0};
  cin>>a>>b>>c;
  cin>>n;
  for(int p=0;p<n;++p){
    cin>>i>>j>>k>>r;
    d[p][0]=i;d[p][1]=j;d[p][2]=k;d[p][3]=r;
    if(r) g[i]=g[j]=g[k]=1;
  }
  for(int q=0;q<2;++q){
    for(int p=0;p<n;++p){
      if(!d[p][3]){
	if(g[d[p][0]]&&g[d[p][1]]) f[d[p][2]]=1;
	else if(g[d[p][0]]&&g[d[p][2]]) f[d[p][1]]=1;
	else if(g[d[p][2]]&&g[d[p][1]]) f[d[p][0]]=1;
      }
    }
    for(int p=0;p<n;++p){
      if(!d[p][3]){
	if(f[d[p][0]]&&f[d[p][1]]) g[d[p][2]]=1;
	else if(f[d[p][0]]&&f[d[p][2]]) g[d[p][1]]=1;
	else if(f[d[p][2]]&&f[d[p][1]]) g[d[p][0]]=1;
      }
    }
  }
  for(int p=1;p<=a+b+c;++p){
    if(g[p]) cout<<1;
    else if(f[p]) cout<<0;
    else cout<<2;
    cout<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope
    8 |   cin>>a>>b>>c;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | 
a.cc:32:14: error: 'cout' was not declared in this scope
   32 |     if(g[p]) cout<<1;
      |              ^~~~
a.cc:32:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:33:19: error: 'cout' was not declared in this scope
   33 |     else if(f[p]) cout<<0;
      |                   ^~~~
a.cc:33:19: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:34:10: error: 'cout' was not declared in this scope
   34 |     else cout<<2;
      |          ^~~~
a.cc:34:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:35:5: error: 'cout' was not declared in this scope
   35 |     cout<<endl;
      |     ^~~~
a.cc:35:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:35:11: error: 'endl' was not declared in this scope
   35 |     cout<<endl;
      |           ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 |
Language: C++

#include<iostream>
#include<algorithm>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
int ans[300];
int q[1000][3],qtop;
int main(){
	int n,s,a,b,z,c[3];
	while(true){
	cin>>s>>a>>b;
	s+=a+b;
	if(!s)break;
	cin>>n;
	rep(i,s)ans[i]=2;
	qtop=0;
	rep(i,n){
		rep(j,3){cin>>c[j];c[j]--;}
		cin>>z;
		if(z)rep(j,3)ans[c[j]]=1;
		else{
			rep(j,3)q[qtop][j]=c[j];
			vis[qtop]=false;
			qtop++;
		}
	}
	rep(i,qtop){
		bool f[3]={false};
		rep(j,3)if(ans[q[i][j]]==1)f[j]=true;
		if(f[0]+f[1]+f[2]==2)rep(j,3)if(!f[j])ans[q[i][j]]=0;
	}
	rep(i,s)cout<<ans[i]<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:25: error: 'vis' was not declared in this scope
   22 |                         vis[qtop]=false;
      |                         ^~~
Language: C++

using namespace std;

/* {{{ */
#define CL(N) cout << N << endl
#define DCT(N) cout << "debug " << N << endl
#define REP(i, N) for (int i = 0; i < N; i++)
/* }}} */

int main()
{
    int a, b, c;

    while (cin >> a >> b >> c, a || b || c){

        int n, m[1000][4], q[300];

        fill(q, q + 300, 2);

        cin >> n;

        REP(i, n){
            cin >> m[i][0] >> m[i][1] >> m[i][2] >> m[i][3];
            m[i][0]--;
            m[i][1]--;
            m[i][2]--;
            if (m[i][3] == 1){
                q[m[i][0]] = q[m[i][1]] = q[m[i][2]] = 1;
            }
        }

        REP(i, n){ 
             if (m[i][3] == 0){ 
                 int onec = 0;
                 REP(j, 3){
                      if (q[m[i][j]] == 1) onec++;
                 }
             }
             if (onec == 2){
                REP(j, 3){
                    if (q[m[i][j]] == 2){
                        q[m[i][j]] = 0;
                    }
                }
             }
        }
    }
             

    REP(i, a + b + c){
        CL(q[i]);
    }

	return (0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:12: error: 'cin' was not declared in this scope
   13 |     while (cin >> a >> b >> c, a || b || c){
      |            ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:17:9: error: 'fill' was not declared in this scope
   17 |         fill(q, q + 300, 2);
      |         ^~~~
a.cc:38:18: error: 'onec' was not declared in this scope
   38 |              if (onec == 2){
      |                  ^~~~
a.cc:4:15: error: 'cout' was not declared in this scope
    4 | #define CL(N) cout << N << endl
      |               ^~~~
a.cc:50:9: note: in expansion of macro 'CL'
   50 |         CL(q[i]);
      |         ^~
a.cc:4:15: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    4 | #define CL(N) cout << N << endl
      |               ^~~~
a.cc:50:9: note: in expansion of macro 'CL'
   50 |         CL(q[i]);
      |         ^~
a.cc:50:12: error: 'q' was not declared in this scope
   50 |         CL(q[i]);
      |            ^
a.cc:4:23: note: in definition of macro 'CL'
    4 | #define CL(N) cout << N << endl
      |                       ^
a.cc:4:28: error: 'endl' was not declared in this scope
    4 | #define CL(N) cout << N << endl
      |                            ^~~~
a.cc:50:9: note: in expansion of macro 'CL'
   50 |         CL(q[i]);
      |         ^~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

#include<iostream>

using namespace std;

int main(){
  int data[300]=2;
  int a,b,c;
  cin >> a>> b>>c;
  for(int i=0;i<a+b+c;i++){
    data[i]=2;
  }
  int n;
  cin >> n;
  int x,y,z,re;
  int save[n][4];
  int nows=0;
  for(int i=0;i<n;i++){
    cin >>x>>y>>z>>re;
    if(re==1){
      data[x]=1;
      data[y]=1;
      data[z]=1;
    }
    else(re==0){
	save[nows][0]=x;
	save[nows][1]=y;
	save[nows][2]=z;
	nows++;
      }
  }
  for(int i=0;i<nows;i++){
    if(save[i][0]==1 && save[i][1]==1){
      data[save[i][2]]=0;
    }else if(save[i][1]==1 && save[i][2]==1){
      data[save[i][0]]=0;
    }else if(save[i][2]==1 && save[i][0]==1){
      data[save[i][1]]=0;
    }
  }
  for(int i=0;i<a+b+c;i++){
    cout<<data[i]<<endl;
  }
    
      
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: array must be initialized with a brace-enclosed initializer
    6 |   int data[300]=2;
      |                 ^
a.cc:24:16: error: expected ';' before '{' token
   24 |     else(re==0){
      |                ^
      |                ;