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

#include <stdio.h>
#include <string.h>
#include <math.h>
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <functional>
using namespace std;


int main(int argc, char *args[]) {
	int c[2][2];
	for (int i = 0; i < 2; i++) {
		for (int j = 0; j < 2; j++) {
			cin >> c[i][j];
		}
	}
	int d_b1_b2 = c[1][1] - c[1][2];
	int d_b2_b3 = c[1][2] - c[1][3];
	int d_a1_a2 = c[1][1] - c[2][1];
	int d_a2_a3 = c[2][1] - c[3][1];
	if ((c[2][1] - c[2][2] == d_b1_b2) && (c[3][1] - c[3][2] == d_b1_b2) && (c[2][2] - c[2][3] == d_b2_b3) && (c[3][2] - c[3][3] == d_b2_b3) && (c[1][2] - c[2][2] == d_a1_a2) && (c[1][3] - c[2][3] == d_a1_a2) && (c[2][2] - c[3][2] == d_a2_a3) && (c[2][3] - c[3][3] == d_a2_a3) {
		cout << 'Yes' << endl;
	}
	else {
		cout << 'No' << endl;
	}
}


Compiler output:
a.cc:24:25: warning: multi-character character constant [-Wmultichar]
   24 |                 cout << 'Yes' << endl;
      |                         ^~~~~
a.cc:27:25: warning: multi-character character constant [-Wmultichar]
   27 |                 cout << 'No' << endl;
      |                         ^~~~
a.cc: In function 'int main(int, char**)':
a.cc:23:281: error: expected ')' before '{' token
   23 |         if ((c[2][1] - c[2][2] == d_b1_b2) && (c[3][1] - c[3][2] == d_b1_b2) && (c[2][2] - c[2][3] == d_b2_b3) && (c[3][2] - c[3][3] == d_b2_b3) && (c[1][2] - c[2][2] == d_a1_a2) && (c[1][3] - c[2][3] == d_a1_a2) && (c[2][2] - c[3][2] == d_a2_a3) && (c[2][3] - c[3][3] == d_a2_a3) {
      |            ~                                                                                                                                                                                                                                                                            ^~
      |                                                                                                                                                                                                                                                                                         )
a.cc:29:1: error: expected primary-expression before '}' token
   29 | }
      | ^
Language: Java

import java.util.Scanner;

public class C_takahashiInformation {

    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int c11=sc.nextInt();
        int c12=sc.nextInt();
        int c13=sc.nextInt();
        int c21=sc.nextInt();
        int c22=sc.nextInt();
        int c23=sc.nextInt();
        int c31=sc.nextInt();
        int c32=sc.nextInt();
        int c33=sc.nextInt();
        int a=c11-c21;
        int b=c12-c22;
        int d=c13-c23;
        int e=c21-c31;
        int f=c22-c32;
        int g=c23-c33;
        if(a==b&b==d&e==f&f==g) {
            System.out.println("Yes");
        }else {
            System.out.println("No");
        }
            

    }

}

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

#include<bits/stdc++.h>

using namespace std;

#define fi firs
#define se second

 #define maxn 51
const int Move[4][2] = {-1,0,1,0,0,1,0,-1};
char mp[maxn][maxn];
int step[maxn][maxn];
bool vis[maxn][maxn];
int n,m;

bool check(int x,int y) {
    if(x < 0 || y < 0|| x >= n || y >= m || vis[x][y] || mp[x][y] == '#') return false;
    return true;
}

int BFS() {
    queue<pair<int ,int> > q;
    q.push(make_pair(0,0));
    step[0][0] = 1;
    vis[0][0] = true;
    while (!q.empty()) {
        pair<int ,int> t = q.front();
        q.pop();
        for(int i = 0;i < 4;i++) {
            int tox = t.fi + Move[i][0];
            int toy = t.se + Move[i][1];
            if(tox == n - 1 && toy == m - 1) return step[t.fi][t.se] + 1;
            if(check(tox,toy)) {
                vis[tox][toy] = true;
                step[tox][toy] = step[t.fi][t.se] + 1;
                q.push(make_pair(tox,toy));
            }
        }
    }
    return -1;
}


int main(){
    cin>>n>>m;
    int cnt = 0;
    for(int i = 0;i < n;i++)
        for(int j = 0;j < m;j++) {
            cin>>mp[i][j];
            if(mp[i][j] == '#') cnt++;
        }
    int res = BFS();
    if(res == -1) {
        cout<<"-1"<<endl;
    } else {
        cout<<n*m - res - cnt<<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int BFS()':
a.cc:5:12: error: 'struct std::pair<int, int>' has no member named 'firs'; did you mean 'first'?
    5 | #define fi firs
      |            ^~~~
a.cc:29:25: note: in expansion of macro 'fi'
   29 |             int tox = t.fi + Move[i][0];
      |                         ^~
a.cc:5:12: error: 'struct std::pair<int, int>' has no member named 'firs'; did you mean 'first'?
    5 | #define fi firs
      |            ^~~~
a.cc:31:60: note: in expansion of macro 'fi'
   31 |             if(tox == n - 1 && toy == m - 1) return step[t.fi][t.se] + 1;
      |                                                            ^~
a.cc:5:12: error: 'struct std::pair<int, int>' has no member named 'firs'; did you mean 'first'?
    5 | #define fi firs
      |            ^~~~
a.cc:34:41: note: in expansion of macro 'fi'
   34 |                 step[tox][toy] = step[t.fi][t.se] + 1;
      |                                         ^~
Language: C

#include<bits/stdc++.h>

using namespace std;

#define fi firs
#define se second

 #define maxn 51
const int Move[4][2] = {-1,0,1,0,0,1,0,-1};
char mp[maxn][maxn];
int step[maxn][maxn];
bool vis[maxn][maxn];
int n,m;

bool check(int x,int y) {
    if(x < 0 || y < 0|| x >= n || y >= m || vis[x][y] || mp[x][y] == '#') return false;
    return true;
}

int BFS() {
    queue<pair<int ,int> > q;
    q.push(make_pair(0,0));
    step[0][0] = 1;
    vis[0][0] = true;
    while (!q.empty()) {
        pair<int ,int> t = q.front();
        q.pop();
        for(int i = 0;i < 4;i++) {
            int tox = t.fi + Move[i][0];
            int toy = t.se + Move[i][1];
            if(tox == n - 1 && toy == m - 1) return step[t.fi][t.se] + 1;
            if(check(tox,toy)) {
                vis[tox][toy] = true;
                step[tox][toy] = step[t.fi][t.se] + 1;
                q.push(make_pair(tox,toy));
            }
        }
    }
    return -1;
}


int main(){
    cin>>n>>m;
    int cnt = 0;
    for(int i = 0;i < n;i++)
        for(int j = 0;j < m;j++) {
            cin>>mp[i][j];
            if(mp[i][j] == '#') cnt++;
        }
    int res = BFS();
    if(res == -1) {
        cout<<"-1"<<endl;
    } else {
        cout<<n*m - res - cnt<<endl;
    }
    return 0;
}

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

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

int main(void){
	int c[3][3]={0};
	int i, j;
	int sum_a[3] = {0};
	int sum_b[3] = {0};
	int diff_a[2] = {0}; //a1 a2 a3 の差
	int diff_b[2] = {0}; //b1 b2 b3 の差

	scanf("%d%d%d%d%d%d%d%d%d", &c[0][0], &c[0][1], &c[0][2], &c[1][0], &c[1][1], &c[1][2], &c[2][0], &c[2][1], &c[2][2]);

	for(i=0;i<3;i++)
	{
		for(j=0;j<3;j++)
		{
			sum_a[i] += c[i][j] ;
		}
	}

	for(i=0;i<3;i++)
	{
		for(j=0;j<3;j++)
		{
			sum_b[i] += c[j][i] ;
		}
	}

	for(i=0;i<2;i++)
	{
		diff_a[i] = (sum_a[i+1] - sum_a[0])/3;
		diff_b[i] = (sum_b[i+1] - sum_b[0])/3;
	}
	
	for(i=1;i<3;i++)
	{
		for(j=1;j<3;j++)
		{
			if(c[i][j]!=(c[0][0] + diff_a[i-1] + diff_b[j-1]))
			{
				printf("No\n");
				return 0;
			}
		}
	}


	printf("Yes\n");
	return 0;
}

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

#include<iostream>
using namespace std;
main(){int c[9];for(int i=0;i<9;i++)cin>>c[i];cout<<((c[0]+c[4]-c[1]-c[3])|(c[0]+c[5]-c[2]-c[3])|(c[0]+c[7]-c[1]-c[6])|(c[0]+c[8]-c[2]-c[6]))?"NO":"YES" <<endl;}

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main(){int c[9];for(int i=0;i<9;i++)cin>>c[i];cout<<((c[0]+c[4]-c[1]-c[3])|(c[0]+c[5]-c[2]-c[3])|(c[0]+c[7]-c[1]-c[6])|(c[0]+c[8]-c[2]-c[6]))?"NO":"YES" <<endl;}
      | ^~~~
a.cc: In function 'int main()':
a.cc:3:154: error: invalid operands of types 'const char [4]' and '<unresolved overloaded function type>' to binary 'operator<<'
    3 | main(){int c[9];for(int i=0;i<9;i++)cin>>c[i];cout<<((c[0]+c[4]-c[1]-c[3])|(c[0]+c[5]-c[2]-c[3])|(c[0]+c[7]-c[1]-c[6])|(c[0]+c[8]-c[2]-c[6]))?"NO":"YES" <<endl;}
      |                                                                                                                                                    ~~~~~~^~~~~~
Language: C++

#include<iostream>
using namespace std;
main(){int c[9];for(int i=0;i<9;i++)cin>>c[i];cout<<((c[0]+c[4]-c[1]-c[3])|(c[0]+c[5]-c[2]-c[3])|(c[0]+c[7]-c[1]-c[6])|(c[0]+c[8]-c[2]-c[6]))?"NO":"YES"<<endl;}

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main(){int c[9];for(int i=0;i<9;i++)cin>>c[i];cout<<((c[0]+c[4]-c[1]-c[3])|(c[0]+c[5]-c[2]-c[3])|(c[0]+c[7]-c[1]-c[6])|(c[0]+c[8]-c[2]-c[6]))?"NO":"YES"<<endl;}
      | ^~~~
a.cc: In function 'int main()':
a.cc:3:153: error: invalid operands of types 'const char [4]' and '<unresolved overloaded function type>' to binary 'operator<<'
    3 | main(){int c[9];for(int i=0;i<9;i++)cin>>c[i];cout<<((c[0]+c[4]-c[1]-c[3])|(c[0]+c[5]-c[2]-c[3])|(c[0]+c[7]-c[1]-c[6])|(c[0]+c[8]-c[2]-c[6]))?"NO":"YES"<<endl;}
      |                                                                                                                                                    ~~~~~^~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <utility>
#include <stack>
#include <functional>
#include <queue>
#include <cmath>
#include <set>
#include <map>

#define rep(i,j,k) for(int i=(int)j;i<(int)k;i++)
#define Sort(x) sort((x).begin(),(x).end())
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define vi vector<int>
#define INF (int)1e9
#define INFL 1e18
#define MOD 1e9+7
#define pb push_back
#define MP make_pair
typedef long long int ll;
typedef std::pair<int,int> P;
int dx[4]={0,1,0,-1},dy[4]={1,0,-1,0};


using namespace std;


#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <utility>
#include <stack>
#include <functional>
#include <queue>
#include <cmath>
#include <set>
#include <map>

#define rep(i,j,k) for(int i=(int)j;i<(int)k;i++)
#define Sort(x) sort((x).begin(),(x).end())
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define vi vector<int>
#define INF (int)1e9
#define INFL 1e18
#define MOD 1e9+7
#define pb push_back
#define MP make_pair
typedef long long int ll;
typedef std::pair<int,int> P;
int dx[4]={0,1,0,-1},dy[4]={1,0,-1,0};


using namespace std;


int main() {
    int v[3][3];
    rep(i,0,3)rep(j,0,3){
        cin>>v[i][j];
    }
    bool f=true;
    rep(i,0,101){ // i がa1の値
        rep(j,0,101){  // j がa2の値
            rep(k,0,101){  // k がa3の値
　　　　 //b1,b2,b3について調べる
                if((v[0][0]-i==v[0][1]-j&&v[0][1]-j==v[0][2]-k)&&(v[1][0]-i==v[1][1]-j&&v[1][1]-j==v[1][2]-k)&&(v[2][0]-i==v[2][1]-j&&v[2][1]-j==v[2][2]-k)){
                    cout<<"Yes"<<endl;
                    return 0;
                }
            }
        }
    }
    cout<<"No"<<endl;
    return 0;
}


Compiler output:
a.cc:72:1: error: extended character 　 is not valid in an identifier
   72 | 　　　　 //b1,b2,b3について調べる
      | ^
a.cc:72:1: error: extended character 　 is not valid in an identifier
a.cc:72:1: error: extended character 　 is not valid in an identifier
a.cc:72:1: error: extended character 　 is not valid in an identifier
a.cc:57:5: error: redefinition of 'int dx [4]'
   57 | int dx[4]={0,1,0,-1},dy[4]={1,0,-1,0};
      |     ^~
a.cc:26:5: note: 'int dx [4]' previously defined here
   26 | int dx[4]={0,1,0,-1},dy[4]={1,0,-1,0};
      |     ^~
a.cc:57:22: error: redefinition of 'int dy [4]'
   57 | int dx[4]={0,1,0,-1},dy[4]={1,0,-1,0};
      |                      ^~
a.cc:26:22: note: 'int dy [4]' previously defined here
   26 | int dx[4]={0,1,0,-1},dy[4]={1,0,-1,0};
      |                      ^~
a.cc: In function 'int main()':
a.cc:72:1: error: '\U00003000\U00003000\U00003000\U00003000' was not declared in this scope
   72 | 　　　　 //b1,b2,b3について調べる
      | ^~~~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <utility>
#include <stack>
#include <functional>
#include <queue>
#include <cmath>
#include <set>
#include <map>

#define rep(i,j,k) for(int i=(int)j;i<(int)k;i++)
#define Sort(x) sort((x).begin(),(x).end())
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define vi vector<int>
#define INF (int)1e9
#define INFL 1e18
#define MOD 1e9+7
#define pb push_back
#define MP make_pair
typedef long long int ll;
typedef std::pair<int,int> P;
int dx[4]={0,1,0,-1},dy[4]={1,0,-1,0};


using namespace std;


int main() {
    int main() {
    int v[3][3];
    rep(i,0,3)rep(j,0,3){
        cin>>v[i][j];
    }
    bool f=true;
    rep(i,0,101){ // i がa1の値
        rep(j,0,101){  // j がa2の値
            rep(k,0,101){  // k がa3の値
　　　　 //b1,b2,b3について調べる
                if((v[0][0]-i==v[0][1]-j&&v[0][1]-j==v[0][2]-k)&&(v[1][0]-i==v[1][1]-j&&v[1][1]-j==v[1][2]-k)&&(v[2][0]-i==v[2][1]-j&&v[2][1]-j==v[2][2]-k)){
                    cout<<"Yes"<<endl;
                    return 0;
                }
            }
        }
    }
    cout<<"No"<<endl;
    return 0;
}
    return 0;
}


Compiler output:
a.cc:42:1: error: extended character 　 is not valid in an identifier
   42 | 　　　　 //b1,b2,b3について調べる
      | ^
a.cc:42:1: error: extended character 　 is not valid in an identifier
a.cc:42:1: error: extended character 　 is not valid in an identifier
a.cc:42:1: error: extended character 　 is not valid in an identifier
a.cc: In function 'int main()':
a.cc:33:13: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   33 |     int main() {
      |             ^~
a.cc:33:13: note: remove parentheses to default-initialize a variable
   33 |     int main() {
      |             ^~
      |             --
a.cc:33:13: note: or replace parentheses with braces to value-initialize a variable
a.cc:33:16: error: a function-definition is not allowed here before '{' token
   33 |     int main() {
      |                ^
Language: C++

# include <iostream>
# include <algorithm>
# include <vector>
# include <string>
# include <set>
# include <map>
# include <cmath>
# include <iomanip>
# include <functional>
# include <utility>
# include <stack>
# include <queue>
# include <list>
# include <tuple>
# include <unordered_map>
# include <numeric>
# include <complex>
# include <bitset>
using namespace std;
using LL = long long;
using ULL = unsigned long long;
typedef pair<LL, LL> P;
constexpr int INF = 2000000000;
constexpr int HINF = INF / 2;
constexpr double DINF = 100000000000000000.0;
constexpr long long LINF = 9223372036854775807;
constexpr long long HLINF = 4500000000000000000;
constexpr long long MMOD = 500000004;
const double PI = acos(-1);
int dx[4] = { 0,1,0,-1 }, dy[4] = { 1,0,-1,0 };
# define ALL(x)      (x).begin(),(x).end()
# define UNIQ(c)     (c).erase(unique(ALL((c))), end((c)))
# define mp          make_pair
# define eb          emplace_back
# define FOR(i,a,b)  for(int i=(a);i<(b);i++)
# define RFOR(i,a,b) for(int i=(a);i>=(b);i--)
# define REP(i,n)    FOR(i,0,n)
# define INIT        std::ios::sync_with_stdio(false);std::cin.tie(0)

int maze[3][3];

int main() {
	REP(i,3){
		REP (i,3)cin >> maze[i][j];
		maze[i][1] -= maze[i][0]; maze[i][2] -= maze[i][0]; maze[i][0] = 0;
	}
	REP(i,3) {
		if (!(maze[0][i] == maze[1][i] && maze[1][i] == maze[2][i])) {
			cout << "No" << endl;
			return 0;
		}
	}
	cout << "Yes" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:44:41: error: 'j' was not declared in this scope
   44 |                 REP (i,3)cin >> maze[i][j];
      |                                         ^
Language: C++

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;
using namespace __gnu_pbds;

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define fbo find_by_order
#define ook order_of_key

typedef long long ll;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef long double ld;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds;
typedef set<int>::iterator sit;
typedef map<int,int>::iterator mit;
typedef vector<int>::iterator vit;

// template from zscoder

int s[3]

int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0);
    int a[3][3];
   
    for(int i = 0; i < 3; i++)
    {
        for(int j = 0; j < 3; j++)
        {
            cin >> a[i][j];
            if(i==j)s[0] += a[i][j];
        }
    }
    s[1] = a[0][1]+a[1][2]+a[2][0];
    s[2] = a[0][2]+a[1][0]+a[2][1];
    if(s[0]==s[1]&&s[1]==s[2]) cout << "Yes" << endl;
    else cout << "No" << endl;
}

Compiler output:
a.cc:28:1: error: expected initializer before 'int'
   28 | int main()
      | ^~~
Language: C++

#include<stdio.h>
#include <algorithm>
using namespace std;
int main()
{
    int a1,a2,a3,b1,b2,b3,m[5][5];
   for(int i=1;i<=3;i++)
    for(int j=1;j<=3;j++)
    scanf("%d",&m[i][j]);
 
for(int a1=0;;a1++)
{
     int b1=m[1][1]-a1;
        int a2=m[2][1]-b1;
        int a3=m[3][1]-b1;
        int b2=m[1][2]-a1;
        int b3=m[1][3]-a1;
        if(a2+b2==c[2][2] 
            && a2+b3==c[2][3]
            && a3+b2==c[3][2] 
            && a3+b3==c[3][3])
        {
            flag = 1;
            break;
        }
}
if(flag)
printf("Yes");
else
printf("No");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:19: error: 'c' was not declared in this scope
   18 |         if(a2+b2==c[2][2]
      |                   ^
a.cc:23:13: error: 'flag' was not declared in this scope
   23 |             flag = 1;
      |             ^~~~
a.cc:27:4: error: 'flag' was not declared in this scope
   27 | if(flag)
      |    ^~~~
Language: C

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

int c[3][3];

int main(int argc, char* argv) {

        for (int i = 0; i < 3; i++) {
                for (int j = 0; j < 3; j++) {
                        scanf("%d", &c[i][j]);
                }
        }

        const int c00 = c[0][0];
        const int c01 = c[0][1];
        const int c02 = c[0][2];
        // start search
        for (int a1 = 0; a1 <= c00; a1++) {
                for (int a2 = 0; a2 <= c01; a2++) {
                        for (int a3 = 0; a3 <= c02; a3++) {
                                const int b1 = c00 - a1;
                                const int b2 = c01 - a2;
                                const int b3 = c02 - a3;

                                const int a2t = c[1][0] - b1;
                                const int a3t = c[2][0] - b1;
                                if (
                                                b1 >= 0 && b2>=0 && b3>=0
                                  (a2t == (c[1][1] - b2)) && (a2t == (c[1][2] - b3))
                                && (a3t == (c[2][1] - b2)) && (a3t == (c[2][2] - b3))) {

                                        printf("Yes\n");
                                        exit(0);
                                }
                        }
                }
        }

        printf("No\n");
        return 0;
}


Compiler output:
main.c: In function 'main':
main.c:28:73: error: called object is not a function or function pointer
   28 |                                                 b1 >= 0 && b2>=0 && b3>=0
      |                                                                         ^
Language: C++

#include <stdio.h>
#include <algorithm>
#include <functional>
int main(void){
	int N;
	int a[3][3];
	int sum=0;
	int flag = 0;
	for(int i=0;i<3;i++){
		for(int j=0;j<3;j++){
			scanf("%d",&a[i][j]);
			sum += a[i][j];
			if(a[i][j] == 0){
				flag += 1;
			}
		}
	}
	if(flag != 0){
		if((a[0][0] == a[2][0] && a[0][1] == a[2][1] && a[0][2] == a[2][2]) || (a[0][0] == a[0][2] && a[1][0] == a[1][2] && a[2][0] == a[2][2]){
		}else{
			printf("No");
			return 0;
		}
	}
	if(a[0][0] != 0 && a[1][0] == 0 && a[0][1] == 0){
		printf("No");
	}else if(a[0][1] != 0 && a[0][0] == 0 && a[1][1] == 0 && a[0][0] == 0){
		printf("No");
	}else if(a[0][2] != 0 && a[0][1] == 0 && a[1][2] == 0){
		printf("No");
	}else if(a[1][0] != 0 && a[1][1] == 0 && a[0][0] == 0 && a[2][0] == 0){
		printf("No");
	}else if(a[1][1] != 0 && a[1][0] == 0 && a[0][1] == 0 && a[1][2] == 0 && a[2][1] == 0){
		printf("No");
	}else if(a[1][2] != 0 && a[1][1] == 0 && a[2][2] == 0 && a[0][2] == 0){
		printf("No");
	}else if(a[2][0] != 0 && a[1][0] == 0 && a[2][1] == 0){
		printf("No");
	}else if(a[2][1] != 0 && a[1][1] == 0 && a[2][0] == 0 && a[2][2] == 0){
		printf("No");
	}else if(a[2][2] != 0 && a[2][1] == 0 && a[1][2] == 0){
		printf("No");
	}else if(sum % 3 != 0){
		printf("No");
	}else{
		printf("Yes");
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:152: error: expected ')' before '{' token
   19 |                 if((a[0][0] == a[2][0] && a[0][1] == a[2][1] && a[0][2] == a[2][2]) || (a[0][0] == a[0][2] && a[1][0] == a[1][2] && a[2][0] == a[2][2]){
      |                   ~                                                                                                                                    ^
      |                                                                                                                                                        )
a.cc:24:9: error: expected primary-expression before '}' token
   24 |         }
      |         ^
Language: C++

#include <stdio.h>
#include <algorithm>
#include <functional>
int main(void){
	int N;
	int a[3][3];
	int sum=0;
	int flag = 0;
	for(int i=0;i<3;i++){
		for(int j=0;j<3;j++){
			scanf("%d",&a[i][j]);
			sum += a[i][j];
			if(a[i][j] == 0){
				flag += 1;
		}
	}
	if(flag != 0){
		if((a[0][0] == a[2][0] && a[0][1] == a[2][1] && a[0][2] == a[2][2]) || (a[0][0] == a[0][2] && a[1][0] == a[1][2] && a[2][0] == a[2][2]){
		}else{
			printf("No");
			return 0;
		}
	}
	if(a[0][0] != 0 && a[1][0] == 0 && a[0][1] == 0){
		printf("No");
	}else if(a[0][1] != 0 && a[0][0] == 0 && a[1][1] == 0 && a[0][0] == 0){
		printf("No");
	}else if(a[0][2] != 0 && a[0][1] == 0 && a[1][2] == 0){
		printf("No");
	}else if(a[1][0] != 0 && a[1][1] == 0 && a[0][0] == 0 && a[2][0] == 0){
		printf("No");
	}else if(a[1][1] != 0 && a[1][0] == 0 && a[0][1] == 0 && a[1][2] == 0 && a[2][1] == 0){
		printf("No");
	}else if(a[1][2] != 0 && a[1][1] == 0 && a[2][2] == 0 && a[0][2] == 0){
		printf("No");
	}else if(a[2][0] != 0 && a[1][0] == 0 && a[2][1] == 0){
		printf("No");
	}else if(a[2][1] != 0 && a[1][1] == 0 && a[2][0] == 0 && a[2][2] == 0){
		printf("No");
	}else if(a[2][2] != 0 && a[2][1] == 0 && a[1][2] == 0){
		printf("No");
	}else if(sum % 3 != 0){
		printf("No");
	}else{
		printf("Yes");
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:152: error: expected ')' before '{' token
   18 |                 if((a[0][0] == a[2][0] && a[0][1] == a[2][1] && a[0][2] == a[2][2]) || (a[0][0] == a[0][2] && a[1][0] == a[1][2] && a[2][0] == a[2][2]){
      |                   ~                                                                                                                                    ^
      |                                                                                                                                                        )
a.cc:23:9: error: expected primary-expression before '}' token
   23 |         }
      |         ^
a.cc:48:2: error: expected '}' at end of input
   48 | }
      |  ^
a.cc:4:15: note: to match this '{'
    4 | int main(void){
      |               ^
Language: C

#include<stdio.h>

int main(){
	int c[9];
	int i;
	int flag=0
	for(i=0;i<3;i++){
		scanf("%d%d%d",&c[i],&c[i+1],&c[i+2]);
	}
	
	if(c[0]-c[1]==c[3]-c[4] && c[0]-c[1]==c[6]-c[7] && c[1]-c[2]==c[4]-c[5] && c[1]-c[2]==c[7]-c[8] && c[0]-c[3]==c[1]-c[4] && c[0]-c[3]==c[2]-c[5] && c[3]-c[6]==c[4]-c[7] && c[3]-c[6]==c[5]-c[8]){
		flag=1;
	}
	if(flag==1){
		printf("Yes");
	}else{
		printf("No");
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:9: error: expected ',' or ';' before 'for'
    7 |         for(i=0;i<3;i++){
      |         ^~~
main.c:7:24: error: expected ';' before ')' token
    7 |         for(i=0;i<3;i++){
      |                        ^
      |                        ;
main.c:7:24: error: expected statement before ')' token
Language: C++

typedef long long LL;

int main(void) {
	LL i, j, k, n, ans;
	vector<int> a(3);
	vector<int> b(3);
	vector<vector<int>> c(3, vector<int>(3));

	for (i = 0; i < 3; i++) {
		for (j = 0; j < 3; j++) {
			cin >> c[i][j];
		}
	}

	for (i = 0; i <= min(c[0][0], min(c[0][1], c[0][2])); i++) {
		for (j = 0; j <= min(c[1][0], min(c[1][1], c[1][2])); j++) {
			for (k = 0; k <= min(c[2][0], min(c[2][1], c[2][2])); k++) {
				if (((c[0][0] - i == c[1][0] - j) && (c[1][0] - j == c[2][0] - k))&&((c[0][1] - i == c[1][1] - j) && (c[1][1] - j == c[2][1] - k))&&((c[0][2] - i == c[1][2] - j) && (c[1][2] - j == c[2][2] - k))) {
					cout << "Yes" << endl;
					return 0;
				}
			}
		}
	}


	cout << "No" << endl;


	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'vector' was not declared in this scope
    5 |         vector<int> a(3);
      |         ^~~~~~
a.cc:5:16: error: expected primary-expression before 'int'
    5 |         vector<int> a(3);
      |                ^~~
a.cc:6:16: error: expected primary-expression before 'int'
    6 |         vector<int> b(3);
      |                ^~~
a.cc:7:23: error: expected primary-expression before 'int'
    7 |         vector<vector<int>> c(3, vector<int>(3));
      |                       ^~~
a.cc:11:25: error: 'cin' was not declared in this scope
   11 |                         cin >> c[i][j];
      |                         ^~~
a.cc:11:32: error: 'c' was not declared in this scope
   11 |                         cin >> c[i][j];
      |                                ^
a.cc:15:30: error: 'c' was not declared in this scope
   15 |         for (i = 0; i <= min(c[0][0], min(c[0][1], c[0][2])); i++) {
      |                              ^
a.cc:15:39: error: 'min' was not declared in this scope; did you mean 'main'?
   15 |         for (i = 0; i <= min(c[0][0], min(c[0][1], c[0][2])); i++) {
      |                                       ^~~
      |                                       main
a.cc:15:26: error: 'min' was not declared in this scope; did you mean 'main'?
   15 |         for (i = 0; i <= min(c[0][0], min(c[0][1], c[0][2])); i++) {
      |                          ^~~
      |                          main
a.cc:19:41: error: 'cout' was not declared in this scope
   19 |                                         cout << "Yes" << endl;
      |                                         ^~~~
a.cc:19:58: error: 'endl' was not declared in this scope
   19 |                                         cout << "Yes" << endl;
      |                                                          ^~~~
a.cc:27:9: error: 'cout' was not declared in this scope
   27 |         cout << "No" << endl;
      |         ^~~~
a.cc:27:25: error: 'endl' was not declared in this scope
   27 |         cout << "No" << endl;
      |                         ^~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
#include<map>
#include<list>
#include<vector>
#include<stdio.h>
#include<iomanip>
using namespace std;

int main(){

	int a[3][3];
	for(int i=0;i<3;i++){
		for(int j=0;j<3;j++){
			
		cin >> a[i][j];
		}
	}

	int maa=0,mab=0,mac=0,mad=0,mae=0,maf=0;
	maa= max(max(a[0][0],a[0][1]),a[0][2]);
	mab= max(max(a[1][0],a[1][1]),a[1][2]);
	mac= max(max(a[2][0],a[2][1]),a[2][2]);
	mad= max(max(a[0][0],a[1][0]),a[2][0]);
	mae= max(max(a[0][1],a[1][1]),a[2][1]);
	maf= max(max(a[0][2],a[1][2]),a[2][2]);

	for(int k=0;k<=maa;k++){
		for(int p=0;p<=mab;p++){
			for(int u=0;u<=mac;u++){
				for(int h=0;h<=a[0][0]-k;h++){
					for(int n=0;n<=a[1][1]-p;n++){
						for(int m=0;m<=a[2][2]-u;m++){
							if(k+h==a[0][0]&&){

								if(k+n==a[0][1]&&k+m==a[0][2]&&p+h==a[1][0]&&p+n==a[1][1]&&p+m==a[1][2]&&u+h==a[2][0]&&u+n==a[2][1]&&u+m==a[2][2]){
							cout << "Yes" << endl;
							return 0;
								}
							}
						}
					}
				}
			}
		}
	}
	cout << "No" << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:74: error: expected primary-expression before ')' token
   35 |                                                         if(k+h==a[0][0]&&){
      |                                                                          ^
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
#include<map>
#include<list>
#include<vector>
#include<stdio.h>
#include<iomanip>
using namespace std;

int main(){

	int a[3][3];
	for(int i=0;i<3;i++){
		for(int j=0;j<3;j++){
			
		cin >> a[i][j];
		}
	}

	int maa=0,mab=0,mac=0,mad=0,mae=0,maf=0;
	maa= max(max(a[0][0],a[0][1]),a[0][2]);
	mab= max(max(a[1][0],a[1][1]),a[1][2]);
	mac= max(max(a[2][0],a[2][1]),a[2][2]);
	mad= max(max(a[0][0],a[1][0]),a[2][0]);
	mae= max(max(a[0][1],a[1][1]),a[2][1]);
	maf= max(max(a[0][2],a[1][2]),a[2][2]);

	for(int k=0;k<=maa;k++){
		for(int p=0;p<=mab;p++){
			for(int u=0;u<=mac;u++){
				for(int h=0;h<=a[0][0]-k;h++){
					for(int n=0;n<=a[1][1]-p;n++){
						for(int m=0;m<=a[2][2]-u;m++){
							if(k+h==a[0][0]&&k+n==a[0][1]&&k+m==a[0][2]&&p+h==a[1][0]&&p+n==a[1][1]&&p+m==a[1][2]&&u+h==a[2][0]&&u+n==a[2][1a&&u+m==a[2][2]){
							cout << "Yes" << endl;
							return 0;
							}
						}
					}
				}
			}
		}
	}
	cout << "No" << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:168: error: unable to find numeric literal operator 'operator""a'
   35 |                                                         if(k+h==a[0][0]&&k+n==a[0][1]&&k+m==a[0][2]&&p+h==a[1][0]&&p+n==a[1][1]&&p+m==a[1][2]&&u+h==a[2][0]&&u+n==a[2][1a&&u+m==a[2][2]){
      |                                                                                                                                                                        ^~
a.cc:35:184: error: expected ']' before ')' token
   35 |                                                         if(k+h==a[0][0]&&k+n==a[0][1]&&k+m==a[0][2]&&p+h==a[1][0]&&p+n==a[1][1]&&p+m==a[1][2]&&u+h==a[2][0]&&u+n==a[2][1a&&u+m==a[2][2]){
      |                                                                                                                                                                                        ^
      |                                                                                                                                                                                        ]
Language: C++

#include<iostream>
#include<iomanip>
#include<queue>
#include<string>
#include<stack>
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<cstring>
#include<cassert>
#include<ctime>
#include<algorithm>
#include<utility>
#include<map>
#include<set>
#include<vector>
#include<functional>
#include<complex>

using namespace std;

typedef long long            ll;
typedef unsigned             ui;
typedef unsigned long long   ull;
typedef pair<int,int>        i_i;
typedef pair<ll,int>         ll_i;
typedef pair<ll,ll>          ll_ll;
typedef pair<double,int>     d_i;
typedef pair<double,double>  d_d;
typedef vector<int>          vi;
typedef vector<vector<int> > vii;

#ifdef DEBUG
#define dprintf      printf
#define dputs        puts
#define dout(x)      cout<<#x" = "<<(x)<<endl
#define darray(x,n)  {int i;rep(i,n)cout<<#x"["<<i<<"] = "<<*((x)+i)<<endl;}
#define dloop(i,s,g) for(int (i)=(s);(i)<(g);(i)++)
#define drep(i,n)    for(int (i)=0;(i)<(n);(i)++)
#define dstop()      scanf("%*c")
#else
#define dprintf      (1)?0:printf
#define dputs        (1)?0:puts
#define dout(x)
#define darray(x,n)
#define dloop(i,s,g) if(int i=0){}else
#define drep(i,n)    if(int i=0){}else
#define dstop()
#endif

#define F    first
#define S    second
#define pb   push_back
#define mp   make_pair

#define loop(i,s,g) for((i)=(s);(i)<(g);(i)++)
#define rep(i,n)    for((i)=0;(i)<(n);(i)++)
#define all(x)      (x.begin(),x.end())
#define in(T,...) T __VA_ARGS__; impl(__VA_ARGS__)
#define array(T,id,n) T id[(n)]; for(int i=0;i<(n);i++)cin>>id[i]
#define putv(n)     cout<<(n)<<endl

//#define int long long
#ifndef int
#define INF __INT32_MAX__
#else
#define INF __INT64_MAX__
#endif

#define EPS 0.0000001

void impl(){};
template <typename T,typename... TS >
void impl(T &head,TS &... tail)
{
  cin>>head;
  impl(tail ...);
}

signed main(void)
{
  int c[3][3]={};
int a[3];
int b[3];
int i,j,k;
rep(i,3)
rep(j,3)
cin>>c[i][j];
int y[3]={};
int x[3]={};
rep(i,3)
{
x[i]=c[i][0]+c[i][1]+c[i][2];
y[i]=c[0][i]+c[1][i]+c[2][i];
}
int judge=1;
rep(b[0],101)
rep(b[1],101)
rep(b[2],101)
{
judge=1;
int l;
rep(l,3){
a[l]=(y[l]+b[0]+b[1]+b[2])/3.0;
if(abs(a[l]-(y[l]+b[0]+b[1]+b[2])/3.0)>EPS)
judge=0;
}
rep(i,3)
rep(j,3)
if(a[i]+b[j]!=c[i][j])
judge=0;
if(judge==1){
puts("Yes");
exit(0);
}
puts("No");
return 0;
}


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

    #include<iostream>
    using namespace std;
    int main(){
    cout<<"Yes""<<endl;
    }

Compiler output:
a.cc:4:16: warning: missing terminating " character
    4 |     cout<<"Yes""<<endl;
      |                ^
a.cc:4:16: error: missing terminating " character
    4 |     cout<<"Yes""<<endl;
      |                ^~~~~~~~
a.cc: In function 'int main()':
a.cc:4:16: error: expected ';' before '}' token
    4 |     cout<<"Yes""<<endl;
      |                ^
      |                ;
    5 |     }
      |     ~
Language: C++

#include<bits/srdc++.h>
using namespace std;
int main(){
	int c[3][3];
	for(int i = 0; i < 3; i++)for(int j = 0; j < 3; j++) cin >> c[i][j];
	for(int i = 0; i <= 100; i++){
		for(int j = 0; j <= 100; j++){
			for(int k = 0; k <= 100; k++){
				int a[] = {i, j, k};
				int b[] = {c[0][0] - a[0], c[0][1] - a[0], c[0][2] - a[0]};
				bool po = 1;
				for(int l = 0; l < 3; l++)for(int m = 0; m < 3; m++)if(c[l][m] != a[l] + b[m]) po = 0;
				if(po){
					cout << "Yes\n";
					return 0;
				}
			}
		}
	}
	cout << "No\n";
	return 0;
}

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

    #include<iostream>
    using namespace<std>
    int main(){
    cout<<"Yes"<<endl;
    }

Compiler output:
a.cc:2:20: error: expected identifier before '<' token
    2 |     using namespace<std>
      |                    ^
a.cc:2:20: error: expected ';' before '<' token
    2 |     using namespace<std>
      |                    ^
      |                    ;
a.cc:2:20: error: expected unqualified-id before '<' token
Language: C++

#include<iostream>
#include<iomanip>
#include<queue>
#include<string>
#include<stack>
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<cstring>
#include<cassert>
#include<ctime>
#include<algorithm>
#include<utility>
#include<map>
#include<set>
#include<vector>
#include<functional>
#include<complex>

using namespace std;

typedef long long            ll;
typedef unsigned             ui;
typedef unsigned long long   ull;
typedef pair<int,int>        i_i;
typedef pair<ll,int>         ll_i;
typedef pair<ll,ll>          ll_ll;
typedef pair<double,int>     d_i;
typedef pair<double,double>  d_d;
typedef vector<int>          vi;
typedef vector<vector<int> > vii;

#ifdef DEBUG
#define dprintf      printf
#define dputs        puts
#define dout(x)      cout<<#x" = "<<(x)<<endl
#define darray(x,n)  {int i;rep(i,n)cout<<#x"["<<i<<"] = "<<*((x)+i)<<endl;}
#define dloop(i,s,g) for(int (i)=(s);(i)<(g);(i)++)
#define drep(i,n)    for(int (i)=0;(i)<(n);(i)++)
#define dstop()      scanf("%*c")
#else
#define dprintf      (1)?0:printf
#define dputs        (1)?0:puts
#define dout(x)
#define darray(x,n)
#define dloop(i,s,g) if(int i=0){}else
#define drep(i,n)    if(int i=0){}else
#define dstop()
#endif

#define F    first
#define S    second
#define pb   push_back
#define mp   make_pair

#define loop(i,s,g) for((i)=(s);(i)<(g);(i)++)
#define rep(i,n)    for((i)=0;(i)<(n);(i)++)
#define all(x)      (x.begin(),x.end())
#define in(T,...) T __VA_ARGS__; impl(__VA_ARGS__)
#define array(T,id,n) T id[(n)]; for(int i=0;i<(n);i++)cin>>id[i]
#define putv(n)     cout<<(n)<<endl

//#define int long long
#ifndef int
#define INF __INT32_MAX__
#else
#define INF __INT64_MAX__
#endif

#define EPS 0.0000001

void impl(){};
template <typename T,typename... TS >
void impl(T &head,TS &... tail)
{
  cin>>head;
  impl(tail ...);
}

signed main(void)
{
  int c[3][3]={};
int a[3];
int b[3];
int i,j,k;
rep(i,3)
rep(j,3)
cin>>c[i][j];
int y[3]={};
int x[3]={};
rep(i,3)
{
x[i]=c[i][0]+c[i][1]+c[i][2];
y[i]=c[0][i]+c[1][i]+c[2][i];
}
int judge=1;
rep(b[0],101)
rep(b[1],101)
rep(b[2],101)
{
judge=1;
int l;
rep(l,3){
a[l]=(y[l]+b[0]+b[1]+b[2])/3.0;
if(abs(a[l]-(y[l]+b[0]+b[1]+b[2])/3.0)>EPS)
judge=0;
}
rep(i,3)
rep(j,3)
if(a[i]+b[j]!=c[i])
judge=0;
if(judge==1){
puts("Yes");
exit(0);
}
puts("No");
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:110:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
  110 | if(a[i]+b[j]!=c[i])
      |    ~~~~~~~~~^~~~~~
a.cc:118:2: error: expected '}' at end of input
  118 | }
      |  ^
a.cc:81:1: note: to match this '{'
   81 | {
      | ^
Language: C++

#include<iostream>
using namespace<std>
int main(){
cout<<"Yes""<<endl;
}

Compiler output:
a.cc:4:12: warning: missing terminating " character
    4 | cout<<"Yes""<<endl;
      |            ^
a.cc:4:12: error: missing terminating " character
    4 | cout<<"Yes""<<endl;
      |            ^~~~~~~~
a.cc:2:16: error: expected identifier before '<' token
    2 | using namespace<std>
      |                ^
a.cc:2:16: error: expected ';' before '<' token
    2 | using namespace<std>
      |                ^
      |                ;
a.cc:2:16: error: expected unqualified-id before '<' token
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <string.h>
typedef long long ll;

#define MAX(x, y)	(((x) > (y))? (x) : (y))
#define MIN(x, y)	(((x) < (y))? (x) : (y))
#define ABS(x)		(((x) < 0)? (-1*(x)) : (x))
#define REPI(x,y)	for (int i=(x);i<(y);i++)
#define REPJ(x,y)	for (int j=(x);j<(y);j++)
#define MEMCLR(X)	memset((X),0,sizeof((X)))

using namespace std;
typedef vector<vector<pair<int, int>>> GRA;

int i,j,N,c[3][3];

int main() {
	cin >> c[0][0];
	cin >> c[0][1];
	cin >> c[0][2];
	cin >> c[1][0];
	cin >> c[1][1];
	cin >> c[1][2];
	cin >> c[2][0];
	cin >> c[2][1];
	cin >> c[2][2];
	
	if ((c[0][1] - c[0][0]) != (c[0][2] - c[0][1])) {cout "No";return 0;} 
	if ((c[1][1] - c[1][0]) != (c[1][2] - c[1][1])) {cout "No";return 0;} 
	if ((c[2][1] - c[2][0]) != (c[2][2] - c[2][1])) {cout "No";return 0;} 
	if ((c[1][0] - c[0][0]) != (c[2][0] - c[1][0])) {cout "No";return 0;} 
	if ((c[1][1] - c[0][1]) != (c[2][1] - c[1][1])) {cout "No";return 0;} 
	if ((c[1][2] - c[0][2]) != (c[2][2] - c[1][2])) {cout "No";return 0;} 
	
	cout << "Yes";
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:62: error: expected ';' before string constant
   30 |         if ((c[0][1] - c[0][0]) != (c[0][2] - c[0][1])) {cout "No";return 0;}
      |                                                              ^~~~~
      |                                                              ;
a.cc:31:62: error: expected ';' before string constant
   31 |         if ((c[1][1] - c[1][0]) != (c[1][2] - c[1][1])) {cout "No";return 0;}
      |                                                              ^~~~~
      |                                                              ;
a.cc:32:62: error: expected ';' before string constant
   32 |         if ((c[2][1] - c[2][0]) != (c[2][2] - c[2][1])) {cout "No";return 0;}
      |                                                              ^~~~~
      |                                                              ;
a.cc:33:62: error: expected ';' before string constant
   33 |         if ((c[1][0] - c[0][0]) != (c[2][0] - c[1][0])) {cout "No";return 0;}
      |                                                              ^~~~~
      |                                                              ;
a.cc:34:62: error: expected ';' before string constant
   34 |         if ((c[1][1] - c[0][1]) != (c[2][1] - c[1][1])) {cout "No";return 0;}
      |                                                              ^~~~~
      |                                                              ;
a.cc:35:62: error: expected ';' before string constant
   35 |         if ((c[1][2] - c[0][2]) != (c[2][2] - c[1][2])) {cout "No";return 0;}
      |                                                              ^~~~~
      |                                                              ;
Language: C++

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

using namespace std;




int main() {
    int grid[3][3]={};

    for(int i=0;i<3;i++){
        for(int j=0;j<3;j++){
            scanf("%d",&grid[i][j]);
        }
    }

    for(int i=0;i<3;i++){
        int min=INT_MAX;
        for(int j=0;j<3;j++){
            if(grid[i][j]<min){
                min=grid[i][j];
            }
        }
        if(min>=1){
            for(int j=0;j<3;j++){
                grid[i][j]-=min;
            }
        }
    }
    for(int i=0;i<3;i++){
        int min=INT_MAX;
        for(int j=0;j<3;j++){
            if(grid[j][i]<min){
                min=grid[j][i];
            }
        }
        if(min>=1){
            for(int j=0;j<3;j++){
                grid[j][i]-=min;
            }
        }
    }

    bool isOk=true;
    for(int i=0;i<3;i++){
        for(int j=0;j<3;j++){
            if(grid[i][j]!=0){
                isOk=false;
            }
        }
    }

    if(isOk){
        printf("Yes");
    }else{
        printf("No");
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:17: error: 'INT_MAX' was not declared in this scope
   29 |         int min=INT_MAX;
      |                 ^~~~~~~
a.cc:13:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   12 | #include <stack>
  +++ |+#include <climits>
   13 | 
a.cc:42:17: error: 'INT_MAX' was not declared in this scope
   42 |         int min=INT_MAX;
      |                 ^~~~~~~
a.cc:42:17: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
Language: C++

#include <algorithm>
#include <iostream>

using namespace std;

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

main(){
    int c[4][4];
    r(i,3)r(j,3)cin>>c[i][j];
    r(i,3){
        c[i][3]=c[i][0];
        c[3][i]=c[0][i];
    }
    c[3][3]=c[0][0];

    r(i,3)r(j,3){
        if(c[i][j]-c[i+1][j]!=c[i][j+1]-c[i+1][j+1])ans=false;
        if(c[i][j]-c[i][j+1]!=c[i+1][j]-c[i+1][j+1])ans=false;
    }

    cout<<(ans?"Yes":"No")<<endl;
}


Compiler output:
a.cc:8:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    8 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:18:53: error: 'ans' was not declared in this scope; did you mean 'abs'?
   18 |         if(c[i][j]-c[i+1][j]!=c[i][j+1]-c[i+1][j+1])ans=false;
      |                                                     ^~~
      |                                                     abs
a.cc:19:53: error: 'ans' was not declared in this scope; did you mean 'abs'?
   19 |         if(c[i][j]-c[i][j+1]!=c[i+1][j]-c[i+1][j+1])ans=false;
      |                                                     ^~~
      |                                                     abs
a.cc:22:12: error: 'ans' was not declared in this scope; did you mean 'abs'?
   22 |     cout<<(ans?"Yes":"No")<<endl;
      |            ^~~
      |            abs
Language: C++

#include <algorithm>
#include <iostream>
#include <cstdio>
#include <string>
#include <cmath>

using namespace std;
typedef long long LL;

#define r0(i,n) for(int i=0; i<n; i++)
#define R0(i,n) for(int i=0; i<=n; i++)
#define r1(i,n) for(int i=1; i<n; i++)
#define R1(i,n) for(int i=1; i<=n; i++)

main(){
    int c[4][4];
    r(i,3)r(j,3)cin>>c[i][j];
    r(i,3){
        c[i][3]=c[i][0];
        c[3][i]=c[0][i];
    }
    c[3][3]=c[0][0];

    r(i,3)r(j,3){
        if(c[i][j]-c[i+1][j]!=c[i][j+1]-c[i+1][j+1])ans=false;
        if(c[i][j]-c[i][j+1]!=c[i+1][j]-c[i+1][j+1])ans=false;
    }

    cout<<(ans?"Yes":"No")<<endl;
}


Compiler output:
a.cc:15:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   15 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:17:7: error: 'i' was not declared in this scope
   17 |     r(i,3)r(j,3)cin>>c[i][j];
      |       ^
a.cc:17:5: error: 'r' was not declared in this scope
   17 |     r(i,3)r(j,3)cin>>c[i][j];
      |     ^
a.cc:29:12: error: 'ans' was not declared in this scope; did you mean 'abs'?
   29 |     cout<<(ans?"Yes":"No")<<endl;
      |            ^~~
      |            abs
Language: C++


#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <queue>
#include <set>
using namespace std;

typedef long long i64;
typedef pair<i64,i64> P;

int c[3][3];

#define NO cout << "No";return 0;

int main()
{
	for(int i = 0;i < 3;i++)
	{
		for(int j = 0;j < 3;j++)
		{
			cin >> c[i][j];
		}
	}

	int dx[2] = {c[1][0] - c[0][0] , c[2][0] - c[1][0]};

	for(int j = 0;j < 3;j++)
	{
		for(int i = 0;i < 2;i++)
		{
			if(c[i][j] + dx[i] != c[i + 1][j])
			{
				NO
			}
		}
	}

	int dy[2] = {c[0][1] - c[0][0] , c[0][2] - c[0][1]};

	for(int i = 0;i < 3;i++)
	{
		for(int j = 0;j < 2;j++)
		{

			if(c[i][j] + dy[j] != c[i][j + 1])
			{

				NO
			}
		}
	}

	cout << "Yes";
	return 0;
				
	

}
kut

Compiler output:
a.cc:61:1: error: 'kut' does not name a type
   61 | kut
      | ^~~