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

#include <iostream>
#include <stdio.h>
#include <string.h>
#include <map>
using namespace std;

int did[1000],dcn[1000];

int main() {
	int n,k;
	char s[256];
	map<int,int> da1,da2;
	map<int,int>::iterator it;
	while(true) {
		n=atoi(gets(s));
		if (strlen(s)==0) break;
		if (da1.find(n)!=da1.end()) da1[n]++; else da1.insert(map<int,int>::value_type(n,1)); 
	}
	while(scanf("%d,%d",&n,&k)!=EOF) {
		if (da1.find(n)!=da1.end()) {
			if (da2.find(n)!=da2.end()) da2[n]++; else da2.insert(map<int,int>::value_type(n,da1[n]+1));
		}
	}
	for (it=da2.begin();it!=da2.end();it++) cout << (*it).first << ' ' << (*it).second << endl;    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:24: error: 'gets' was not declared in this scope; did you mean 'getw'?
   15 |                 n=atoi(gets(s));
      |                        ^~~~
      |                        getw
Language: C++

#include<iostream>
#include<string>

using namespace std;

class data
{
public:
	int times;
	bool flag[2];
	data()
	{
		times=0;
		flag[0]=false;
		flag[1]=false;
	}
};

int main(void)
{
	data d[1000];
	int month=0;
	while(1)
	{
		string s;
		getline(cin,s);
		if(cin.eof())break;
		if(s.length()==0)month++;
		for(int i=0;i<s.length();i++)
		{
			if(s[i]==',')
			{
				d[atoi(s.substr(0,i).c_str())].times++;
				d[atoi(s.substr(0,i).c_str())].flag[month]=true;
				break;
			}
		}
	}
	for(int i=0;i<1000;i++)
	{
		if(d[i].flag[0]&&d[i].flag[1])
		{
			cout<<i<<' '<<d[i].times<<endl;
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:9: error: reference to 'data' is ambiguous
   21 |         data d[1000];
      |         ^~~~
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:6:7: note:                 'class data'
    6 | class data
      |       ^~~~
a.cc:33:33: error: 'd' was not declared in this scope
   33 |                                 d[atoi(s.substr(0,i).c_str())].times++;
      |                                 ^
a.cc:41:20: error: 'd' was not declared in this scope
   41 |                 if(d[i].flag[0]&&d[i].flag[1])
      |                    ^
Language: C++

#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
typedef struct{
  int no,sum;
}P;
int main(){
  int a,b,i;
  char tmp[50];
  P n[1000];
  P temp;
  while(fgets(tmp,50,stdin)!=NULL){
    if(strcmp(tmp,"\n")==0)break;
    sscanf(tmp,"%d,%d",&n[i].no,&a);
    n[i].sum=1
    i++;
  }
  while(scanf("%d,%d",&a,&b)!=EOF){
    for(int j=0;j<i;j++){
      if(n[j].no==a)n[j].sum++;
    }
  }
  for(int j=0;j<i-1;j++){
    for(int k=i-1;k>j;k--){
      if(n[k].no<n[k-1].no){
	temp=n[k];
	n[k]=n[k-1];
	n[k-1]=temp;
      }
    }
  }
  for(int j=0;j<i;j++){
    if(n[j].sum!=1){
      printf("%d %d\n",n[j].no,n[j].sum);
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:15: error: expected ';' before 'i'
   17 |     n[i].sum=1
      |               ^
      |               ;
   18 |     i++;
      |     ~
Language: C++

#include<cstdio>
#include<vector>
#include<algorithm>
#include<map>
#include<iostream>
using namespace std;

vector<int> inputs;
map<int, int> one, two;
int main(){
    int x, n;
    while(~scanf("%d,%*d", &x)){
	inputs.push_back(x);
    }
    for(int i = 0;i < inputs.size();i++){
	if(i < inputs.size() / 2)one[inputs[i]]++;
	else two[inputs[i]]++;
    }
    map<int, int>::iterator it = one.begin();
    while(it != one.end()){
	if(two[it->first]){
	    cout << (it->first) << " " << (it->second) + two[it->first] << endl;
	}
	it++;
    }
    return inputs().size()%2;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:18: error: no match for call to '(std::vector<int>) ()'
   26 |     return inputs().size()%2;
      |            ~~~~~~^~
Language: C++

#include<cstdio>
#include<vector>
#include<algorithm>
#include<map>
#include<iostream>
using namespace std;

vector<int> inputs;
map<int, int> one, two;
int main(){
    int x, n;
    while(~scanf("%d,%*d", &x)){
	inputs.push_back(x);
    }
    for(int i = 0;i < inputs.size();i++){
	if(i < inputs.size() / 2)one[inputs[i]]++;
	else two[inputs[i]]++;
    }
    map<int, int>::iterator it = one.begin();
    while(it != one.end()){
	if(two[it->first]){
	    cout << (it->first) << " " << (it->second) + two[it->first] << endl;
	}
	it++;
    }
    return inputs().size%2;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:18: error: no match for call to '(std::vector<int>) ()'
   26 |     return inputs().size%2;
      |            ~~~~~~^~
Language: C++

#include<iostream>
#include<map>
#include<vector>
using namespace std;
char ch;
int cnt=0;
int in[2000][2];
map <int,int> t;
map <int,bool>u;
map <int,bool>v;
vector <int> w;
int main(){
  while(cin>>in[cnt][0]>>ch>>in[cnt][1])cnt++;

  for(int i=0;i<cnt/2;i++){
    if(t[in[i][0]]==0)w.push_back(in[i][0]);
    t[in[i][0]]++;
    u[in[i][0]]=true;
  }

  for(int i=cnt/2;i<cnt;i++){
    t[in[i][0]]++;
    v[in[i][0]]=true;
  }
  sort(w.begin(),w.end());
  for(int i=0;i<(int)w.size();i++){
    if(u[w[i]]&&v[w[i]])cout<<w[i]<<" "<<t[w[i]]<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   25 |   sort(w.begin(),w.end());
      |   ^~~~
      |   short
Language: Java

import java.io.*;

class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
line=br.readLine();
int d=line.length()/3;
char[][][] map=new char[d][3][3];
for(int i=0;i<line.length;i++){
map[(int)i/3][0][i%3]=line.charAt(i)
}
for(int j=1;j<=2;j++){
line=br.readLine();
for(int i=0;i<line.length;i++){
map[(int)i/3][j][i%3]=line.charAt(i)
}
}
outside:
for(int i=0;i<d;i++){
for(int j=0;j<3;j++){
if(map[i][j][0]!='s'&&map[i][j][0]==map[i][j][1]==map[i][j][2]){
System.out.println(map[i][j][0]);
continue outside;
}
if(map[i][0][j]!='s'&&map[i][0][j]==map[i][1][j]==map[i][2][j]){
System.out.println(map[i][0][j]);
continue outside;
}
}
if(map[i][1][1]=='s'){
System.out.println("d");
}
else if(map[i][0][0]==map[i][1][1]==map[i][2][2]){
System.out.println(map[i][1][1]);
}
else if(map[i][0][2]==map[i][1][1]==map[i][2][0]){
System.out.println(map[i][1][1]);
}
else{
System.out.println("d");
}
}
}
}

Compiler output:
Main.java:11: error: ';' expected
map[(int)i/3][0][i%3]=line.charAt(i)
                                    ^
Main.java:16: error: ';' expected
map[(int)i/3][j][i%3]=line.charAt(i)
                                    ^
2 errors
Language: Java

import java.io.*;

class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
line=br.readLine();
int d=line.length()/3;
char[][][] map=new char[d][3][3];
for(int i=0;i<line.length;i++){
map[(int)i/3][0][i%3]=line.charAt(i);
}
for(int j=1;j<=2;j++){
line=br.readLine();
for(int i=0;i<line.length;i++){
map[(int)i/3][j][i%3]=line.charAt(i);
}
}
outside:
for(int i=0;i<d;i++){
for(int j=0;j<3;j++){
if(map[i][j][0]!='s'&&map[i][j][0]==map[i][j][1]==map[i][j][2]){
System.out.println(map[i][j][0]);
continue outside;
}
if(map[i][0][j]!='s'&&map[i][0][j]==map[i][1][j]==map[i][2][j]){
System.out.println(map[i][0][j]);
continue outside;
}
}
if(map[i][1][1]=='s'){
System.out.println("d");
}
else if(map[i][0][0]==map[i][1][1]==map[i][2][2]){
System.out.println(map[i][1][1]);
}
else if(map[i][0][2]==map[i][1][1]==map[i][2][0]){
System.out.println(map[i][1][1]);
}
else{
System.out.println("d");
}
}
}
}

Compiler output:
Main.java:10: error: cannot find symbol
for(int i=0;i<line.length;i++){
                  ^
  symbol:   variable length
  location: variable line of type String
Main.java:15: error: cannot find symbol
for(int i=0;i<line.length;i++){
                  ^
  symbol:   variable length
  location: variable line of type String
Main.java:22: error: incomparable types: boolean and char
if(map[i][j][0]!='s'&&map[i][j][0]==map[i][j][1]==map[i][j][2]){
                                                ^
Main.java:26: error: incomparable types: boolean and char
if(map[i][0][j]!='s'&&map[i][0][j]==map[i][1][j]==map[i][2][j]){
                                                ^
Main.java:34: error: incomparable types: boolean and char
else if(map[i][0][0]==map[i][1][1]==map[i][2][2]){
                                  ^
Main.java:37: error: incomparable types: boolean and char
else if(map[i][0][2]==map[i][1][1]==map[i][2][0]){
                                  ^
6 errors
Language: Java

import java.io.*;

class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
line=br.readLine();
int d=line.length()/3;
char[][][] map=new char[d][3][3];
for(int i=0;i<line.length();i++){
map[(int)i/3][0][i%3]=line.charAt(i);
}
for(int j=1;j<=2;j++){
line=br.readLine();
for(int i=0;i<line.length();i++){
map[(int)i/3][j][i%3]=line.charAt(i);
}
}
outside:
for(int i=0;i<d;i++){
for(int j=0;j<3;j++){
if(map[i][j][0]!='s'&&map[i][j][0]==map[i][j][1]==map[i][j][2]){
System.out.println(map[i][j][0]);
continue outside;
}
if(map[i][0][j]!='s'&&map[i][0][j]==map[i][1][j]==map[i][2][j]){
System.out.println(map[i][0][j]);
continue outside;
}
}
if(map[i][1][1]=='s'){
System.out.println("d");
}
else if(map[i][0][0]==map[i][1][1]==map[i][2][2]){
System.out.println(map[i][1][1]);
}
else if(map[i][0][2]==map[i][1][1]==map[i][2][0]){
System.out.println(map[i][1][1]);
}
else{
System.out.println("d");
}
}
}
}

Compiler output:
Main.java:22: error: incomparable types: boolean and char
if(map[i][j][0]!='s'&&map[i][j][0]==map[i][j][1]==map[i][j][2]){
                                                ^
Main.java:26: error: incomparable types: boolean and char
if(map[i][0][j]!='s'&&map[i][0][j]==map[i][1][j]==map[i][2][j]){
                                                ^
Main.java:34: error: incomparable types: boolean and char
else if(map[i][0][0]==map[i][1][1]==map[i][2][2]){
                                  ^
Main.java:37: error: incomparable types: boolean and char
else if(map[i][0][2]==map[i][1][1]==map[i][2][0]){
                                  ^
4 errors
Language: Java

import java.io.*;

class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
line=br.readLine();
int d=line.length()/3;
char[][][] map=new char[d][3][3];
for(int i=0;i<line.length();i++){
map[(int)(i/3)][0][i%3]=line.charAt(i);
}
for(int j=1;j<=2;j++){
line=br.readLine();
for(int i=0;i<line.length();i++){
map[(int)i/3][j][i%3]=line.charAt(i);
}
}
outside:
for(int i=0;i<d;i++){
for(int j=0;j<3;j++){
if(map[i][j][0]!='s'&&map[i][j][0]==map[i][j][1]&&map[i][j][1]==map[i][j][2]){
System.out.println(String.valueOf(map[i][j][0]));
continue outside;
}
if(map[i][0][j]!='s'&&map[i][0][j]==map[i][1][j]&&map[i][1][j]==map[i][2][j]){
System.out.println(String.valueOf(map[i][0][j]));
continue outside;
}
}
else if(map[i][1][1]!='s'&&map[i][0][0]==map[i][1][1]&&map[i][1][1]==map[i][2][2]){
System.out.println(String.valueOf(map[i][1][1]));
}
else if(map[i][1][1]!='s'&&map[i][0][2]==map[i][1][1]&&map[i][1][1]==map[i][2][0]){
System.out.println(String.valueOf(map[i][1][1]));
}
else{
System.out.println("d");
}
}
}
}

Compiler output:
Main.java:31: error: 'else' without 'if'
else if(map[i][1][1]!='s'&&map[i][0][0]==map[i][1][1]&&map[i][1][1]==map[i][2][2]){
^
1 error
Language: Java

import java.util.Scanner;

/**
 * @author MS14A
 * @version 2017/03/06
 */
public class Main {

    private static final String RESULT_DRAW = "d";

    /**
     * メインメソッド
     *
     * @param args
     */
    public static void main(String[] args) {
        // ローカルテスト用。提出時は"System.in"に修正。
        InputStream input = System.in;
        // File input = new File("D:/Temp/AOJ/0066_TicTacToe.txt");

        try (Scanner scanner = new Scanner(input)) {
            while (scanner.hasNextLine()) {
                System.out.println(judgeWinner(splitLine(scanner.nextLine())));
            }
        } catch (Exception e) {
            // 対応しない。
        }
    }

    private static String[] splitLine(String line) {
        String[] result = new String[line.length()];

        for (int i = 0; i < line.length(); i++) {
            result[i] = String.valueOf(line.charAt(i));
        }

        return result;
    }

    private static String judgeWinner(String[] line) {
        String result = null;
        // 縦のチェック
        result = checkVertical(line);

        if (result != null) {
            return result;
        }

        // 横のチェック
        result = checkHorizontal(line);
        if (result != null) {
            return result;
        }

        // 斜めのチェック
        result = checkDiagonal(line);
        if (result != null) {
            return result;
        }

        return RESULT_DRAW;
    }

    private static String checkVertical(String[] line) {

        for (int i = 0; i < 3; i++) {
            if (!"s".equals(line[i]) && line[i].equals(line[i + 3])
                    && line[i + 3].equals(line[i + 6])) {
                return line[0];
            }
        }

        return null;
    }

    private static String checkHorizontal(String[] line) {

        for (int i = 0; i < 9; i += 3) {
            if (!"s".equals(line[i]) && line[i].equals(line[i + 1])
                    && line[i + 1].equals(line[i + 2])) {
                return line[0];
            }
        }

        return null;
    }

    private static String checkDiagonal(String[] line) {
        if (!"s".equals(line[0]) && line[0].equals(line[4])
                && line[4].equals(line[8])) {
            return line[0];
        }

        if (!"s".equals(line[2]) && line[2].equals(line[4])
                && line[4].equals(line[6])) {
            return line[2];
        }

        return null;
    }
}

Compiler output:
Main.java:18: error: cannot find symbol
        InputStream input = System.in;
        ^
  symbol:   class InputStream
  location: class Main
1 error
Language: Java

import java.util.Scanner;
public class Main {
	public static char check(char ch[]) {
		int i;
		for(i=0;i+2<9;i+=3){
			if(ch[i]==ch[i+1] && ch[i+1]==ch[i+2]) return ch[i];
		}
		for(i=0;i<3;i++){
			if(ch[i]==ch[i+3] && ch[i+3]==ch[i+6]) return ch[i];
		}
		i=0;
		if(ch[i]==ch[i+4] && ch[i+4]==ch[i+8]) return ch[i];
		i=2;
		if(ch[i]==ch[i+2] && ch[i+2]==ch[i+4]) return ch[i];	
		return 'd';
	}
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		while(sc.hasNext()){
			String str=sc.next();
			char ch[]=str.toCharArray();
			char ans=check(ch);
			if(ans=='s') ans='d';
			if(ans=='') ans='o';
			if(ans=='~') ans='x';
			System.out.println(ans);
		}
	}
}

Compiler output:
Main.java:24: error: unclosed character literal
			if(ans=='??') ans='o';
			        ^
Main.java:24: error: illegal character: '\u009b'
			if(ans=='??') ans='o';
			          ^
Main.java:24: error: unclosed character literal
			if(ans=='??') ans='o';
			           ^
Main.java:25: error: unclosed character literal
			if(ans=='?~') ans='x';
			        ^
Main.java:25: error: unclosed character literal
			if(ans=='?~') ans='x';
			           ^
5 errors
Language: Java

import java.util.Arrays;
import java.util.Scanner;

class Main{
	int[][] f;
	
	String solve(){
		// ヨコ
		for(int y=0; y<3; ++y){
			int t = f[y][0];
			if(t==0)continue;
			boolean b = true;
			for(int x=0; x<3; ++x){
				b &= t==f[y][x];
			}
			if(b){
				return t==1 ? "o" : "x";
			}
		}
		
		// タテ
		for(int x=0; x<3; ++x){
			int t = f[0][x];
			if(t==0)continue;
			boolean b = true;
			for(int y=0; y<3; ++y){
				b &= t==f[y][x];
			}
			if(b){
				return t==1 ? "o" : "x";
			}
		}
		
		// ナナメ右下
		{
			int t = f[0][0];
			if(t==0)continue;
			boolean b = true;
			for(int x=0; x<3; ++x){
				b &= t == f[x][x];
			}
			if(b){
				return t==1 ? "o" : "x";
			}
		}
		
		// ナナメ右上
		{
			int t = f[2][0];
			boolean b = true;
			for(int x=0; x<3; ++x){
				b &= t == f[3-1-x][x];
			}
			if(b){
				return t==1 ? "o" : "x";
			}
		}
		
		return "d";
	}
	
	void io(){
		Scanner sc = new Scanner(System.in);
		
		while(sc.hasNext()){
			f = new int[3][3];
			char[] str = sc.next().toCharArray();
			
			for(int i=0; i<9; ++i){
				f[i/3][i%3] = str[i]=='s' ? 0 : str[i]=='o' ? 1 : -1;
			}
			
			System.out.println(solve());
		}
	}
	
	public static void main(String[] args){
		new Main().io();
	}
	
	void debug(Object... os){
		System.err.println(Arrays.deepToString(os));
	}
}

Compiler output:
Main.java:37: error: continue outside of loop
			if(t==0)continue;
			        ^
1 error
Language: C

#include <stdio.h>

int main (){
	int i,j,k;
	char a[3][3],b[10000];
	while(1){
		if(scanf("%s", input)==EOF){
			break;
		}
		b[k]==0;
		for(i=0;i<3;i++){
			for(j=0;j<3;j++){
				scanf(" %c",&a[i][j]);
			}
		}
		for(i=0;i<3;i++){
			if(a[i][1]==a[i][2]&&a[i][0]==a[i][1]){
				b[k]==a[i][1];
			}
		}
		for(i=0;i<3;i++){
			if(a[1][i]==a[2][i]&&a[0][i]==a[1][i]){
				b[k]==a[1][i];
			}
		}
		if(a[1][1]==a[2][2]&&a[0][0]==a[1][1]){
			b[k]==a[1][1];
		}
		if(a[0][2]==a[1][1]&&a[1][1]==a[2][0]){
			b[k]==a[1][1];
		}
		if(b[k]==0){
			b[k]==d;
		}
		k++;
	}
	for(i=0;i<k;i++){
		printf("%c\n",b[k]);
	}
}

Compiler output:
main.c: In function 'main':
main.c:7:32: error: 'input' undeclared (first use in this function); did you mean 'int'?
    7 |                 if(scanf("%s", input)==EOF){
      |                                ^~~~~
      |                                int
main.c:7:32: note: each undeclared identifier is reported only once for each function it appears in
main.c:33:31: error: 'd' undeclared (first use in this function)
   33 |                         b[k]==d;
      |                               ^
Language: C

#include <stdio.h>

int main (){
	int i,j,k;
	char a[3][3],b[10000];
	while(1){
		if(scanf("%s", input)==EOF){
			break;
		}
		b[k]==0;
		for(i=0;i<3;i++){
			for(j=0;j<3;j++){
				scanf(" %c",&a[i][j]);
			}
		}
		for(i=0;i<3;i++){
			if(a[i][1]==a[i][2]&&a[i][0]==a[i][1]){
				b[k]=a[i][1];
			}
		}
		for(i=0;i<3;i++){
			if(a[1][i]==a[2][i]&&a[0][i]==a[1][i]){
				b[k]=a[1][i];
			}
		}
		if(a[1][1]==a[2][2]&&a[0][0]==a[1][1]){
			b[k]=a[1][1];
		}
		if(a[0][2]==a[1][1]&&a[1][1]==a[2][0]){
			b[k]=a[1][1];
		}
		if(b[k]==0){
			b[k]=d;
		}
		k++;
	}
	for(i=0;i<k;i++){
		printf("%c\n",b[k]);
	}
}

Compiler output:
main.c: In function 'main':
main.c:7:32: error: 'input' undeclared (first use in this function); did you mean 'int'?
    7 |                 if(scanf("%s", input)==EOF){
      |                                ^~~~~
      |                                int
main.c:7:32: note: each undeclared identifier is reported only once for each function it appears in
main.c:33:30: error: 'd' undeclared (first use in this function)
   33 |                         b[k]=d;
      |                              ^
Language: C

#include <stdio.h>

int main (){
	int i,j,k;
	char a[3][3],b[10000];
	while(1){
		b[k]=0;
		for(i=0;i<3;i++){
			for(j=0;j<3;j++){
				scanf(" %c",&a[i][j]);
			}
		}
		if(scanf(" %c", a[0][0])==EOF){
			break;
		}
		for(i=0;i<3;i++){
			if(a[i][1]==a[i][2]&&a[i][0]==a[i][1]){
				b[k]=a[i][1];
			}
		}
		for(i=0;i<3;i++){
			if(a[1][i]==a[2][i]&&a[0][i]==a[1][i]){
				b[k]=a[1][i];
			}
		}
		if(a[1][1]==a[2][2]&&a[0][0]==a[1][1]){
			b[k]=a[1][1];
		}
		if(a[0][2]==a[1][1]&&a[1][1]==a[2][0]){
			b[k]=a[1][1];
		}
		if(b[k]==0){
			b[k]=d;
		}
		k++;
	}
	for(i=0;i<k;i++){
		printf("%c\n",b[k]);
	}
}

Compiler output:
main.c: In function 'main':
main.c:33:30: error: 'd' undeclared (first use in this function)
   33 |                         b[k]=d;
      |                              ^
main.c:33:30: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int FUNC(char s[],char A){
int M=0,K,I,J;
for(J=0;J<7;J+3){
K=0;
for(I=J;I<J+3;I++)
if(s[I]==A)
K++;
if(K==3){
M++;
break;
}
}
if(M>0)return 1;
for(J=0;J<3;J++){
K=0;
for(I=J;I<J+7;J+3)
if(s[I]==A)
K++;
if(K==3){
M++;
break;
}
If(M>0)return 1;
K=0;
if(s[0]==A&&s[4]==A&&s[8]==A)
return 1;
If(s[2]==1&&s[4]==A&&s[6]==A)
return 1;
return 0;
}
int main(){
char s{10],A;
while(scanf("%s",s)!=EOF){
A='o';
if(FUNC(s,A){
printf("o\n");
continue;
}
A='x';
if(FUNC(s,A))
printf("x\n");
else printf("d\n");

}
return 0;
}

Compiler output:
main.c: In function 'FUNC':
main.c:24:1: error: implicit declaration of function 'If' [-Wimplicit-function-declaration]
   24 | If(M>0)return 1;
      | ^~
main.c:24:8: error: expected ';' before 'return'
   24 | If(M>0)return 1;
      |        ^~~~~~
      |        ;
main.c:28:30: error: expected ';' before 'return'
   28 | If(s[2]==1&&s[4]==A&&s[6]==A)
      |                              ^
      |                              ;
   29 | return 1;
      | ~~~~~~                        
main.c: In function 'main':
main.c:33:7: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
   33 | char s{10],A;
      |       ^
main.c:33:10: error: expected ';' before ']' token
   33 | char s{10],A;
      |          ^
      |          ;
main.c:33:10: error: expected statement before ']' token
main.c:33:11: error: expected expression before ',' token
   33 | char s{10],A;
      |           ^
main.c:36:13: error: expected ')' before '{' token
   36 | if(FUNC(s,A){
      |   ~         ^
      |             )
main.c:45:1: error: expected expression before '}' token
   45 | }
      | ^
main.c:47:1: error: expected declaration or statement at end of input
   47 | }
      | ^
main.c: In function 'FUNC':
main.c:47:1: error: expected declaration or statement at end of input
Language: C

#include<stdio.h>
int FUNC(char s[],char A){
int M=0,K,I,J;
for(J=0;J<7;J+3){
K=0;
for(I=J;I<J+3;I++)
if(s[I]==A)
K++;
if(K==3){
M++;
break;
}
}
if(M>0)return 1;
for(J=0;J<3;J++){
K=0;
for(I=J;I<J+7;J+3)
if(s[I]==A)
K++;
if(K==3){
M++;
break;
}
if(M>0)return 1;
K=0;
if(s[0]==A&&s[4]==A&&s[8]==A)
return 1;
if(s[2]==1&&s[4]==A&&s[6]==A)
return 1;
return 0;
}
int main(){
char s{10],A;
while(scanf("%s",s)!=EOF){
A='o';
if(FUNC(s,A)){
printf("o\n");
continue;
}
A='x';
if(FUNC(s,A))
printf("x\n");
else printf("d\n");

}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:33:7: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
   33 | char s{10],A;
      |       ^
main.c:33:10: error: expected ';' before ']' token
   33 | char s{10],A;
      |          ^
      |          ;
main.c:33:10: error: expected statement before ']' token
main.c:33:11: error: expected expression before ',' token
   33 | char s{10],A;
      |           ^
main.c:47:1: error: expected declaration or statement at end of input
   47 | }
      | ^
main.c: In function 'FUNC':
main.c:47:1: error: expected declaration or statement at end of input
Language: C

#include<stdio.h>
int FUNC(char s[],char A){
int M=0,K,I,J;
for(J=0;J<7;J+3){
K=0;
for(I=J;I<J+3;I++)
if(s[I]==A)
K++;
if(K==3){
M++;
break;
}
}
if(M>0)return 1;
for(J=0;J<3;J++){
K=0;
for(I=J;I<J+7;J+3)
if(s[I]==A)
K++;
if(K==3){
M++;
break;
}
if(M>0)return 1;
K=0;
if(s[0]==A&&s[4]==A&&s[8]==A)
return 1;
if(s[2]==A&&s[4]==A&&s[6]==A)
return 1;
return 0;
}
int main(){
char s[10],A;
while(scanf("%s",s)!=EOF){
A='o';
if(FUNC(s,A)){
printf("o\n");
continue;
}
A='x';
if(FUNC(s,A))
printf("x\n");
else printf("d\n");

}
return 0;
}

Compiler output:
main.c: In function 'FUNC':
main.c:47:1: error: expected declaration or statement at end of input
   47 | }
      | ^
Language: C

#include<stdio.h>
int FUNC(char S[],char A){
if(S[0]==A&&S[1]==A&&S[2]==A)
return 1;
else if(S[3]==A&&S[4]==A&&S[5]==A)
return 1;
else if(S[6]==A&&S[7]==A&&S[8]==A)
return 1
else if(S[0]==A&&S[3]==A&&S[6]==A)
return 1;
else if(S[1]==A&&S[4]==A&&S[7]==A)
return 1;
else if(S[2]==A&&S[5]==A&&S[8]==A)
return 1;
else if(S[0]==A&&S[4]==A&&S[8]==A)
return 1;
else if(S[2]==A&&S[4]==A&&S[6]==A)
return 1;
else return 0;
}
int main(){
char s[10],A;
while(scanf("%s",s)!=EOF){
A='o';
if(FUNC(s,A)){
printf("o\n");
contenue;
}
A='x';
if(FUNC(s,A))
printf("x\n");
else printf("d\n");
}
return 0;
}

Compiler output:
main.c: In function 'FUNC':
main.c:8:9: error: expected ';' before 'else'
    8 | return 1
      |         ^
      |         ;
    9 | else if(S[0]==A&&S[3]==A&&S[6]==A)
      | ~~~~     
main.c: In function 'main':
main.c:27:1: error: 'contenue' undeclared (first use in this function)
   27 | contenue;
      | ^~~~~~~~
main.c:27:1: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

int main()
{
	string str;
	char field[3][3];
	while(cin >> str){
		int k=0;
		for(int i=0;i<3;i++){
			for(int j=0;j<3;j++){
				field[i][j] = str[k++];
			}
		}
		if((field[0][0] == field[0][1] && field[0][0] == field[0][2]) || (field[0][0] == field[1][0] && field[0][0] == field[2][0])){
			cout << field[0][0] << endl;
		}else if((field[2][0] == field[2][1] && field[2][0] == field[2][2]) || (field[0][2] == field[1][2] && field[0][2] == field[2][2]))
			cout << field[2][2] << endl;
		else if((field[1][0] == field[1][1] && field[1][0] == field[1][2]) || (field[0][1] == field[1][1] && field[0][1] == field[2][1]))
			cout << field[1][1] << endl;
		else if((field[0][0] == field[1][1] && field[2][2] == field[0][0]) || (field[0][2] == field[1][1] && field[0][2] == field[2][0]))
			cout << field[1][1] << endl;
		else
			cout << 'd' << endl;
	}
	return 0;

}

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

#include <stdio.h>

int main(void){
	char t[10];
	while(scanf("%s",t)!=EOF){
		bool o[10],x[10];
		for(int i=0;i<9;++i){
			o[i]=(t[i]=='o')?true:false;
			x[i]=(t[i]=='x')?true:false;
		}
		int ans = 2;
		for(int i=0;i<3;++i){
			if(o[i*3]&&o[i*3+1]&&o[i*3+2]||o[i]&&o[3*1+i]&&o[3*2+i]) ans=0;
			if(x[i*3]&&x[i*3+1]&&x[i*3+2]||x[i]&&x[3*1+i]&&x[3*2+i]) ans=1;
		}
		if(o[0]&&o[4]&&o[8]||o[2]&&o[4]&&o[6]) ans=0;
		if(x[0]&&x[4]&&x[8]||x[2]&&x[4]&&x[6]) ans=1;
		printf("%c\n",((ans<2)?((ans)?'x':'o'):'d'));
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:17: error: unknown type name 'bool'
    6 |                 bool o[10],x[10];
      |                 ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    2 | 
main.c:8:42: error: 'true' undeclared (first use in this function)
    8 |                         o[i]=(t[i]=='o')?true:false;
      |                                          ^~~~
main.c:8:42: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:8:42: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:47: error: 'false' undeclared (first use in this function)
    8 |                         o[i]=(t[i]=='o')?true:false;
      |                                               ^~~~~
main.c:8:47: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C++

#include <iostream>

#include <string>



using namespace std;



int main(){

	string str;

	cin >> str;

	while(cin >> str){
		if(str[0]==str[1]==str[2] || str[0]==str[3]==str[6] || str[0]==str[4]==str[8]){
			if(str[0]==o){
				cout << "o" << endl;
			} else if(str[0]==x){
				cout << "x" << endl;
			} else if(str[8]==str[5]==str[2] || str[8]==str[7]==str[6]){
				if(str[8]==o){
					cout << "o" << endl;
				} else if(str[8]==x){
					cout << "x" << endl;
				} else if(str[1]==str[4]==str[7] || str[3]==str[4]==str[5] || str[2]==str[4]==str[6]){
					if(str[4]==o){
						cout << "o" << endl;
					} else if(str[4]==x){
						cout << "x" << endl;
					} else if{
						cout << "d" << endl;
					}
				}
			}
		}
	}
	return 0;
}
				


Compiler output:
a.cc: In function 'int main()':
a.cc:19:36: error: 'o' was not declared in this scope
   19 |                         if(str[0]==o){
      |                                    ^
a.cc:21:43: error: 'x' was not declared in this scope
   21 |                         } else if(str[0]==x){
      |                                           ^
a.cc:33:50: error: expected '(' before '{' token
   33 |                                         } else if{
      |                                                  ^
      |                                                  (
Language: C++

#include <stdio.h>
#include <cctype>
#include <iostream>
#include <set>
#include <string>
#include <queue>
#include <map>
#include <utility>
using namespace std;
int size(string x){
	string::size_type size=x.size();
	return size;
}
#define fu(l,k) for(int i=l;i<k;i++)
#define fd(l,k) for(int i=l;i>k;i--)
#define sort(ss) sort(ss.begin(), ss.end())
#define rsort(ss) sort(ss.rbegin(), ss.rend())
typedef  vector<string> vs;
typedef  vector<int> vi;
double pi(){
	return M_PI;
}
typedef set<int> set_i;
typedef set<string> set_s;
int INF=1000000;
int main(){
	string ss;
	while(cin>>ss){
		if(ss="EOF") break;
		if(ss[0]==ss[1]&&ss[1]==ss[2]) cout<<ss[0]<<endl;
		else if(ss[0]==ss[1]&&ss[1]==ss[2]) cout<<ss[0]<<endl;
		else if(ss[3]==ss[4]&&ss[4]==ss[5]) cout<<ss[3]<<endl;
		else if(ss[6]==ss[7]&&ss[7]==ss[8]) cout<<ss[6]<<endl;
		else if(ss[0]==ss[3]&&ss[3]==ss[6]) cout<<ss[0]<<endl;
		else if(ss[1]==ss[4]&&ss[4]==ss[7]) cout<<ss[1]<<endl;
		else if(ss[2]==ss[5]&&ss[5]==ss[8]) cout<<ss[2]<<endl;
		else if(ss[0]==ss[4]&&ss[4]==ss[8]) cout<<ss[0]<<endl;
		else if(ss[2]==ss[4]&&ss[4]==ss[6]) cout<<ss[2]<<endl;
		else cout<<'d'<<endl;
	}
}

Compiler output:
a.cc: In function 'double pi()':
a.cc:21:16: error: 'M_PI' was not declared in this scope
   21 |         return M_PI;
      |                ^~~~
a.cc: In function 'int main()':
a.cc:29:22: error: could not convert 'ss.std::__cxx11::basic_string<char>::operator=(((const char*)"EOF"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   29 |                 if(ss="EOF") break;
      |                    ~~^~~~~~
      |                      |
      |                      std::__cxx11::basic_string<char>
Language: C++

#include <stdio.h>
#include <cctype>
#include <iostream>
#include <set>
#include <string>
#include <queue>
#include <map>
#include <utility>
using namespace std;
int size(string x){
	string::size_type size=x.size();
	return size;
}
#define fu(l,k) for(int i=l;i<k;i++)
#define fd(l,k) for(int i=l;i>k;i--)
#define sort(ss) sort(ss.begin(), ss.end())
#define rsort(ss) sort(ss.rbegin(), ss.rend())
typedef  vector<string> vs;
typedef  vector<int> vi;
double pi(){
	return M_PI;
}
typedef set<int> set_i;
typedef set<string> set_s;
int INF=1000000;
int main(){
	string ss;
	while(cin>>ss){
		if(ss="EOF") break;
		if(ss[0]==ss[1]&&ss[1]==ss[2]) cout<<ss[0]<<endl;
		else if(ss[0]==ss[1]&&ss[1]==ss[2]) cout<<ss[0]<<endl;
		else if(ss[3]==ss[4]&&ss[4]==ss[5]) cout<<ss[3]<<endl;
		else if(ss[6]==ss[7]&&ss[7]==ss[8]) cout<<ss[6]<<endl;
		else if(ss[0]==ss[3]&&ss[3]==ss[6]) cout<<ss[0]<<endl;
		else if(ss[1]==ss[4]&&ss[4]==ss[7]) cout<<ss[1]<<endl;
		else if(ss[2]==ss[5]&&ss[5]==ss[8]) cout<<ss[2]<<endl;
		else if(ss[0]==ss[4]&&ss[4]==ss[8]) cout<<ss[0]<<endl;
		else if(ss[2]==ss[4]&&ss[4]==ss[6]) cout<<ss[2]<<endl;
		else cout<<"d"<<endl;
	}
}

Compiler output:
a.cc: In function 'double pi()':
a.cc:21:16: error: 'M_PI' was not declared in this scope
   21 |         return M_PI;
      |                ^~~~
a.cc: In function 'int main()':
a.cc:29:22: error: could not convert 'ss.std::__cxx11::basic_string<char>::operator=(((const char*)"EOF"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   29 |                 if(ss="EOF") break;
      |                    ~~^~~~~~
      |                      |
      |                      std::__cxx11::basic_string<char>
Language: C++

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

int main(){
  string s;
  int k;
  while(cin>>s){
    k=0;
    s='1'+s;
    if(s[1]==s[2]&&s[2]==s[3]&&k[1]!='s')k=1;
    else if(s[4]==s[5]&&s[5]==s[6]&&k[4]!='s')k=4;
    else if(s[7]==s[8]&&s[8]==s[9]&&k[7]!='s')k=7;
    else if(s[1]==s[4]&&s[4]==s[7]&&k[1]!='s')k=1;
    else if(s[2]==s[5]&&s[5]==s[8]&&k[2]!='s')k=2;
    else if(s[3]==s[6]&&s[6]==s[9]&&k[3]!='s')k=3;
    else if(s[1]==s[5]&&s[5]==s[9]&&k[1]!='s')k=1;
    else if(s[3]==s[5]&&s[5]==s[7]&&k[3]!='s')k=3;

    if(k==0)cout<<'d'<<endl;
    else cout<<s[k]<<endl;

  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:33: error: invalid types 'int[int]' for array subscript
   11 |     if(s[1]==s[2]&&s[2]==s[3]&&k[1]!='s')k=1;
      |                                 ^
a.cc:12:38: error: invalid types 'int[int]' for array subscript
   12 |     else if(s[4]==s[5]&&s[5]==s[6]&&k[4]!='s')k=4;
      |                                      ^
a.cc:13:38: error: invalid types 'int[int]' for array subscript
   13 |     else if(s[7]==s[8]&&s[8]==s[9]&&k[7]!='s')k=7;
      |                                      ^
a.cc:14:38: error: invalid types 'int[int]' for array subscript
   14 |     else if(s[1]==s[4]&&s[4]==s[7]&&k[1]!='s')k=1;
      |                                      ^
a.cc:15:38: error: invalid types 'int[int]' for array subscript
   15 |     else if(s[2]==s[5]&&s[5]==s[8]&&k[2]!='s')k=2;
      |                                      ^
a.cc:16:38: error: invalid types 'int[int]' for array subscript
   16 |     else if(s[3]==s[6]&&s[6]==s[9]&&k[3]!='s')k=3;
      |                                      ^
a.cc:17:38: error: invalid types 'int[int]' for array subscript
   17 |     else if(s[1]==s[5]&&s[5]==s[9]&&k[1]!='s')k=1;
      |                                      ^
a.cc:18:38: error: invalid types 'int[int]' for array subscript
   18 |     else if(s[3]==s[5]&&s[5]==s[7]&&k[3]!='s')k=3;
      |                                      ^
Language: C++

#include<stdio.h>
int main(void){
   int str2[100], i = 0, 
   char str[100];
   scanf("%s", str);
   while (str[i] != \0) {
   if ( str[i] == 'o') str2[i] = 1;
   else if ( str[i] == 'x') str2[i] = 2;
   else if ( str[i] == 's') str2[i] = 0;
   i++
   }
   if ( str2[1] + str[2] + str[3] == 3 ) printf("o");
   else if ( str2[1] + str[2] + str[3] == 6 ) printf("x\n");
   else if ( str2[4] + str[5] + str[6] == 3 ) printf("o\n");
   else if ( str2[4] + str[5] + str[6] == 6 ) printf("x\n");
   else if ( str2[7] + str[8] + str[9] == 3 ) printf("o\n");
   else if ( str2[7] + str[8] + str[9] == 6 ) printf("x\n");
   else if ( str2[1] + str[4] + str[7] == 3 ) printf("o\n");
   else if ( str2[1] + str[4] + str[7] == 6 ) printf("x\n");
   else if ( str2[2] + str[5] + str[8] == 3 ) printf("o\n");
   else if ( str2[2] + str[5] + str[8] == 6 ) printf("x\n");
   else if ( str2[3] + str[6] + str[9] == 3 ) printf("o\n");
   else if ( str2[3] + str[6] + str[9] == 6 ) printf("x\n");
   else if ( str2[1] + str[5] + str[9] == 3 ) printf("o\n");
   else if ( str2[1] + str[5] + str[9] == 6 ) printf("x\n");
   else if ( str2[3] + str[5] + str[7] == 3 ) printf("o\n");
   else if ( str2[3] + str[5] + str[7] == 6 ) printf("x\n");
   else printf("d\n");

Compiler output:
a.cc:6:21: error: stray '\' in program
    6 |    while (str[i] != \0) {
      |                     ^
a.cc: In function 'int main()':
a.cc:4:4: error: expected unqualified-id before 'char'
    4 |    char str[100];
      |    ^~~~
a.cc:5:16: error: 'str' was not declared in this scope; did you mean 'str2'?
    5 |    scanf("%s", str);
      |                ^~~
      |                str2
a.cc:10:7: error: expected ';' before '}' token
   10 |    i++
      |       ^
      |       ;
   11 |    }
      |    ~   
a.cc:28:23: error: expected '}' at end of input
   28 |    else printf("d\n");
      |                       ^
a.cc:2:15: note: to match this '{'
    2 | int main(void){
      |               ^
Language: C++

#include <iostream>
#include <math.h>
#inclide <map>
#include <algorithm>
#include <vector>
#include<string>
using namespace std;
#define pb push_back;
#define ll long long;
ll mod=1000000007;

int sum1;
int main{
string a;
while(cin>>a)
{bool owin=false;
bool xwin=false;
if(a[0]==a[1]&&a[1]==a[2]){
if(a[0]=='o'){owin=true;}
else{xwin=true;}
}
if(a[3]==a[4]&&a[5]==a[4]){
if(a[4]=='o'){owin=true;}
else{xwin=true;}
}
if(a[6]==a[7]&&a[7]==a[8]){
if(a[6]=='o'){owin=true;}
else{xwin=true;}
}
if(a[0]==a[4]&&a[4]==a[8]){
if(a[0]=='o'){owin=true;}
else{xwin=true;}
}
if(a[4]==a[6]&&a[4]==a[2]){
if(a[4]=='o'){owin=true;}
else{xwin=true;}
}
if(xwin){cout<<"o"<<endl;}
else if(xwin){cout<<"x"<<endl;}
else{cout<<"d"<<endl;}
}return 0;
}


Compiler output:
a.cc:3:2: error: invalid preprocessing directive #inclide; did you mean #include?
    3 | #inclide <map>
      |  ^~~~~~~
      |  include
a.cc:9:17: error: declaration does not declare anything [-fpermissive]
    9 | #define ll long long;
      |                 ^~~~
a.cc:10:1: note: in expansion of macro 'll'
   10 | ll mod=1000000007;
      | ^~
a.cc:10:4: error: 'mod' does not name a type
   10 | ll mod=1000000007;
      |    ^~~
a.cc:13:5: error: cannot declare '::main' to be a global variable
   13 | int main{
      |     ^~~~
a.cc:14:8: error: expected primary-expression before 'a'
   14 | string a;
      |        ^
a.cc:14:8: error: expected '}' before 'a'
a.cc:13:9: note: to match this '{'
   13 | int main{
      |         ^
a.cc:15:1: error: expected unqualified-id before 'while'
   15 | while(cin>>a)
      | ^~~~~
a.cc:41:2: error: expected unqualified-id before 'return'
   41 | }return 0;
      |  ^~~~~~
a.cc:42:1: error: expected declaration before '}' token
   42 | }
      | ^
Language: C++

#include <iostream>
#include <math.h>

#include <algorithm>
#include <vector>
#include<string>
using namespace std;

int main{
string a;
while(cin>>a)
{bool owin=false;
bool xwin=false;
if(a[0]==a[1]&&a[1]==a[2]){
if(a[0]=='o'){owin=true;}
else{xwin=true;}
}
if(a[3]==a[4]&&a[5]==a[4]){
if(a[4]=='o'){owin=true;}
else{xwin=true;}
}
if(a[6]==a[7]&&a[7]==a[8]){
if(a[6]=='o'){owin=true;}
else{xwin=true;}
}
if(a[0]==a[4]&&a[4]==a[8]){
if(a[0]=='o'){owin=true;}
else{xwin=true;}
}
if(a[4]==a[6]&&a[4]==a[2]){
if(a[4]=='o'){owin=true;}
else{xwin=true;}
}
if(xwin){cout<<"o"<<endl;}
else if(xwin){cout<<"x"<<endl;}
else{cout<<"d"<<endl;}
}return 0;
}


Compiler output:
a.cc:9:5: error: cannot declare '::main' to be a global variable
    9 | int main{
      |     ^~~~
a.cc:10:8: error: expected primary-expression before 'a'
   10 | string a;
      |        ^
a.cc:10:8: error: expected '}' before 'a'
a.cc:9:9: note: to match this '{'
    9 | int main{
      |         ^
a.cc:11:1: error: expected unqualified-id before 'while'
   11 | while(cin>>a)
      | ^~~~~
a.cc:37:2: error: expected unqualified-id before 'return'
   37 | }return 0;
      |  ^~~~~~
a.cc:38:1: error: expected declaration before '}' token
   38 | }
      | ^
Language: C++

#include <iostream>
#include <math.h>
#include <algorithm>
#include <vector>
#include <string>
#include <map>

using namespace std;
#define ll long long
#define rep(i,n) for(int i=0;i<n;i++)
#define ld long double
#define forever while(true)
#define 

  int main(){
string a;
while(cin>>a)
{ 
bool owin=false;
bool xwin=false;
if(a[0]==a[1]&&a[1]==a[2]){
if(a[0]=='o'){owin=true;}
else if(a[0]=='x'){xwin=true;}
}
if(a[3]==a[4]&&a[5]==a[4]){
if(a[4]=='o'){owin=true;}
else if(a[4]=='x'){xwin=true;}
}
if(a[6]==a[7]&&a[7]==a[8]){
if(a[6]=='o'){owin=true;}
else if(a[6]=='x'){xwin=true;}
}
if(a[0]==a[4]&&a[4]==a[8]){
if(a[0]=='o'){owin=true;}
else if(a[0]=='x'){xwin=true;}
}
if(a[4]==a[6]&&a[4]==a[2]){
if(a[4]=='o'){owin=true;}
else if(a[6]=='x'){xwin=true;}
}
if(a[0]==a[3]&&a[3]==a[6]){
if(a[0]=='o'){owin=true;}
else if(a[0]=='x'){xwin=true;}
}
if(a[4]==a[1]&&a[4]==a[7]){
if(a[1]=='o'){owin=true;}
else if(a[1]=='x'){xwin=true;}
}
if(a[2]==a[5]&&a[8]==a[2]){
if(a[2]=='o'){owin=true;}
else if(a[5]=='x'){xwin=true;}
}
if(owin){cout<<"o"<<endl;}
else if(xwin){cout<<"x"<<endl;}
else{cout<<"d"<<endl;}
}return 0;
}


Compiler output:
a.cc:13:9: error: no macro name given in #define directive
   13 | #define
      |         ^
Language: C++

main(){
	char s[10],cel[3][3];
	while(~scanf("%s",s)){
		char win='d';
		int i,j,cnt;
		for(i=0;i<3;i++)for(j=0;j<3;j++)cel[i][j]=s[3*i+j];

		for(i=0;i<3;i++){
			cnt=0;
			for(j=0;j<3;j++)	cnt+=cel[i][j];
			if(cnt==3*'o')	win='o';
			if(cnt==3*'x')	win='x';
		}

		for(i=0;i<3;i++){
			cnt=0;
			for(j=0;j<3;j++)	cnt+=cel[j][i];
			if(cnt==3*'o')	win='o';
			if(cnt==3*'x')	win='x';
		}

		for(i=cnt=0;i<3;i++)	cnt+=cel[i][i];
		if(cnt==3*'o')	win='o';
		if(cnt==3*'x')	win='x';

		for(i=cnt=0;i<3;i++)	cnt+=cel[i][2-i];
		if(cnt==3*'o')	win='o';
		if(cnt==3*'x')	win='x';

		printf("%c\n",win);
	}
	exit(0);
}

Compiler output:
a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    1 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:3:16: error: 'scanf' was not declared in this scope
    3 |         while(~scanf("%s",s)){
      |                ^~~~~
a.cc:30:17: error: 'printf' was not declared in this scope
   30 |                 printf("%c\n",win);
      |                 ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | main(){
a.cc:32:9: error: 'exit' was not declared in this scope
   32 |         exit(0);
      |         ^~~~
a.cc:1:1: note: 'exit' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
  +++ |+#include <cstdlib>
    1 | main(){
Language: C++

char*p="012345678036147258048246",f,s[11];main(i){for(;read(0,s,10);i||puts("d"))for(i=24;i>1;f-'s'&&f==s[p[i+1]-48]&f==s[p[i+2]-48]&&puts(&f,i=1))f=s[p[i-=3]-48];}

Compiler output:
a.cc:1:8: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
    1 | char*p="012345678036147258048246",f,s[11];main(i){for(;read(0,s,10);i||puts("d"))for(i=24;i>1;f-'s'&&f==s[p[i+1]-48]&f==s[p[i+2]-48]&&puts(&f,i=1))f=s[p[i-=3]-48];}
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:1:47: error: expected constructor, destructor, or type conversion before '(' token
    1 | char*p="012345678036147258048246",f,s[11];main(i){for(;read(0,s,10);i||puts("d"))for(i=24;i>1;f-'s'&&f==s[p[i+1]-48]&f==s[p[i+2]-48]&&puts(&f,i=1))f=s[p[i-=3]-48];}
      |                                               ^
Language: C++

def get_winner(s):
	for p in ['o','x']:
		for i in xrange(3):
			win_h=True
			win_v=True
			for j in xrange(3):
				if s[i*3+j]!=p:
					win_h=False
				if s[j*3+i]!=p:
					win_v=False
			if win_h or win_v:
				return p
		if p==s[0]==s[4]==s[8] or p==s[2]==s[4]==s[5]:
			return p
	return 'd'

while 1:
	try:
		s=raw_input()
		print get_winner(s)
	except  EOFError:
		break

Compiler output:
a.cc:1:1: error: 'def' does not name a type
    1 | def get_winner(s):
      | ^~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
string s;
while(getline(cin,s)){
if(s=="")break;
if(s[0]!="s"&&s[0]==s[1]&&s[1]==s[2]){cout<<s[0]<<endl;continue;}
if(s[3]!="s"&&s[3]==s[4]&&s[4]==s[5]){cout<<s[3]<<endl;continue;}
if(s[6]!="s"&&s[6]==s[7]&&s[7]==s[8]){cout<<s[6]<<endl;continue;}
if(s[0]!="s"&&s[0]==s[3]&&s[3]==s[6]){cout<<s[0]<<endl;continue;}
if(s[1]!="s"&&s[1]==s[4]&&s[4]==s[7]){cout<<s[1]<<endl;continue;}
if(s[2]!="s"&&s[2]==s[5]&&s[5]==s[8]){cout<<s[2]<<endl;continue;}
if(s[0]!="s"&&s[0]==s[4]&&s[4]==s[8]){cout<<s[0]<<endl;continue;}
if(s[2]!="s"&&s[2]==s[4]&&s[4]==s[6]){cout<<s[2]<<endl;continue;}
cout<<"d"<<endl;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 | if(s[0]!="s"&&s[0]==s[1]&&s[1]==s[2]){cout<<s[0]<<endl;continue;}
a.cc:9:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 | if(s[3]!="s"&&s[3]==s[4]&&s[4]==s[5]){cout<<s[3]<<endl;continue;}
a.cc:10:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 | if(s[6]!="s"&&s[6]==s[7]&&s[7]==s[8]){cout<<s[6]<<endl;continue;}
a.cc:11:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 | if(s[0]!="s"&&s[0]==s[3]&&s[3]==s[6]){cout<<s[0]<<endl;continue;}
a.cc:12:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 | if(s[1]!="s"&&s[1]==s[4]&&s[4]==s[7]){cout<<s[1]<<endl;continue;}
a.cc:13:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 | if(s[2]!="s"&&s[2]==s[5]&&s[5]==s[8]){cout<<s[2]<<endl;continue;}
a.cc:14:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 | if(s[0]!="s"&&s[0]==s[4]&&s[4]==s[8]){cout<<s[0]<<endl;continue;}
a.cc:15:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 | if(s[2]!="s"&&s[2]==s[4]&&s[4]==s[6]){cout<<s[2]<<endl;continue;}
Language: C++

#!/usr/bin/env ruby
# encoding: utf-8
while true do
        num = 0
        win = "0"
        str = gets.chop
        if str==nil then
                break
        end
        for i in 0..2 do
                if str[num]==str[num+1] && str[num]==str[num+2] then
                        if win=="0" then
                                win = str[num]
                        end
                end
                num += 3
        end
        for i in 0..2 do
                if str[i]==str[i+3] && str[i]==str[i+6] then
                        if win=="0" then
                                win = str[i]
                        end
                end
        end
        if (str[0]==str[4]&&str[0]==str[8])||(str[2]==str[4]&&str[2]==str[6]) then
                if win=="0" then
                        win = str[4]
                end
        end
        if win == "o"||win == "x" then
                print win,"\n"
        else
                print "d\n"
        end
end

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #!/usr/bin/env ruby
      |  ^
a.cc:2:3: error: invalid preprocessing directive #encoding
    2 | # encoding: utf-8
      |   ^~~~~~~~
a.cc:10:18: error: too many decimal points in number
   10 |         for i in 0..2 do
      |                  ^~~~
a.cc:18:18: error: too many decimal points in number
   18 |         for i in 0..2 do
      |                  ^~~~
a.cc:3:1: error: expected unqualified-id before 'while'
    3 | while true do
      | ^~~~~