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

#include<bits/stdc++.h>
using namespace std;
int main(){
    char s[9];
    for(int i=0;i<9;i++){
        cin>>s[i];
    }
    string ans = s[0]+s[4]+s[8];
    cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:27: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    8 |     string ans = s[0]+s[4]+s[8];
      |                  ~~~~~~~~~^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    char s[9]
    for(int i=0;i<9;i++){
        cin>>s[i];
    }
    cout<<s[0]+s[4]+s[8]<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: expected initializer before 'for'
    5 |     for(int i=0;i<9;i++){
      |     ^~~
a.cc:5:17: error: 'i' was not declared in this scope
    5 |     for(int i=0;i<9;i++){
      |                 ^
a.cc:8:11: error: 's' was not declared in this scope
    8 |     cout<<s[0]+s[4]+s[8]<<endl;
      |           ^
Language: C++

#include <cstdlib>
#include <cctype>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <iostream>
#include <sstream>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <fstream>
#include <numeric>
#include <iomanip>
#include <bitset>
#include <list>
#include <stdexcept>
#include <functional>
#include <utility>
#include <ctime>
#include <random>
#include <cassert>
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
#define MEM(a,b) memset((a),(b),sizeof(a))
const LL INF = 1e9 + 7;
const int N = 1e2 + 10;

int main()
{
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
	for (int i = 0; i < 3; i++)
	{
		string str;
		cin >> str;
		cout << str[i][i];
	}
	cout << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:41:31: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}[int]' for array subscript
   41 |                 cout << str[i][i];
      |                               ^
Language: Java

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      for(int i=0; i<3; i++) System.out.print(sc.nextLine().charAt(i))      
      sc.close();      
    }
}

Compiler output:
Main.java:6: error: ';' expected
      for(int i=0; i<3; i++) System.out.print(sc.nextLine().charAt(i))      
                                                                      ^
1 error
Language: Java

import java.util.Scanner;

public class Rp1ABC090A {
    public static void main(String[] args) {

        String[] grid = new String[3];
        Scanner sc = new Scanner(System.in);

        for (int i=0; i<grid.length; i++)
        	grid[i] = sc.next();

        for (int i=0; i<grid.length; i++)
        	System.out.print(grid[i].charAt(i));

        System.out.print("\n");

        sc.close();
    }
}


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

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
    static int[] w = new int[100010];
    static int[] v = new int[100010];
    static int[][] dp = new int[110][100010];
    static int k;

    static int chmin(int a, int b) {
        if (a > b) {
            a = b;
            return a;
        }
        return a;
    }

    static int chmax(int a, int b) {
        if (a < b) {
            a = b;
            return a;
        }
        return a;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[][] s = new char[3][3];
        char[] ans = new char[3];
        int c = 0;
        for (int i = 0; i < 3; i++) {
            for (int j = 0; j < 3; j++) {
                s[i][j] = sc.nextInt();
                if (i == j) {
                    ans[c] = s[i][j];
                    c++;
                }

            }

        }
        for (int i = 0; i < 3; i++)
            System.out.println(ans[i]);
    }
}


Compiler output:
Main.java:34: error: incompatible types: possible lossy conversion from int to char
                s[i][j] = sc.nextInt();
                                    ^
1 error
Language: C++

#include<stdio.h>
int main()
{
	char p[10]
	{
	scanf("%c%c%c%c%c%c%c%c%c",&p[0],&p[1],&p[2],&p[3],&p[4],&p[5],&p[6],&p[7],&p[8]);
	printf("%c%c%c",p[1],p[5],p[8]);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:90: error: expected '}' before ';' token
    6 |         scanf("%c%c%c%c%c%c%c%c%c",&p[0],&p[1],&p[2],&p[3],&p[4],&p[5],&p[6],&p[7],&p[8]);
      |                                                                                          ^
a.cc:5:9: note: to match this '{'
    5 |         {
      |         ^
a.cc:6:14: warning: narrowing conversion of 'scanf(((const char*)"%c%c%c%c%c%c%c%c%c"), (& p[0]), (& p[1]), (& p[2]), (& p[3]), (& p[4]), (& p[5]), (& p[6]), (& p[7]), (& p[8]))' from 'int' to 'char' [-Wnarrowing]
    6 |         scanf("%c%c%c%c%c%c%c%c%c",&p[0],&p[1],&p[2],&p[3],&p[4],&p[5],&p[6],&p[7],&p[8]);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<stdio.h>
#include<string.h>
int main()
{
    char line1[4],line2[4],line3[4],final[4];
    int i;
    gets(line1);
    gets(line2);
    gets(line3);
    final[0]=line1[0];
    final[1]=line2[1];
    final[2]=line3[2];
    printf("%s\n",final);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    7 |     gets(line1);
      |     ^~~~
      |     getw
Language: C++

#include<iostream>
using namespace std;

int main() {

  str a,b,c ; cin >> a >> b >> c ;
  
  cout << a[0] << b[1] << c[2] ;


}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'str' was not declared in this scope; did you mean 'std'?
    6 |   str a,b,c ; cin >> a >> b >> c ;
      |   ^~~
      |   std
a.cc:6:22: error: 'a' was not declared in this scope
    6 |   str a,b,c ; cin >> a >> b >> c ;
      |                      ^
a.cc:6:27: error: 'b' was not declared in this scope
    6 |   str a,b,c ; cin >> a >> b >> c ;
      |                           ^
a.cc:6:32: error: 'c' was not declared in this scope
    6 |   str a,b,c ; cin >> a >> b >> c ;
      |                                ^
Language: C++

#include<cstdio>

int main(int argc, void *argv){
	char *aa=char[9];
	std::cin >> aa[i++] >> aa[i++]>> aa[i++];
  	std::cin >> aa[i++] >> aa[i++]>> aa[i++];
  	std::cin >> aa[i++] >> aa[i++]>> aa[i++];
    printf("%c%c%c", aa[0],aa[3],a[8]);
}

Compiler output:
a.cc:3:5: warning: second argument of 'int main(int, void*)' should be 'char **' [-Wmain]
    3 | int main(int argc, void *argv){
      |     ^~~~
a.cc: In function 'int main(int, void*)':
a.cc:4:18: error: expected primary-expression before 'char'
    4 |         char *aa=char[9];
      |                  ^~~~
a.cc:5:14: error: 'cin' is not a member of 'std'
    5 |         std::cin >> aa[i++] >> aa[i++]>> aa[i++];
      |              ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<cstdio>
  +++ |+#include <iostream>
    2 | 
a.cc:5:24: error: 'i' was not declared in this scope
    5 |         std::cin >> aa[i++] >> aa[i++]>> aa[i++];
      |                        ^
a.cc:6:14: error: 'cin' is not a member of 'std'
    6 |         std::cin >> aa[i++] >> aa[i++]>> aa[i++];
      |              ^~~
a.cc:6:14: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:14: error: 'cin' is not a member of 'std'
    7 |         std::cin >> aa[i++] >> aa[i++]>> aa[i++];
      |              ^~~
a.cc:7:14: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:34: error: 'a' was not declared in this scope; did you mean 'aa'?
    8 |     printf("%c%c%c", aa[0],aa[3],a[8]);
      |                                  ^
      |                                  aa
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
  string c1,c2,c3;
  cin >> c1>>c2>>c3;
  
  string ans = c1[0]+c2[1]+c3[2];
  
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:27: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    8 |   string ans = c1[0]+c2[1]+c3[2];
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
  string c1,c2,c3;
  cin >> c1>>c2>>c3;
  
  string ans = c1[0]+c2[1]+c2[2];
  
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:27: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    8 |   string ans = c1[0]+c2[1]+c2[2];
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
 
int main() {
    int i,j,n;   
    string o;
    n=3;
    char s[n][n],p;
    rep(i,n){
      rep(j,n){
        cin>>o;
        s.at(i)(j)=o.substr(j,1);
      }
    }
   rep(i,n){
     cout<<s[i][i];
   }
  cout<<endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: request for member 'at' in 's', which is of non-class type 'char [n][n]'
   13 |         s.at(i)(j)=o.substr(j,1);
      |           ^~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
 
int main() {
    int i,j,n;   
    string o;
    n=3;
    char s[n][n],p;
    rep(i,n){
      rep(j,n){
        cin>>o;
        s[i][j]=o.substr(j,1);
      }
    }
   rep(i,n){
     cout<<s[i][i];
   }
  cout<<endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:25: error: cannot convert 'std::__cxx11::basic_string<char>' to 'char' in assignment
   13 |         s[i][j]=o.substr(j,1);
      |                 ~~~~~~~~^~~~~
      |                         |
      |                         std::__cxx11::basic_string<char>
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
 
int main() {
    int i,j,n;   
    string o;
    n=3;
    char s[n][n],p;
    rep(i,n){
      rep(j,n){
        cin>>o;
        p=(char)o.substr(j,1)
        s[i][j]=p;
      }
    }
   rep(i,n){
     cout<<s[i][i];
   }
  cout<<endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: invalid cast from type 'std::__cxx11::basic_string<char>' to type 'char'
   13 |         p=(char)o.substr(j,1)
      |           ^~~~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
 
int main() {
    int i,j,n;   
    string o;
    n=3;
    char s[n][n],p;
    rep(i,n){
      rep(j,n){
        cin>>o;
        p=o.substr(j,1)
        s[i][j]=p;
      }
    }
   rep(i,n){
     cout<<s[i][i];
   }
  cout<<endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:19: error: cannot convert 'std::__cxx11::basic_string<char>' to 'char' in assignment
   13 |         p=o.substr(j,1)
      |           ~~~~~~~~^~~~~
      |                   |
      |                   std::__cxx11::basic_string<char>
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
 
int main() {
    int i,j,n;   
    string o;
    n=3;
    char s[n][n];
    rep(i,n){
      rep(j,n){
        cin>>o;
        o=o.substr(j,1)
        s[i][j]=o;
      }
    }
   rep(i,n){
     cout<<s[i][i];
   }
  cout<<endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:24: error: expected ';' before 's'
   13 |         o=o.substr(j,1)
      |                        ^
      |                        ;
   14 |         s[i][j]=o;
      |         ~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
 
int main() {
    int i,j,n;   
    string o;
    n=3;
    char s[n][n];
    rep(i,n){
      rep(j,n){
        cin>>o;
        o=o.substr(j,1)
        s[i][j]=o;
      }
    }
  　rep(i,n){
     cout<<s[i][i];
   }
  cout<<endl;

}


Compiler output:
a.cc:17:3: error: extended character 　 is not valid in an identifier
   17 |   　rep(i,n){
      |   ^
a.cc: In function 'int main()':
a.cc:13:24: error: expected ';' before 's'
   13 |         o=o.substr(j,1)
      |                        ^
      |                        ;
   14 |         s[i][j]=o;
      |         ~               
a.cc:17:3: error: '\U00003000rep' was not declared in this scope
   17 |   　rep(i,n){
      |   ^~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
 
int main() {
    int i,j,n;   
    string s[3][3],o;
    n=3;
    rep(i,n){
      rep(j,n){
        cin>>o;
        o=o.substr(j,1)
        s[i][j]=o;
      }
    }
   rep(i,n){
     cout<<s[i][i];
   }
  cout<<endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:24: error: expected ';' before 's'
   12 |         o=o.substr(j,1)
      |                        ^
      |                        ;
   13 |         s[i][j]=o;
      |         ~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
 
int main() {
    int i,j,n;   
    string s[3][3],o;
    n=3;
    rep(i,n){
      rep(j,n){
        cin>>o;
        o=o.substr(j,1)
        s[i][j]=o;
      }
    }
  　rep(i,n){
     cout<<s[i][i];
   }
  cout<<endl;

}


Compiler output:
a.cc:16:3: error: extended character 　 is not valid in an identifier
   16 |   　rep(i,n){
      |   ^
a.cc: In function 'int main()':
a.cc:12:24: error: expected ';' before 's'
   12 |         o=o.substr(j,1)
      |                        ^
      |                        ;
   13 |         s[i][j]=o;
      |         ~               
a.cc:16:3: error: '\U00003000rep' was not declared in this scope
   16 |   　rep(i,n){
      |   ^~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
 
int main() {
    int i,j,n;   
    string s[3][3],o;
  n=3;
    rep(i,n){
      rep(j,n){
        cin>>o;
        o=o.substr(j,1)
        s[i][j]=o;
      }
    }
  　rep(i,n){
     cout<<s[i][i];
   }
  cout<<endl;

}


Compiler output:
a.cc:16:3: error: extended character 　 is not valid in an identifier
   16 |   　rep(i,n){
      |   ^
a.cc: In function 'int main()':
a.cc:12:24: error: expected ';' before 's'
   12 |         o=o.substr(j,1)
      |                        ^
      |                        ;
   13 |         s[i][j]=o;
      |         ~               
a.cc:16:3: error: '\U00003000rep' was not declared in this scope
   16 |   　rep(i,n){
      |   ^~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
 
int main() {
    int i,j,n;   
    string s[3][3],o;
    rep(i,n){
      rep(j,n){
        cin>>o;
        o=o.substr(j,1)
        s[i][j]=o;
      }
    }
  　rep(i,n){
     cout<<s[i][i];
   }
  cout<<endl;

}


Compiler output:
a.cc:15:3: error: extended character 　 is not valid in an identifier
   15 |   　rep(i,n){
      |   ^
a.cc: In function 'int main()':
a.cc:11:24: error: expected ';' before 's'
   11 |         o=o.substr(j,1)
      |                        ^
      |                        ;
   12 |         s[i][j]=o;
      |         ~               
a.cc:15:3: error: '\U00003000rep' was not declared in this scope
   15 |   　rep(i,n){
      |   ^~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
 
int main() {
    int i,j,n;
    string s[i][j],o;
    rep(i,n){
      rep(j,n){
        cin>>o;
        o=o.substr(j,1)
        s[i][j]=o;
      }
    }
  　rep(i,n){
     cout<<s[i][i];
   }
  cout<<endl;

}


Compiler output:
a.cc:15:3: error: extended character 　 is not valid in an identifier
   15 |   　rep(i,n){
      |   ^
a.cc: In function 'int main()':
a.cc:11:24: error: expected ';' before 's'
   11 |         o=o.substr(j,1)
      |                        ^
      |                        ;
   12 |         s[i][j]=o;
      |         ~               
a.cc:15:3: error: '\U00003000rep' was not declared in this scope
   15 |   　rep(i,n){
      |   ^~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
 
int main() {
    int i,j;
    string s[i][j],o;
    rep(i,n){
      rep(j,n){
        cin>>o;
        o=o.substr(j,1)
        s[i][j]=o;
      }
    }
  　rep(i,n){
     cout<<s[i][i];
   }
  cout<<endl;

}


Compiler output:
a.cc:15:3: error: extended character 　 is not valid in an identifier
   15 |   　rep(i,n){
      |   ^
a.cc: In function 'int main()':
a.cc:8:11: error: 'n' was not declared in this scope
    8 |     rep(i,n){
      |           ^
a.cc:2:33: note: in definition of macro 'rep'
    2 | #define rep(i,n) for(int i=0;i<(n);i++)
      |                                 ^
a.cc:11:24: error: expected ';' before 's'
   11 |         o=o.substr(j,1)
      |                        ^
      |                        ;
   12 |         s[i][j]=o;
      |         ~               
a.cc:15:11: error: 'n' was not declared in this scope
   15 |   　rep(i,n){
      |           ^
a.cc:15:3: error: '\U00003000rep' was not declared in this scope
   15 |   　rep(i,n){
      |   ^~~~~
Language: C++

#include <bits/stdc++.h>
rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
 
int main() {
    int i,j;
    string s[i][j],o;
    rep(i,n){
      rep(j,n){
        cin>>o;
        o=o.substr(j,1)
        s[i][j]=o;
      }
    }
  　rep(i,n){
     cout<<s[i][i];
   }
  cout<<endl;

}


Compiler output:
a.cc:15:3: error: extended character 　 is not valid in an identifier
   15 |   　rep(i,n){
      |   ^
a.cc:2:4: error: expected constructor, destructor, or type conversion before '(' token
    2 | rep(i,n) for(int i=0;i<(n);i++)
      |    ^
a.cc:2:22: error: 'i' does not name a type
    2 | rep(i,n) for(int i=0;i<(n);i++)
      |                      ^
a.cc:2:28: error: 'i' does not name a type
    2 | rep(i,n) for(int i=0;i<(n);i++)
      |                            ^
a.cc: In function 'int main()':
a.cc:7:5: error: 'string' was not declared in this scope
    7 |     string s[i][j],o;
      |     ^~~~~~
a.cc:7:5: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:8:11: error: 'n' was not declared in this scope
    8 |     rep(i,n){
      |           ^
a.cc:8:5: error: 'rep' was not declared in this scope
    8 |     rep(i,n){
      |     ^~~
a.cc:15:3: error: '\U00003000rep' was not declared in this scope
   15 |   　rep(i,n){
      |   ^~~~~
a.cc:18:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   18 |   cout<<endl;
      |   ^~~~
      |   std::cout
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:18:9: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   18 |   cout<<endl;
      |         ^~~~
      |         std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
 
int main() {
    int i,j,o;
    string s[i][j];
    rep(i,n){
      rep(j,n){
        cin>>o;
        o=o.substr(j,1)
        s[i][j]=o;
      }
    }
  　rep(i,n){
     cout<<s[i][i];
   }
  cout<<endl;

}


Compiler output:
a.cc:15:3: error: extended character 　 is not valid in an identifier
   15 |   　rep(i,n){
      |   ^
a.cc:2:4: error: expected constructor, destructor, or type conversion before '(' token
    2 | rep(i,n) for(int i=0;i<(n);i++)
      |    ^
a.cc:2:22: error: 'i' does not name a type
    2 | rep(i,n) for(int i=0;i<(n);i++)
      |                      ^
a.cc:2:28: error: 'i' does not name a type
    2 | rep(i,n) for(int i=0;i<(n);i++)
      |                            ^
a.cc: In function 'int main()':
a.cc:7:5: error: 'string' was not declared in this scope
    7 |     string s[i][j];
      |     ^~~~~~
a.cc:7:5: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:8:11: error: 'n' was not declared in this scope
    8 |     rep(i,n){
      |           ^
a.cc:8:5: error: 'rep' was not declared in this scope
    8 |     rep(i,n){
      |     ^~~
a.cc:15:3: error: '\U00003000rep' was not declared in this scope
   15 |   　rep(i,n){
      |   ^~~~~
a.cc:18:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   18 |   cout<<endl;
      |   ^~~~
      |   std::cout
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:18:9: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   18 |   cout<<endl;
      |         ^~~~
      |         std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
 
int main() {
    int i,j,n;
    string s[i][j];
    rep(i,n){
      rep(j,n){
        cin>>s[i][j];
      }
    }
  　rep(i,n){
     cout<<s[i][i];
   }
  cout<<endl;

}


Compiler output:
a.cc:13:3: error: extended character 　 is not valid in an identifier
   13 |   　rep(i,n){
      |   ^
a.cc:2:4: error: expected constructor, destructor, or type conversion before '(' token
    2 | rep(i,n) for(int i=0;i<(n);i++)
      |    ^
a.cc:2:22: error: 'i' does not name a type
    2 | rep(i,n) for(int i=0;i<(n);i++)
      |                      ^
a.cc:2:28: error: 'i' does not name a type
    2 | rep(i,n) for(int i=0;i<(n);i++)
      |                            ^
a.cc: In function 'int main()':
a.cc:7:5: error: 'string' was not declared in this scope
    7 |     string s[i][j];
      |     ^~~~~~
a.cc:7:5: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:8:5: error: 'rep' was not declared in this scope
    8 |     rep(i,n){
      |     ^~~
a.cc:13:3: error: '\U00003000rep' was not declared in this scope
   13 |   　rep(i,n){
      |   ^~~~~
a.cc:16:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |   cout<<endl;
      |   ^~~~
      |   std::cout
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:16:9: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   16 |   cout<<endl;
      |         ^~~~
      |         std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
rep(i,n) for(int i=0;i<n;i++)
using namespace std;
 
int main() {
    int i,j,n;
    string s[i][j];
    rep(i,n){
      rep(j,n){
        cin>>s[i][j];
      }
    }
  　rep(i,n){
     cout<<s[i][i];
   }
  cout<<endl;

}


Compiler output:
a.cc:13:3: error: extended character 　 is not valid in an identifier
   13 |   　rep(i,n){
      |   ^
a.cc:2:4: error: expected constructor, destructor, or type conversion before '(' token
    2 | rep(i,n) for(int i=0;i<n;i++)
      |    ^
a.cc:2:22: error: 'i' does not name a type
    2 | rep(i,n) for(int i=0;i<n;i++)
      |                      ^
a.cc:2:26: error: 'i' does not name a type
    2 | rep(i,n) for(int i=0;i<n;i++)
      |                          ^
a.cc: In function 'int main()':
a.cc:7:5: error: 'string' was not declared in this scope
    7 |     string s[i][j];
      |     ^~~~~~
a.cc:7:5: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:8:5: error: 'rep' was not declared in this scope
    8 |     rep(i,n){
      |     ^~~
a.cc:13:3: error: '\U00003000rep' was not declared in this scope
   13 |   　rep(i,n){
      |   ^~~~~
a.cc:16:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |   cout<<endl;
      |   ^~~~
      |   std::cout
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:16:9: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   16 |   cout<<endl;
      |         ^~~~
      |         std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
 
int main() {
    int i,j;
    string s[i][j];
    rep(i,n){
      rep(j,n){
        cin>>s[i][j];
      }
    }
  　rep(i,n){
     cout<<s[i][i];
   }
  cout<<endl;

}


Compiler output:
a.cc:13:3: error: extended character 　 is not valid in an identifier
   13 |   　rep(i,n){
      |   ^
a.cc:2:4: error: expected constructor, destructor, or type conversion before '(' token
    2 | rep(i,n) for(int i=0;i<(n);i++)
      |    ^
a.cc:2:22: error: 'i' does not name a type
    2 | rep(i,n) for(int i=0;i<(n);i++)
      |                      ^
a.cc:2:28: error: 'i' does not name a type
    2 | rep(i,n) for(int i=0;i<(n);i++)
      |                            ^
a.cc: In function 'int main()':
a.cc:7:5: error: 'string' was not declared in this scope
    7 |     string s[i][j];
      |     ^~~~~~
a.cc:7:5: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:8:11: error: 'n' was not declared in this scope
    8 |     rep(i,n){
      |           ^
a.cc:8:5: error: 'rep' was not declared in this scope
    8 |     rep(i,n){
      |     ^~~
a.cc:13:3: error: '\U00003000rep' was not declared in this scope
   13 |   　rep(i,n){
      |   ^~~~~
a.cc:16:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |   cout<<endl;
      |   ^~~~
      |   std::cout
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:16:9: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   16 |   cout<<endl;
      |         ^~~~
      |         std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
rep(i,n) for(int i=0;i<n;i++)
using namespace std;
 
int main() {
    int i,j;
    string s[i][j];
    rep(i,n){
      rep(j,n){
        cin>>s[i][j];
      }
    }
  　rep(i,n){
     cout<<s[i][i];
   }
  cout<<endl;

}


Compiler output:
a.cc:13:3: error: extended character 　 is not valid in an identifier
   13 |   　rep(i,n){
      |   ^
a.cc:2:4: error: expected constructor, destructor, or type conversion before '(' token
    2 | rep(i,n) for(int i=0;i<n;i++)
      |    ^
a.cc:2:22: error: 'i' does not name a type
    2 | rep(i,n) for(int i=0;i<n;i++)
      |                      ^
a.cc:2:26: error: 'i' does not name a type
    2 | rep(i,n) for(int i=0;i<n;i++)
      |                          ^
a.cc: In function 'int main()':
a.cc:7:5: error: 'string' was not declared in this scope
    7 |     string s[i][j];
      |     ^~~~~~
a.cc:7:5: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:8:11: error: 'n' was not declared in this scope
    8 |     rep(i,n){
      |           ^
a.cc:8:5: error: 'rep' was not declared in this scope
    8 |     rep(i,n){
      |     ^~~
a.cc:13:3: error: '\U00003000rep' was not declared in this scope
   13 |   　rep(i,n){
      |   ^~~~~
a.cc:16:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |   cout<<endl;
      |   ^~~~
      |   std::cout
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:16:9: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   16 |   cout<<endl;
      |         ^~~~
      |         std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
rep(i,n) for(int i=0;i<n;i++);
using namespace std;
 
int main() {
    int i,j;
    string s[i][j];
    rep(i,n){
      rep(j,n){
        cin>>s[i][j];
      }
    }
  　rep(i,n){
     cout<<s[i][i];
   }
  cout<<endl;

}


Compiler output:
a.cc:13:3: error: extended character 　 is not valid in an identifier
   13 |   　rep(i,n){
      |   ^
a.cc:2:4: error: expected constructor, destructor, or type conversion before '(' token
    2 | rep(i,n) for(int i=0;i<n;i++);
      |    ^
a.cc:2:22: error: 'i' does not name a type
    2 | rep(i,n) for(int i=0;i<n;i++);
      |                      ^
a.cc:2:26: error: 'i' does not name a type
    2 | rep(i,n) for(int i=0;i<n;i++);
      |                          ^
a.cc: In function 'int main()':
a.cc:8:11: error: 'n' was not declared in this scope
    8 |     rep(i,n){
      |           ^
a.cc:8:5: error: 'rep' was not declared in this scope
    8 |     rep(i,n){
      |     ^~~
a.cc:13:3: error: '\U00003000rep' was not declared in this scope
   13 |   　rep(i,n){
      |   ^~~~~
Language: C++

#include <bits/stdc++.h>
rep(i,n) for(i=0;i<(n);i++);
using namespace std;
 
int main() {
    int i,j;
    string s[i][j];
    rep(i,n){
      rep(j,n){
        cin>>s[i][j];
      }
    }
  　rep(i,n){
     cout<<s[i][i];
   }
  cout<<endl;

}


Compiler output:
a.cc:13:3: error: extended character 　 is not valid in an identifier
   13 |   　rep(i,n){
      |   ^
a.cc:2:4: error: expected constructor, destructor, or type conversion before '(' token
    2 | rep(i,n) for(i=0;i<(n);i++);
      |    ^
a.cc:2:18: error: 'i' does not name a type
    2 | rep(i,n) for(i=0;i<(n);i++);
      |                  ^
a.cc:2:24: error: 'i' does not name a type
    2 | rep(i,n) for(i=0;i<(n);i++);
      |                        ^
a.cc: In function 'int main()':
a.cc:8:11: error: 'n' was not declared in this scope
    8 |     rep(i,n){
      |           ^
a.cc:8:5: error: 'rep' was not declared in this scope
    8 |     rep(i,n){
      |     ^~~
a.cc:13:3: error: '\U00003000rep' was not declared in this scope
   13 |   　rep(i,n){
      |   ^~~~~
Language: C++

#include <bits/stdc++.h>
rep(i,n) for(i=0;i<n;i++);
using namespace std;
 
int main() {
    int i,j;
    string s[i][j];
    rep(i,n){
      rep(j,n){
        cin>>s[i][j];
      }
    }
  　rep(i,n){
     cout<<s[i][i];
   }
  cout<<endl;

}


Compiler output:
a.cc:13:3: error: extended character 　 is not valid in an identifier
   13 |   　rep(i,n){
      |   ^
a.cc:2:4: error: expected constructor, destructor, or type conversion before '(' token
    2 | rep(i,n) for(i=0;i<n;i++);
      |    ^
a.cc:2:18: error: 'i' does not name a type
    2 | rep(i,n) for(i=0;i<n;i++);
      |                  ^
a.cc:2:22: error: 'i' does not name a type
    2 | rep(i,n) for(i=0;i<n;i++);
      |                      ^
a.cc: In function 'int main()':
a.cc:8:11: error: 'n' was not declared in this scope
    8 |     rep(i,n){
      |           ^
a.cc:8:5: error: 'rep' was not declared in this scope
    8 |     rep(i,n){
      |     ^~~
a.cc:13:3: error: '\U00003000rep' was not declared in this scope
   13 |   　rep(i,n){
      |   ^~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,a,n)  for (int i=(int)(a); i<=(int)(n); ++i)
#define rrep(i,a,n) for (int i=(int)(a); i>=(int)(n); --i)
#define debug(x) cerr << #x << " = " << x << "\n"
#define debugv(x) rep(i, x.size()) cerr << x[i] << (i == x.size() - 1 ? "\n" : " ")
#define all(x) x.begin(),x.end()
#define int long long
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const int INF = ((1LL << 30) + (1LL << 29));
const int MOD = 1000000007;

//=============================
int N,M,K;
string S,T;
vector<int> A;
vector<int> B;
vector<string> vs(3);
//=============================
void input()
{
    rep(i,0,2){
        cin>>vs[i];
    }
    

}
//=============================
void func(){}
//=============================
void solve()
{

    rep(i,0,2){
        cout<<v[i][i]<<(i==2? "\n" : " " );
    }
}
//=============================
signed main()
{
    input();
    solve();
    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:36:15: error: 'v' was not declared in this scope
   36 |         cout<<v[i][i]<<(i==2? "\n" : " " );
      |               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  
  int A,B;
  cin >> A >> B;
  
  for(int i = A ; i <= B ; i++ ){
    
    int a = i/10000;
    int b = i/1000 - a*10;
    int c = i/100 - a*100 - b*10;
    int d = i/10 - a*1000 -b*100 -c*10;
    int e = i - a*10000 -b*1000 -c*100 -d*10;
    
    if(a == e && b == d){
      sum ++;
    }
    if(i == B){
      cout << sum << endl;
    }
  }
}
    
    
    


Compiler output:
a.cc: In function 'int main()':
a.cc:17:7: error: 'sum' was not declared in this scope
   17 |       sum ++;
      |       ^~~
a.cc:20:15: error: 'sum' was not declared in this scope
   20 |       cout << sum << endl;
      |               ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define INF 999999999
#define rep(i, n) for(int i = 0;i < n;i++)
#define pb(n) push_back(n)
#define Sort(n) sort(n.begin(), n.end())
#define Rev(n) reverse(n.begin(),n.end())
#define Out(S) cout << S << endl
#define Vecpr vector<pair<lli,lli>>
int main() {
  lli A,B,C,D;
  string a,b,c
  cin >>a>>b>>c;
  Out(a[0]+b[1]+c[2]);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: expected initializer before 'cin'
   14 |   cin >>a>>b>>c;
      |   ^~~
a.cc:15:17: error: 'c' was not declared in this scope
   15 |   Out(a[0]+b[1]+c[2]);
      |                 ^
a.cc:9:24: note: in definition of macro 'Out'
    9 | #define Out(S) cout << S << endl
      |                        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define INF 999999999
#define rep(i, n) for(int i = 0;i < n;i++)
#define pb(n) push_back(n)
#define Sort(n) sort(n.begin(), n.end())
#define Rev(n) reverse(n.begin(),n.end())
#define Out(S) cout << S << endl
#define Vecpr vector<pair<lli,lli>>
int main() {
  lii A,B,C,D;
  string a,b,c
  cin >>a>>b>>c;
  Out(a[0]+b[1]+c[2]);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: 'lii' was not declared in this scope; did you mean 'lli'?
   12 |   lii A,B,C,D;
      |   ^~~
      |   lli
a.cc:14:3: error: expected initializer before 'cin'
   14 |   cin >>a>>b>>c;
      |   ^~~
a.cc:15:17: error: 'c' was not declared in this scope
   15 |   Out(a[0]+b[1]+c[2]);
      |                 ^
a.cc:9:24: note: in definition of macro 'Out'
    9 | #define Out(S) cout << S << endl
      |                        ^
Language: C++

a,b,c=(str(x) for x in input().split())
d,e,f=(str(x) for x in input().split())
g,h,i=(str(x) for x in input().split())

print(a + e + i)


Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a,b,c=(str(x) for x in input().split())
      | ^
Language: C++

#include<iostream>
#include<iomanip>
#include<string>
#include<set>
#include<vector>
#include<utility>
#include<queue>
#include<algorithm>
#include<functional>
using namespace std;
#define LL long long
#define MOD 100000
#define inf 1999999999
#define ALL(x) (x).begin(), (x).end()
#define LBi(x, n) lower_bound(ALL(x), n) - (x).begin()
#define ZIP(x) (x).erase(unique(ALL(x)), (x).end())
#define Pi pair<int, int>
#define Vi vector<int>

#define rep(n) for(int i = 0; i < n; i++)

string s;
char c[10];
int a, b, c, d, x, m[5];

int main() {
	rep(9)cin >> c[i];
	cout << c[0] + c[4] + c[8] << endl;
	return 0;
}


Compiler output:
a.cc:24:11: error: conflicting declaration 'int c'
   24 | int a, b, c, d, x, m[5];
      |           ^
a.cc:23:6: note: previous declaration as 'char c [10]'
   23 | char c[10];
      |      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string c;
  cin>>c;
  cout<<c[1][1]<<c[2][2]<<c[3][3]<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}[int]' for array subscript
    7 |   cout<<c[1][1]<<c[2][2]<<c[3][3]<<endl;
      |             ^
a.cc:7:22: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}[int]' for array subscript
    7 |   cout<<c[1][1]<<c[2][2]<<c[3][3]<<endl;
      |                      ^
a.cc:7:31: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}[int]' for array subscript
    7 |   cout<<c[1][1]<<c[2][2]<<c[3][3]<<endl;
      |                               ^
Language: C++

#include<bits.stdc++.h>
using namespace std;

int main(){
  char c[9];
  cin << c[0] << c[1] << c[2];
  cin << c[3] << c[4] << c[5];
  cin << c[6] << c[7] << c[8];
  cout << c[0] << c[4] << c[8]; 
  return 0;
}

Compiler output:
a.cc:1:9: fatal error: bits.stdc++.h: No such file or directory
    1 | #include<bits.stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>

#define mod 1000000007

using namespace std;
typedef long long ll; 
 
int main(void){
	
	char c[3][3];
	
	for(int i=0; i<3; i++)
		for(int j=0; <3; j++)
			cin >> c[i][j];
	
	cout << c[0][0] << c[1][1] << c[2][2];
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:30: error: expected primary-expression before '<' token
   13 |                 for(int j=0; <3; j++)
      |                              ^
Language: C++

 #include "bits/stdc++.h"
  2 #define rep(i, N) for(int (i) = 0; (i) < (N); (i)++)
  3 #define debug(var) std::cout << #var << " : " << var;
  4
  5 int main() {
  6
  7     char c[3][3];
  8     rep(i,3)std::cin >> c[i][0] >> c[i][1] >> c[i][2];
  9     std::cout << c[0][0] << c[1][1] << c[2][2];
 10
 11     return 0;
 12
 13 }

Compiler output:
a.cc:2:5: error: stray '#' in program
    2 |   2 #define rep(i, N) for(int (i) = 0; (i) < (N); (i)++)
      |     ^
a.cc:3:5: error: stray '#' in program
    3 |   3 #define debug(var) std::cout << #var << " : " << var;
      |     ^
a.cc:3:37: error: stray '#' in program
    3 |   3 #define debug(var) std::cout << #var << " : " << var;
      |                                     ^
a.cc:2:3: error: expected unqualified-id before numeric constant
    2 |   2 #define rep(i, N) for(int (i) = 0; (i) < (N); (i)++)
      |   ^
a.cc:2:44: error: expected constructor, destructor, or type conversion before '<' token
    2 |   2 #define rep(i, N) for(int (i) = 0; (i) < (N); (i)++)
      |                                            ^
a.cc:2:54: error: expected constructor, destructor, or type conversion before '++' token
    2 |   2 #define rep(i, N) for(int (i) = 0; (i) < (N); (i)++)
      |                                                      ^~
a.cc:4:3: error: expected unqualified-id before numeric constant
    4 |   4
      |   ^
Language: C++

#include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include <cmath>
#include <vector>
#define rep(i, n) for(int i = 0; i < n; i++)
using namespace std;
typedef long long ll;

int main() {
    char c[3][3];
    rep(i, 3) {
        rep(j, 3) {
            cin >> c[i][j];
        }
    }

    string ans =  c[0][0] + c[1][1] + c[2][2];

    cout << ans;
    
    cout << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:37: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   19 |     string ans =  c[0][0] + c[1][1] + c[2][2];
      |                   ~~~~~~~~~~~~~~~~~~^~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string a,b,c;
  cin >>a>>b>>c;
  cout <<a[0] b[1] c[2];
  


}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: expected ';' before 'b'
    7 |   cout <<a[0] b[1] c[2];
      |              ^~
      |              ;
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  char a, b, c, d;
  for (int i = 0; i < 9; i++) {
    if (i == 0) {
      cin >> a;
    }
    else if (i == 4) {
      cin >> b;
    }
    else if (i == 8) {
      cin >> c;
    }
    else if (i % 4 != 0) {
      cin >> d;
  }
  cout << a << b << c << endl;
  return 0;
}

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

#include <bits/stdc++.h>
using namespace std;

int main() {
  char a, b, c, d;
  for (i = 0; i < 9; i++) {
    if (i = 0) {
      cin >> a;
    }
    else if (i = 4) {
      cin >> b;
    }
    else if (i = 8) {
      cin >> c;
    }
    else if (i % 4 != 0) {
      cin >> d;
  }
  cout << a << b << c << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: 'i' was not declared in this scope
    6 |   for (i = 0; i < 9; i++) {
      |        ^
a.cc:21:2: error: expected '}' at end of input
   21 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(ll i = 0; i < (ll)n; i++)
#define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF 1000000000000000
using namespace std;
typedef long long ll;
typedef double db;
typedef string str;
typedef pair<ll, ll> p;
constexpr int MOD = 1000000007;
template <class T> inline bool chmin(T &a, T b) {
    if(a > b) {
        a = b;
        return true;
    }
    return false;
}
template <class T> inline bool chmax(T &a, T b) {
    if(a < b) {
        a = b;
        return true;
    }
    return false;
}

void print(const std::vector<int> &v) {
    std::for_each(v.begin(), v.end(), [](int x) { std::cout << x << " "; });
    std::cout << std::endl;
}

int main() {
    vector<vector<char>>(3, vector<char>(3));
    REP(i, 3) {
        REP(j, 3) { cin >> c[i][k]; }
    }
    REP(i, 3) { cout << c[i][i] << endl; }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:28: error: 'c' was not declared in this scope
   35 |         REP(j, 3) { cin >> c[i][k]; }
      |                            ^
a.cc:35:33: error: 'k' was not declared in this scope
   35 |         REP(j, 3) { cin >> c[i][k]; }
      |                                 ^
a.cc:37:25: error: 'c' was not declared in this scope
   37 |     REP(i, 3) { cout << c[i][i] << endl; }
      |                         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  char c [10][10];
  cin >> c[0], c[1], c[2];
  cout << c[0][0], c[1][1], c[2][2] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:37: error: invalid operands of types 'char' and '<unresolved overloaded function type>' to binary 'operator<<'
    6 |   cout << c[0][0], c[1][1], c[2][2] << endl;
      |                             ~~~~~~~~^~~~~~~