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

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


int main() {
  int N;
  scanf("%d", &N);
  
  int t[N], x[N], y[N];
  for (int i=0; i<N; i++){
  	scanf("%d%d%d%", &t[i], &x[i], &y[i]);
  }
  
  bool t=true;
  for (int i=0; i<N;i++){
  	if (i==0) {
    	if (abs(x[0])+abs(y[0])>=t[0]) t=false;
    }
    else {
    	if (abs(x[i]-x[i-1])+abs(y[i]-y[i-1])>=t[i]-t[i-1]) t=false;
    }
  }
  
  bool s=true;
  for (int i=0; i<N && s;i++)
    if (t[i]%2 != x[i]+y[i]) s=false;
   }

	if (s&&t) cout << "Yes" << endl;
	else cout <<"No" <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:8: error: conflicting declaration 'bool t'
   14 |   bool t=true;
      |        ^
a.cc:9:7: note: previous declaration as 'int t [N]'
    9 |   int t[N], x[N], y[N];
      |       ^
a.cc:17:41: error: incompatible types in assignment of 'bool' to 'int [N]'
   17 |         if (abs(x[0])+abs(y[0])>=t[0]) t=false;
      |                                        ~^~~~~~
a.cc:20:62: error: incompatible types in assignment of 'bool' to 'int [N]'
   20 |         if (abs(x[i]-x[i-1])+abs(y[i]-y[i-1])>=t[i]-t[i-1]) t=false;
      |                                                             ~^~~~~~
a.cc: At global scope:
a.cc:29:9: error: expected unqualified-id before 'if'
   29 |         if (s&&t) cout << "Yes" << endl;
      |         ^~
a.cc:30:9: error: expected unqualified-id before 'else'
   30 |         else cout <<"No" <<endl;
      |         ^~~~
a.cc:31:1: error: expected declaration before '}' token
   31 | }
      | ^
Language: C++

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

int main() {
	int n;
	cin >> n;
	int t[n],x[n],y[n];
	bool ans[n];
	for (int i = 0;i < n;i++) {
		cin >> t[i] >> x[i] >> y[i];
		if (t[i] < x[i] + y[i]) {
			ans[i] = false;
		} else {
			if (t%2 == (x[i]+y[i])%2) {
				ans[i] = true;
			} else {
				ans[i] = false;
			}
		}
		if (ans[i]) {cout << "Yes" << endl;}
		else {cout << "No" << endl;}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:30: error: invalid operands of types 'int [n]' and 'int' to binary 'operator%'
   14 |                         if (t%2 == (x[i]+y[i])%2) {
      |                             ~^~
      |                             | |
      |                             | int
      |                             int [n]
Language: C++

#include<iostream>
#include<string>
#include<algorithm>

using namespace std;

string words[4]={"dream","dreamer","erase","eraser"};

int main(){
	int N,y[100000],x[100000],t[100000];
	cin >> N;
	bool can = true;
	for(int i=0; i<N; i++){
	    cin >> t[i] >> x[i] >> y[i];
	}
	for(int i=0; i<N; i++){
		for(int j=0; j<=t[j]; j++){
		    if(curX>x[i])
				curX--;
			else if(curX<x[i])
				curX++;
			else if(curY>y[i])
				curY--;
			else
				curY++;
			curT++;
		}
		if(x[i] != curX && y[i] != curY){
		    can = false;
			break;
		}
	}
	if(can) cout << "Yes" << endl;
	else cout << "No" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:24: error: 'curX' was not declared in this scope
   18 |                     if(curX>x[i])
      |                        ^~~~
a.cc:22:33: error: 'curY' was not declared in this scope
   22 |                         else if(curY>y[i])
      |                                 ^~~~
a.cc:26:25: error: 'curT' was not declared in this scope
   26 |                         curT++;
      |                         ^~~~
a.cc:28:28: error: 'curX' was not declared in this scope
   28 |                 if(x[i] != curX && y[i] != curY){
      |                            ^~~~
a.cc:28:44: error: 'curY' was not declared in this scope
   28 |                 if(x[i] != curX && y[i] != curY){
      |                                            ^~~~
Language: C++

#include<iostream>
#include<string>
#include<algorithm>

using namespace std;

string words[4]={"dream","dreamer","erase","eraser"};

int main(){
	int N,y[10000],x[10000],t[10000];
	cin >> N;
	int curX=0,curY=0,curT=0;
	bool can = true;
	for(int i=0; i<N; i++){
	    cin >> t[i] >> x[i] >> y[i];
	}
	for(int i=0; i<N; i++){
		for(int j=0; j<=t[j]; j++){
		    if(curX>x[i])
				x--;
			else if(curX<x[i])
				x++;
			else if(curY>y[i])
				y--;
			else
				y++;
			curT++;
		}
		if(x[i] != curX && y[i] != curY){
		    can = false;
			break;
		}
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:33: error: lvalue required as decrement operand
   20 |                                 x--;
      |                                 ^
a.cc:22:33: error: lvalue required as increment operand
   22 |                                 x++;
      |                                 ^
a.cc:24:33: error: lvalue required as decrement operand
   24 |                                 y--;
      |                                 ^
a.cc:26:33: error: lvalue required as increment operand
   26 |                                 y++;
      |                                 ^
Language: C++

#include <stdio.h>
#include <bits/stdc++.h>

using namespace std;
using ll=long long;
using ld=long double;
using P=pair<ll,ll>;
#define FOR(i,n,m) for(ll i=n; i<(ll)m;i++)
#define FORr(i,n,m) for(ll i=n; i>(ll)m; i--)
#define FORm(i,m) for(auto i=m.begin();i!=m.end();i++)
#define cinv(v,n,m) FOR(i,n,m) cin>>v.at(i)
#define coutv(v,n,m) FOR(i,n,m) cout<<v.at(i) <<" "
#define cout(n) cout<<fixed<<setprecision(n)
int main(){
  int N;
  cin>>N;

  int t,a,b;
  string  res ="Yes";
  cin>>t>>a>>b;
  int pt,pa,pb;
  if(t<a+b) res="No";
  t=pt;
  a=pa;
  b=pb;
  FOR(i,1,N){
    cin>>t>>a>>b;
    if((t-ta-abs(a-pa)+abs(b-ba))<0) res="No";
    if((t-ta-abs(a-pa)+abs(b-ba))%2==1) res="No";
  }
  cout<<res<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:11: error: 'ta' was not declared in this scope; did you mean 'pa'?
   28 |     if((t-ta-abs(a-pa)+abs(b-ba))<0) res="No";
      |           ^~
      |           pa
a.cc:28:30: error: 'ba' was not declared in this scope; did you mean 'pa'?
   28 |     if((t-ta-abs(a-pa)+abs(b-ba))<0) res="No";
      |                              ^~
      |                              pa
a.cc:29:11: error: 'ta' was not declared in this scope; did you mean 'pa'?
   29 |     if((t-ta-abs(a-pa)+abs(b-ba))%2==1) res="No";
      |           ^~
      |           pa
a.cc:29:30: error: 'ba' was not declared in this scope; did you mean 'pa'?
   29 |     if((t-ta-abs(a-pa)+abs(b-ba))%2==1) res="No";
      |                              ^~
      |                              pa
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,t,x,y;
    scanf("%d",&n);
    for(int i=1;i<=n;i++)
    {
        scanf("%d%d%d",&t,&x,&y);
        if(x+y>t)
        {
            printf("No\n");
            return 0;
        }
        if((x+y)%2==0&&t%2==1)
        {
            printf("No\n");
            return 0;
        }
        if((x+y)%2==1&&t%2==0)
        {
            printf("No\n");
            return 0;
        }
    }
    printf("Yes\n");
    return 0;
}
祈祷区

Compiler output:
a.cc:29:1: error: '\U00007948\U00007977\U0000533a' does not name a type
   29 | 祈祷区
      | ^~~~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;

int main()
{
int n,x=0,y=0,sum=0;
int sum_new;
scanf("%d",&n);
while(n--)
{
scanf("%d%d,&x,&y);
sum_new=x+y;
if(abs(sum_new-sum)!=1)
break;
sum=sum_new
}
if(n==0)
printf("Yes");
else
printf("No");
}

Compiler output:
a.cc:13:7: warning: missing terminating " character
   13 | scanf("%d%d,&x,&y);
      |       ^
a.cc:13:7: error: missing terminating " character
   13 | scanf("%d%d,&x,&y);
      |       ^~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:14:12: error: expected ')' before ';' token
   14 | sum_new=x+y;
      |            ^
      |            )
a.cc:13:6: note: to match this '('
   13 | scanf("%d%d,&x,&y);
      |      ^
a.cc:17:12: error: expected ';' before '}' token
   17 | sum=sum_new
      |            ^
      |            ;
   18 | }
      | ~
Language: C++

#include <cstdio>
#include <iostream>
#include <cmath>
using namespace std;


int main()
{
    int n;
    scanf("%d", &n);

    int flag = 1;
    int last_t = 0;
    int last_x = 0, last_y = 0;

    while(n--)
    {
        int t, x, y;
        scanf("%d %d %d", &t, &x, &y);

        int distance = abs(x - last_x) + abs(y - last_y);
        int interval = t - last_t;

        int extra = interval - distance;

        if(distance > interval || extra%2 == 1)
            flag = 0;

        last_t = t;
        last_x = x, last_y = y;
    }
    if(flag==10
    printf( "Yes\n");
    else
    printf("No\n");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:16: error: expected ';' before 'printf'
   32 |     if(flag==10
      |                ^
      |                ;
   33 |     printf( "Yes\n");
      |     ~~~~~~      
a.cc:34:5: error: expected primary-expression before 'else'
   34 |     else
      |     ^~~~
a.cc:33:22: error: expected ')' before 'else'
   33 |     printf( "Yes\n");
      |                      ^
      |                      )
   34 |     else
      |     ~~~~              
a.cc:32:7: note: to match this '('
   32 |     if(flag==10
      |       ^
Language: C++

#include <cstdio>

#define abs(x) (x > 0 ? (x) : -(x))

int main()
{
    int no_of_steps;
    scanf("%d", &no_of_steps);

    int is_possible = true;
    int last_time = 0;
    int last_x = x, last_y = y;

    while(no_of_steps--)
    {
        int time, x, y;
        scanf("%d %d %d", &time, &x, &y);

        int distance = abs(x - last_x) + abs(y - last_y);
        int interval = time - last_time;

        int excess_time = interval - distance;

        if(distance > interval || excess_time%2 == 1)
            is_possible = false;

        last_time = time;
        last_x = x, last_y = y;
    }

    printf(is_possible ? "Yes\n" : "No\n");
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:18: error: 'x' was not declared in this scope
   12 |     int last_x = x, last_y = y;
      |                  ^
a.cc:19:50: error: 'last_y' was not declared in this scope; did you mean 'last_x'?
   19 |         int distance = abs(x - last_x) + abs(y - last_y);
      |                                                  ^~~~~~
a.cc:3:17: note: in definition of macro 'abs'
    3 | #define abs(x) (x > 0 ? (x) : -(x))
      |                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int n,t[1000009],x[100009],y[1000009];
int main(int argc, char const *argv[])
{
    cin>>n;
    for (int i = 0; i < n; ++i)
    {
        cini>>t[i]>>x[i]>>y[i];

    }
    for (int i = 1; i <= n; ++i)
    {
        int p1 = t [i]-t[i-1];
        int p2 = abs (x[i]-x[i-1]);
        int p3 = abs (y[i]-y[i-1]);
        if (p1 < p2 + p3 || (p2+p3)%2 != p1 %2) {
            cout<<"No"<<endl; return 0;
        }
        cout<<"Yes"<<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:9:9: error: 'cini' was not declared in this scope
    9 |         cini>>t[i]>>x[i]>>y[i];
      |         ^~~~
Language: C++

#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <cmath>
using namespace std;
int n,x,y,t,x1=0,y1=0;
int main()
{
	ios::sync_with_stdio(false);
	cin>>n;
	while(n--)
	{
		cin>>x>>y>>t;
		int p=abs(x-x1)+abs(y-y1);
		if(p>t)goto k;
		x1=x;y1=y;
	}
	cout<<"Yes";
	return 0;
	k:;
	cout<<"No";
	return 0;
}

Compiler output:
a.cc:6:18: error: 'int y1' redeclared as different kind of entity
    6 | int n,x,y,t,x1=0,y1=0;
      |                  ^~
In file included from /usr/include/features.h:523,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h:683,
                 from /usr/include/c++/14/cstdio:41,
                 from a.cc:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:257:1: note: previous declaration 'double y1(double)'
  257 | __MATHCALL (y1,, (_Mdouble_));
      | ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:14:38: error: invalid operands of types 'int' and 'double(double) noexcept' to binary 'operator-'
   14 |                 int p=abs(x-x1)+abs(y-y1);
      |                                     ~^~~
      |                                     | |
      |                                     | double(double) noexcept
      |                                     int
a.cc:16:24: error: assignment of function 'double y1(double)'
   16 |                 x1=x;y1=y;
      |                      ~~^~
Language: C++

#include <cstdio>
#include <cstdlib>
using namespace std;
int n,x,y,t;
int main()
{
	ios::sync_with_stdio(false);
	cin>>n;
	while(n--)
	{
		cin>>x>>y;
		int p=x+y;
		if(p>t)goto k;
	}
	cout<<"Yes";
	return 0;
	k:;
	cout<<"No";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'ios' has not been declared
    7 |         ios::sync_with_stdio(false);
      |         ^~~
a.cc:8:9: error: 'cin' was not declared in this scope
    8 |         cin>>n;
      |         ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <cstdlib>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:15:9: error: 'cout' was not declared in this scope
   15 |         cout<<"Yes";
      |         ^~~~
a.cc:15:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
	int n;
	int t[110000],x[110000],y[110000];
	cin>>n;
	t[0]=x[0]=y[0]=0;
	for (int i=0,i<n;++i) cin>>t[i+1]>>x[i+1]>>y[i+1];

	bool done = true;
    for (int i = 0; i < n; ++i)
    {
    int dt = t[i+1]-t[i];
    int dist = abs(x[i+1]-x[i+1]-x[i])+abs(y[i+1]-y[i]);
    if (dt < dist) done =false;
    if (dist %2 != dt%2) can = false;
    }
    if (done) cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: error: expected ';' before '<' token
    9 |         for (int i=0,i<n;++i) cin>>t[i+1]>>x[i+1]>>y[i+1];
      |                       ^
      |                       ;
a.cc:9:23: error: expected primary-expression before '<' token
a.cc:17:26: error: 'can' was not declared in this scope; did you mean 'tan'?
   17 |     if (dist %2 != dt%2) can = false;
      |                          ^~~
      |                          tan
Language: C++

#include <iostream>
#include <cstdlib>

using namespace std;

int main()
{
    int n; cin >> n;
    int t[n] = {0}, x[n] = {0}, y[n] = {0};

    bool traveling = true;

    for (int i = 1; i <= n; i++) {
        cin >> t[i] >> x[i] >> y[i];
        dt = t[i] - t[i - 1];
        ds = abs(x[i] - x[i - 1]) + abs(y[i] - y[i - 1]);

        // 旅行がプラン実行が不可能な場合
        if ((dt < ds) || (ds % 2 == 0 && dt % 2 != 0) || (ds % 2 != 0 && dt % 2 == 0)) traveling = false;
    }

    if (traveling) cout << "Yes" << endl;
    else           cout << "No" << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: 'dt' was not declared in this scope; did you mean 't'?
   15 |         dt = t[i] - t[i - 1];
      |         ^~
      |         t
a.cc:16:9: error: 'ds' was not declared in this scope
   16 |         ds = abs(x[i] - x[i - 1]) + abs(y[i] - y[i - 1]);
      |         ^~
Language: Java

import java.util.Scanner;

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

        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int[] t = new int[110000];
        int[] x = new int[110000];
        int[] y = new int[110000];
        t[0] = 0;
        x[0] = 0;
        y[0] = 0;
        for (int i = 0; i < N; i++) {
            t[i+1] = scanner.nextInt();
            x[i+1] = scanner.nextInt();
            y[i+1] = scanner.nextInt();
        }

        boolean result = true;

        for (int i = 0; i < N; i++) {
            int dt = t[i + 1] - t[i];
            int dist = Math.abs(x[i + 1] - x[i]) + Math.abs(y[i + 1] - y[i]);
            if (dt < dist) {
                result = false;
                break;
            }
            if (dt % 2 != dist %2) {
                result = false;
                break;
            }
        }

        if (result) {
            System.out.println("Yes");
        }else {
            System.out.println("No");
        }
    }


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

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
    int n;
    cin >> n;
    vector<int> ts(n + 1, 0);
    vector< pair<int, int> > dists(n + 1);
    dists[0] = {0, 0};
    for (int i = 1; i <= n; ++i) {
        int t, x, y;
        cin >> t >> x >> y;
        ts[i] = t;
        dists[i] = make_pair(x, y);
    }
    for (int i = 0; i < n - 1; ++i) {
        ///マンハッタン距離を計算
        int diff = abs(dists[i + 1].first - dists[i].first) + abs(dists[i + 1].second - dists[i].second);
        int t_diff = ts[i + 1] - ts[i];
        if(diff > t_diff)
        {
            cout << "No" << endl;
            return 0;
        }else{
            if(diff != t_diff)
            {
                int rest = t_diff - diff;
                if(rest % 2 != 0)
                {
                    cout << "No" << endl;
                    return 0;
                }
            }

Compiler output:
a.cc: In function 'int main()':
a.cc:36:14: error: expected '}' at end of input
   36 |             }
      |              ^
a.cc:27:14: note: to match this '{'
   27 |         }else{
      |              ^
a.cc:36:14: error: expected '}' at end of input
   36 |             }
      |              ^
a.cc:19:37: note: to match this '{'
   19 |     for (int i = 0; i < n - 1; ++i) {
      |                                     ^
a.cc:36:14: error: expected '}' at end of input
   36 |             }
      |              ^
a.cc:7:12: note: to match this '{'
    7 | int main() {
      |            ^
Language: C++

#include <iostream>
using namespace std;

int main() {
  int n;
  cin >> n;
  std::vector<int> t, x, y;
  t.resize(n);
  x.resize(n);
  y.resize(n);
  for (int i = 0; i < n; ++i) {
    cin >> t[i] >> t[x] >> t[y];
  }
  int time = 0, posx = 0, posy = 0;
  for (int i = 0; i < n - 1; ++i) {
    int tdiff = t[i] - time;
    int xdiff = x[i] - posx;
    int ydiff = y[i] - posy;
    int posdiff = xdiff + ydiff;
    if (tdiff < posdiff || (podiff - tdiff)/2 == 1) {
      cout << "No\n";
      return 0;
    }
    time = t[i];
    posx = x[i];
    posy = y[i];
  }
  cout << "Yes\n";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: 'vector' is not a member of 'std'
    7 |   std::vector<int> t, x, y;
      |        ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:7:15: error: expected primary-expression before 'int'
    7 |   std::vector<int> t, x, y;
      |               ^~~
a.cc:8:3: error: 't' was not declared in this scope
    8 |   t.resize(n);
      |   ^
a.cc:9:3: error: 'x' was not declared in this scope
    9 |   x.resize(n);
      |   ^
a.cc:10:3: error: 'y' was not declared in this scope
   10 |   y.resize(n);
      |   ^
a.cc:20:29: error: 'podiff' was not declared in this scope; did you mean 'posdiff'?
   20 |     if (tdiff < posdiff || (podiff - tdiff)/2 == 1) {
      |                             ^~~~~~
      |                             posdiff
Language: C

#include <stdio.h>
int main() {
	int n, t[100001], x[100001], y[100001],i;
	scanf_s("%d", &n);
	for (i = 0; i < n; i++)scanf_s("%d %d %d", &t[i], &x[i], &y[i]);
	for (i = 0; i < n - 1; i++) {
		int dt = t[i + 1] - t[i], dx = x[i + 1] - x[i], dy = y[i + 1] - y[i];
		if (dx + dy < dt && (dt - dx - dy) % 2==0) {
			printf("Yes");
			return 0;
		}
	}
	printf("No");
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    4 |         scanf_s("%d", &n);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <iostream>
#include <math.h>
int main(){
	int N;
	std::cin>>N;
	int t[N+1],x[N+1],y[N+1];
	t[0]=0;x[0]=0;y[0]=0;
	for(int i=0;i<N;i++){
		std::cin>>t[i+1]>>x[i+1]>>y[i+1];
	}
	for(int i=1;i<N+1;i++){
		int work=abs(x[i]-x[i-1])+abs(y[i-1]-y[i]);
		if((work-(t[i]-t[i-1])%2 == 1 || work > t[i]-t[i-1]){
			std::cout<<"No"<<std::endl;
			return 0;
		}
	}
	std::cout<<"Yes"<<std::endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:69: error: expected ')' before '{' token
   13 |                 if((work-(t[i]-t[i-1])%2 == 1 || work > t[i]-t[i-1]){
      |                   ~                                                 ^
      |                                                                     )
a.cc:17:9: error: expected primary-expression before '}' token
   17 |         }
      |         ^
Language: C++

#include <stdio.h>
#include <math.h>

int main(void) {
  int x, y;
  int bf_x, bf_y;
  int tn, tn1;
  int n;
  int i;
  int bool, dist, time;

  tn = 0;
  bf_x = bf_y = 0;
  bool = 1;
  scanf("%d", &n);

  for (i	= 0; i < n; i++) {
    scanf("%d%d%d", &tn1, &x, &y);
    dist = abs(x - bf_x) + abs(y - bf_y);
    time = tn1 - tn;
    if (dist <= time &&	(time -	dist) %	2 == 0) {
      bool = bool;
    } else {
      bool = 0;
    }
    bf_x = x; bf_y = y;
    tn = tn1;
  }

  printf("%s\n", bool ? "Yes" : "No");
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: expected unqualified-id before ',' token
   10 |   int bool, dist, time;
      |           ^
a.cc:10:3: error: two or more data types in declaration of 'dist'
   10 |   int bool, dist, time;
      |   ^~~
a.cc:10:3: error: two or more data types in declaration of 'time'
a.cc:14:8: error: expected unqualified-id before '=' token
   14 |   bool = 1;
      |        ^
a.cc:19:5: error: 'dist' was not declared in this scope
   19 |     dist = abs(x - bf_x) + abs(y - bf_y);
      |     ^~~~
a.cc:20:5: error: 'time' was not declared in this scope
   20 |     time = tn1 - tn;
      |     ^~~~
a.cc:3:1: note: 'time' is defined in header '<ctime>'; this is probably fixable by adding '#include <ctime>'
    2 | #include <math.h>
  +++ |+#include <ctime>
    3 | 
a.cc:22:12: error: expected unqualified-id before '=' token
   22 |       bool = bool;
      |            ^
a.cc:24:12: error: expected unqualified-id before '=' token
   24 |       bool = 0;
      |            ^
a.cc:30:18: error: expected primary-expression before 'bool'
   30 |   printf("%s\n", bool ? "Yes" : "No");
      |                  ^~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
    int N;
    int t[100100], x[100100], y[100100];
    cin >> N;
    t[0] = x[0] = y[0] = 0;
    for(int i = 0; i < n; i++) {
        cin >> t[i + 1] >> x[i + 1] >> y[i + 1];
    }

    bool can = true;
    for(int i = 0; i < N; i++) {
        int dt = t[i + 1] - t[i];
        int dist = abs(x[i + 1] - x[i]) + abs(y[i + 1] - y[i]);
        if(dt < dist || (dist % 2 != dt % 2)) {
            can = false;
        }
    }

    if(can) {
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:24: error: 'n' was not declared in this scope
    9 |     for(int i = 0; i < n; i++) {
      |                        ^
Language: C++

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


int main()
{
  int n,t[100100],x[100100],y[100100];
  cin >> n;
  t[0] = 0;
  x[0] = 0;
  y[0] = 0;
  int tt = t[0];
  bool flag = false;
  for(int i = 1;i <= n;i++){
    cin >> t[i] >> x[i] >> y[i];
  }
  for(int i = 1;i <= n;i++){
    if((abs((x[i] - x[j])) + abs((y[i] - y[j])))> (t[i] - tt)){
      flag = false;
      break;
    }
    if((abs((x[i] - x[j])) + abs((y[i] - y[j])))%2 == (t[i] - tt)%2){
      flag = true;
    } else{
      flag = false;
      break;
    }
    tt = t[i];
  }
  if(flag) cout << "Yes" << endl;
  else cout << "No" << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:23: error: 'j' was not declared in this scope
   18 |     if((abs((x[i] - x[j])) + abs((y[i] - y[j])))> (t[i] - tt)){
      |                       ^
a.cc:22:23: error: 'j' was not declared in this scope
   22 |     if((abs((x[i] - x[j])) + abs((y[i] - y[j])))%2 == (t[i] - tt)%2){
      |                       ^
Language: C++

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


int main()
{
  int n,t[100100],x[100100],y[100100];
  cin >> n;
  t[0] = 0;
  x[0] = 0;
  y[0] = 0;
  tt = t[0];
  bool flag = false;
  for(int i = 1;i <= n;i++){
    cin >> t[i] >> x[i] >> y[i];
  }
  for(int i = 1;i <= n;i++){
    if((abs((x[i] - x[j])) + abs((y[i] - y[j])))> (t[i] - tt)){
      flag = false;
      break;
    }
    if((abs((x[i] - x[j])) + abs((y[i] - y[j])))%2 == (t[i] - tt)%2){
      flag = true;
    } else{
      flag = false;
      break;
    }
    tt = t[i];
  }
  if(flag) cout << "Yes" << endl;
  else cout << "No" << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: 'tt' was not declared in this scope; did you mean 't'?
   12 |   tt = t[0];
      |   ^~
      |   t
a.cc:18:23: error: 'j' was not declared in this scope
   18 |     if((abs((x[i] - x[j])) + abs((y[i] - y[j])))> (t[i] - tt)){
      |                       ^
a.cc:22:23: error: 'j' was not declared in this scope
   22 |     if((abs((x[i] - x[j])) + abs((y[i] - y[j])))%2 == (t[i] - tt)%2){
      |                       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int k[112345],l[112345],m[112345];
  cin>>n;
  for(int i=0;i<n;i++){
    cin>>k[i]>>l[i]>>m[i];
  }
  if(n==1){
    if(k[0]<l[0]+m[i]) cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
  }
  else{
    for(int i=1;i<n;i++){
      if((k[i]-k[i-1])%2!=max(l[i-1]+m[i-1],l[i]+m[i])-min(l[i-1]+m[i-1],l[i]+m[i])){
        cout<<"No"<<endl;
        return 0;
      }
    }
    cout<<"Yes"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: 'n' was not declared in this scope
    5 |   cin>>n;
      |        ^
a.cc:10:20: error: 'i' was not declared in this scope
   10 |     if(k[0]<l[0]+m[i]) cout<<"Yes"<<endl;
      |                    ^
Language: C++

#include <bits/stdc++.h>
 
using namespace std;
 
int main() {

   int n;
   cin >> n;

   int  t[n];
   int a[n];
   int b[n];
   
   for (int i=0;i<n;i++) {
      cin >> t[i]  >> a[i] >> b[i];
}
   int x=0;
   for (int j=0;j<n;j++) {
      if (abs(a[j]-a[j+1])+abs(b[j]-b[j+1])<=t[j+1]-t[j]&&(abs(a[j]-a[j+1])+abs(b[j]b[j+1]))%2==t[j]%2)
         x++;
      else
         break;
}
   if (x==n) {
      cout << "Yes";
}
   else {
      cout << "No";
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:85: error: expected ')' before 'b'
   19 |       if (abs(a[j]-a[j+1])+abs(b[j]-b[j+1])<=t[j+1]-t[j]&&(abs(a[j]-a[j+1])+abs(b[j]b[j+1]))%2==t[j]%2)
      |                                                                                ~    ^
      |                                                                                     )
Language: C++

using namespace std;
 
int main() {

   int n;
   cin >> n;

   int  t[n];
   int a[n];
   int b[n];
   
   for (int i=0;i<n;i++) {
      cin >> t[i]  >> a[i] >> b[i];
}
   int x=0;
   for (int j=0;j<n;j++) {
      if (abs(a[j]-a[j+1])+abs(b[j]-b[j+1])<=t[j+1]-t[j]&&(abs(a[j]-a[j+1])+abs(b[j]b[j+1]))%2==t[j]%2)
         x++;
      else
         break;
}
   if (x==n) {
      cout << "Yes";
   else
      cout << "No";
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:4: error: 'cin' was not declared in this scope
    6 |    cin >> n;
      |    ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:17:11: error: 'abs' was not declared in this scope
   17 |       if (abs(a[j]-a[j+1])+abs(b[j]-b[j+1])<=t[j+1]-t[j]&&(abs(a[j]-a[j+1])+abs(b[j]b[j+1]))%2==t[j]%2)
      |           ^~~
a.cc:17:85: error: expected ')' before 'b'
   17 |       if (abs(a[j]-a[j+1])+abs(b[j]-b[j+1])<=t[j+1]-t[j]&&(abs(a[j]-a[j+1])+abs(b[j]b[j+1]))%2==t[j]%2)
      |                                                                                ~    ^
      |                                                                                     )
a.cc:23:7: error: 'cout' was not declared in this scope
   23 |       cout << "Yes";
      |       ^~~~
a.cc:23:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:24:4: error: expected '}' before 'else'
   24 |    else
      |    ^~~~
a.cc:22:14: note: to match this '{'
   22 |    if (x==n) {
      |              ^
a.cc:25:7: error: 'cout' was not declared in this scope
   25 |       cout << "No";
      |       ^~~~
a.cc:25:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc: At global scope:
a.cc:27:1: error: expected declaration before '}' token
   27 | }
      | ^
Language: C++

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

using namespace std;

int main(){
    int N;
    int t[110000];
    int x[110000];
    int y[110000];

    int t[0]=0;
    int x[0]=0;
    int y[0]=0;

    cin>>N;
    for(int i=1;i<=N;i++){
        cin>>t[i]>>x[i]>>y[i];
    }
    
    bool flag=true;
    for(int i=1;i<=N;i++){
        int t0=abs(t[i]-t[i-1]);
        int x0=abs(x[i]-x[i-1]);
        int y0=abs(y[i]-y[i-1]);

        if((x0+y0)>t0){
            flag=false;
        }
        if((x0+y0)%2!=t0%2)        
        flag=false;
    }
    if(flag)cout<<"Yes";
    else cout<<"No";
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: conflicting declaration 'int t [0]'
   12 |     int t[0]=0;
      |         ^
a.cc:8:9: note: previous declaration as 'int t [110000]'
    8 |     int t[110000];
      |         ^
a.cc:13:9: error: conflicting declaration 'int x [0]'
   13 |     int x[0]=0;
      |         ^
a.cc:9:9: note: previous declaration as 'int x [110000]'
    9 |     int x[110000];
      |         ^
a.cc:14:9: error: conflicting declaration 'int y [0]'
   14 |     int y[0]=0;
      |         ^
a.cc:10:9: note: previous declaration as 'int y [110000]'
   10 |     int y[110000];
      |         ^
Language: C++

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

using namespace std;

int main(){
    int N;
    int t[10001];
    int x[10001];
    int y[10001];

    int t[0]=0;
    int x[0]=0;
    int y[0]=0;

    cin>>N;
    for(int i=1;i<=N;i++){
        cin>>t[i]>>x[i]>>y[i];
    }
    
    bool flag=true;
    for(int i=1;i<=N;i++){
        int t0=abs(t[i]-t[i-1]);
        int x0=abs(x[i]-x[i-1]);
        int y0=abs(y[i]-y[i-1]);

        if((x0+y0)>t0){
            flag=false;
        }
        if((x0+y0)%2!=t0%2)        
        flag=false;
    }
    if(flag)cout<<"Yes";
    else cout<<"No";
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: conflicting declaration 'int t [0]'
   12 |     int t[0]=0;
      |         ^
a.cc:8:9: note: previous declaration as 'int t [10001]'
    8 |     int t[10001];
      |         ^
a.cc:13:9: error: conflicting declaration 'int x [0]'
   13 |     int x[0]=0;
      |         ^
a.cc:9:9: note: previous declaration as 'int x [10001]'
    9 |     int x[10001];
      |         ^
a.cc:14:9: error: conflicting declaration 'int y [0]'
   14 |     int y[0]=0;
      |         ^
a.cc:10:9: note: previous declaration as 'int y [10001]'
   10 |     int y[10001];
      |         ^
Language: C++

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

using namespace std;

int main(){
    int N;
    int t[10001]={0};
    int x[10001]={0};
    int y[10001]={0};

    cin>>N;
    for(int i=1;i<=N;i++){
        cin>>t[i]>>x[i]>>y[i];
    }
    
    bool flag=true;
    for(int i=0;i<N;i++){
        int t0=abs(t[i]-t[i-1]);
        int x0=abs(x[i]-x[i-1]);
        int y0=abs(y[i]-y[i-1]);

        if((x0+y0)>t0){
            flag=false;
        }
        if((x0+y0)%2!=t0%2){        
        flag=false;
    }
    if(flag)cout<<"Yes";
    else cout<<"No";
    
    return 0;
}


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

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

using namespace std;

int main(){
    int N;
    int t[10001]={0};
    int x[10001]={0};
    int y[10001]={0};

    cin>>N;
    for(int i=1;i<=N;i++){
        cin>>t[i]>>x[i]>>y[i];
    }
    
    bool flag=true;
    for(int i=0;i<N;i++){
        int t0=abs(t[i]-t[i-1]);
        int x0=abs(x[i]-x[i-1]);
        int y0=abs(y[i]-y[i-1]);

        if((x0+y0)>t0){
            flag=false;
        }
        if((x0+y0)%2!=t0%2){        
        else flag=false;
    }
    if(flag)cout<<"Yes";
    else cout<<"No";
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:9: error: expected '}' before 'else'
   27 |         else flag=false;
      |         ^~~~
a.cc:26:28: note: to match this '{'
   26 |         if((x0+y0)%2!=t0%2){
      |                            ^
Language: C++

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

using namespace std;

int main(){
    int N;
    int t[10001]={0};
    int x[10001]={0};
    int y[10001]={0};

    cin>>N;
    for(int i=1;i<=N;i++){
        cin>>t[i]>>x[i]>>y[i];
    }
    
    bool flag=true;
    for(int i=0;i<N;i++){
        int t0=abs(t[i]-t[i-1]);
        int x0=abs(x[i]-x[i-1]);
        int y0=abs(y[i]-y[i-1]);

        if((x0+y0)>t0){
            flag=false;
            break;
        }else{
        if((x0+y0)%2==t0%2){
            break;
        }
        else flag=false;
    }
    if(flag)cout<<"Yes";
    else cout<<"No";
    
    return 0;
}

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

#include<iostream>

using namespace std;

int main(){
    int N;
    int t[10001]={0};
    int x[10001]={0};
    int y[10001]={0};

    cin>>N;
    for(int i=1;i<=N;i++){
        cin>>t[i]>>x[i]>>y[i];
    }
    
    bool flag=true;
    for(int i=0;i<N;i++){
        int t0=abs(t[i]-t[i-1]);
        int x0=abs(x[i]-x[i-1]);
        int y0=abs(y[i]-y[i-1]);

        if((x0+y0)>t0){
            flag=false;
            break;
        }else{
        if((x0+y0)%2==t0%2){
            break;
        }
        else flag=false;
    }
    if(flag)cout<<"Yes";
    else cout<<"No";

    return 0;
}

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

#include<iostream>
#include <complex>
using namespace std;
int main(){
  typedef struct{
    int time;
    int x;
    int y;
  }coord;
  int N;
  cin >> N;
  vector<coord> I;
  
  I.resize(N);
  for(int i=0;i < N; i++){
    cin >> I[i].time >> I[i].x >> I[i].y;
  }
  int flag = 1;
  for(int i=0;i<N-1;i++){
    int A = abs(I[i+1].x - I[i].x) + abs(I[i+1].y - I[i].y);
    int delt = I[i+1].time - I[i].time;
    if((delt % A)%2 != 0){flag = -1;break;}
  }
  if(flag == 1)cout << "Yes" <<endl;
  else cout << "No" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: 'vector' was not declared in this scope
   12 |   vector<coord> I;
      |   ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include <complex>
  +++ |+#include <vector>
    3 | using namespace std;
a.cc:12:15: error: expected primary-expression before '>' token
   12 |   vector<coord> I;
      |               ^
a.cc:12:17: error: 'I' was not declared in this scope
   12 |   vector<coord> I;
      |                 ^
Language: C++

#include <cstdio>
#include <iostream>
#include <vector>
#include <queue>
#include <cstring>
#include <algorithm>
#include <set>
#include <string>
//#include <cmath>
using namespace std;
int q,x,y,m,n,k,t,p,x,y,x1,y1,t1;
bool le;char ch;
int main()
{
    scanf("%d",&n);
    x=y=t=0;
    for(int i=1;i<=n;++i)
    {
        scanf("%d%d%d",&t1,&x1,&y1);
        p=abs(x-x1)+abs(y-y1);
        if(t1-t<m||(t1-t-m)%2==1)
        {
            printf("No\n");
            return 0;
        }
        x=x1;
        y=y1;
        t=t1;
    }
    printf("Yes\n");
    return 0;
}


Compiler output:
a.cc:11:21: error: redefinition of 'int x'
   11 | int q,x,y,m,n,k,t,p,x,y,x1,y1,t1;
      |                     ^
a.cc:11:7: note: 'int x' previously declared here
   11 | int q,x,y,m,n,k,t,p,x,y,x1,y1,t1;
      |       ^
a.cc:11:23: error: redefinition of 'int y'
   11 | int q,x,y,m,n,k,t,p,x,y,x1,y1,t1;
      |                       ^
a.cc:11:9: note: 'int y' previously declared here
   11 | int q,x,y,m,n,k,t,p,x,y,x1,y1,t1;
      |         ^
a.cc:11:28: warning: built-in function 'y1' declared as non-function [-Wbuiltin-declaration-mismatch]
   11 | int q,x,y,m,n,k,t,p,x,y,x1,y1,t1;
      |                            ^~
Language: C++

include<iostream>
using namespace std;

int main(){

    int N;
    cin >> N;
    
    int t[11000],x[11000],y[11000];
    t[0] = x[0] = y[0] = 0;

    for(int i = 0; i < N; i++){
        cin >> t[i+1] >> x[i+1] >> y [i+1];   
    }

    bool can = true;

    for(int i=0; i < N; i++){
        int dt = t[i+1] - t[i]; //移動できる回数
        int dist = abs(x[i+1] - x[i]) + abs(y[i+1] - y[i]); //移動したい距離
        if(dt < dist) can = false;
        if(dt % 2 != dist % 2) can = false;                                                                                                                                                                              

    }

    if (can) cout <<"Yes\n";
    else cout <<"No\n";
    
    

}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin >> N;
      |     ^~~
a.cc:20:20: error: 'abs' was not declared in this scope
   20 |         int dist = abs(x[i+1] - x[i]) + abs(y[i+1] - y[i]); //移動したい距離
      |                    ^~~
a.cc:26:14: error: 'cout' was not declared in this scope
   26 |     if (can) cout <<"Yes\n";
      |              ^~~~
a.cc:27:10: error: 'cout' was not declared in this scope
   27 |     else cout <<"No\n";
      |          ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n, t, x, y;
  cin>> n;
  
  int nt = 0, nx = 0, ny = 0;
  bool no = false;
  
  for(int i = 0; i < n; i++) {
    cin>> t >> x >> y;
    int d = abs(x - nx) + abs(y -ny);
    if(t - nt < d || t - nt >= d && (t - nt - d) % 2) == 1) no = true;
    nt = t;
    nx = x;
    ny = y;
  }
  
  if(no) cout<< "No" <<endl;
  else   cout<< "Yes" <<endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:55: error: expected primary-expression before '==' token
   14 |     if(t - nt < d || t - nt >= d && (t - nt - d) % 2) == 1) no = true;
      |                                                       ^~
Language: C++

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

int travel(){
	int N ;
	int t[1000000], x[1000000], y[1000000];
	cin >> N ;
	t[0] = x[0] = y[0] = 0;
	for (int i = 0; i < N; ++i) cin >> t[i+1] >> x[i+i] >> y[i+i];
	bool can = true;
	for (int i = 0; i < N; ++i){
		int dt = t[i + 1] - t[i];
		int dist = abs(x[i+1] - x[i]) + abs(y[i+1] - y[i]);
		if (dt < dist) can = false;
		if (dist % 2 != dt % 2) can = false;
	}
	if (can) cout << "Yes" << endl;
	else cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int travel()':
a.cc:21:1: warning: no return statement in function returning non-void [-Wreturn-type]
   21 | }
      | ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n;
	while(~scanf("%d",&n)){
		int flag=0;
		while(n--){
			int t,x,y;
			scanf("%d%d%d",&t,&x,&y);
			if((t-(x+y))%2!=0||t<(x+y)){
				flag=1;
			}
		}
		if(flag){
			printf("No\n");
		}else{
			printf("Yes\n");
		}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:18: error: expected '}' at end of input
   19 |                 }
      |                  ^
a.cc:6:31: note: to match this '{'
    6 |         while(~scanf("%d",&n)){
      |                               ^
a.cc:19:18: error: expected '}' at end of input
   19 |                 }
      |                  ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

#include <map>
#include <set>
#include <queue>
#include <stack>
#include <cmath>
#include <cstdio>
#include <string>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;

#define ls st<<1
#define rs st<<1|1
#define LL long long
#define CLR(a,b) memset(a,(b),sizeof(a))

const int MAXN = 1e5+11;
const int mod = 1e9+7;
const int INF = 0x3f3f3f3f;
const LL INFLL = (1LL<<60);

/*-------------------------------------------------------*/

int x[MAXN], y[MAXN], t[MAXN];
int main() {
    int n;
    scanf("%d",&n);
    for(int i = 1; i <= n; i++) {
        scanf("%d%d%d",&t[i],&x[i],&y[i]);
    }
    x[0] = 0, y[0] = 0, t[0] = 0;
    bool flag = true;
    for(int i = 1; i <= n; i++) {
        t[i] -= t[i-1];
        int st = abs(x[i]-x[i-1])+abs(y[i]-y[i-1]);
        if(t[i]<st) {
            flag = false; break;
        }
        if(t[i]>st) {
            if(st==0 &&(t[i]%2==1)) {
                flag = false; break;
            }
            if((st%2==1)&&(t[i]%2==0)) {
                flag = false; break;
            }
            if((st%2==0)&&(t[i]%2==1)) {
                flag = false; break;
            }
            if(st==0 && ti[i]==0) {
                flag = false; break;
            }
        }
        //if(t[i]==(x[i]-x[i-1]+y[i]-y[i+1]) continue;
    }
    if(flag) printf("Yes\n");
    else printf("No\n");
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:50:25: error: 'ti' was not declared in this scope; did you mean 'i'?
   50 |             if(st==0 && ti[i]==0) {
      |                         ^~
      |                         i
Language: C++

#include <iostream>
using namespace std;

int main(){
  int n,t0=0,x0=0,y0=0,t1,x1,y1,dif=0,dif_t=0;cin>>n;

  for(int i=0;i<n;++i){
    cin>>t1>>x1>>y1;
    dif=abs(x0-x1+y0-y1);
    dif_t=t1-t0;
    if((dif%2!=dif_t%2)||dif>dif_t){
      printf("No\n");
      return 0;
    }
    t1=t0;
    x1=x0;
    y1=y0;
  }printf("Yes\n");

Compiler output:
a.cc: In function 'int main()':
a.cc:18:20: error: expected '}' at end of input
   18 |   }printf("Yes\n");
      |                    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C

#include<stdio.h>
int main(void)
{
  int num,count=0;
  scanf("%d",&num);
  int i, t[num], x[num], y[num],dt,dx,dy;
  for(i=0; i<num; i++)
  {
    scanf("%d%d%d", &t[i],&x[i],&y[i]);
  }
  dt=t[0];
  dx=x[0];
  dy=y[0];
  if(dx<0) dx=-dx;
  if(dy<0) dy=-dy;
  if(dx+dy>dt || (dt-(dx+dy))&2==1) count=1;
  for(i=1; i<num; i++)
  {
    dt=t[i]-t[i-1];
    dx=x[i]-x[i-1];
    dy=y[i]-y[i-1];
    if(dx<0) dx=-dx;
    if(dy<0) dy=-dy;
    if(dx+dy>dt || (dt-(dx+dy))&2==1) count=1;
  }
  if(count==0) printf("Yes");
  else printf("No");
  return 0;

Compiler output:
main.c: In function 'main':
main.c:28:3: error: expected declaration or statement at end of input
   28 |   return 0;
      |   ^~~~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
	int N,x[100000],y[100000],t[100000],i=0,j=0;

	cin >> N;

	for(i=0;i<N;i++){
		cin >> x[i];
		cin >> y[i];
		cin >> t[i];
	}

	for(i=0;i<N-1;i++){
		if(x[i+1]-x[i]+y[y+1]-y[i]!=t[i+1]-t[i]) j++;
	}
	if(j==0) cout << "Yes" << endl;
	else cout << "No" << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:33: error: invalid types 'int [100000][int*]' for array subscript
   16 |                 if(x[i+1]-x[i]+y[y+1]-y[i]!=t[i+1]-t[i]) j++;
      |                                 ^
Language: C++

#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstring>
//#include <chrono> //1e+9で割る auto end= chrono::system_clock::now()-st;  cout<<end.count()%1e+9<<endl;
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
typedef long double db;

#define fr first
#define sc second
#define pb push_back
#define rep(i,x) for(int i=0;i<x;i++)
#define rep1(i,x) for(int i=1;i<=x;i++)
#define rrep(i,x) for(int i=x-1;i>=0;i--)
#define rrep1(i,x) for(int i=x;i>0;i--)

int main()
{
	int N,t,x,y;
	cin>>N;
	P p;
	p.fr=0; p.sc=0;
	int T=0;
	bool b=0;
	rep(i,N){
		cin>>t>>x>>y;
		if((abs(x-p.fr)+abs(y-p.sc)>t-T)||(  t%2!=((p.fr+p.sc)%2+2)%2  ) b=1;
		T=t;
		p.fr=x; p.sc=y;
	}
	if(b) cout<<"No"<<endl;
	else puts("Yes");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:81: error: expected ';' before 'b'
   35 |                 if((abs(x-p.fr)+abs(y-p.sc)>t-T)||(  t%2!=((p.fr+p.sc)%2+2)%2  ) b=1;
      |                                                                                 ^~
      |                                                                                 ;
a.cc:36:20: error: expected ')' before ';' token
   36 |                 T=t;
      |                    ^
      |                    )
a.cc:35:19: note: to match this '('
   35 |                 if((abs(x-p.fr)+abs(y-p.sc)>t-T)||(  t%2!=((p.fr+p.sc)%2+2)%2  ) b=1;
      |                   ^
Language: C

#include <stdio.h>

int main(void)
{int N,n,i,k,j,l,m,di,tim;
scanf("%d",&N);
n=N+1;
int x[100000];
int t[100000];
int y[100000];
int dis[100000];
int time[100000];
x[0]=0;y[0]=0;t[0]=0;
for(i=1;i<=n-1;i++){
	scanf("%d%d%d",&t[i],&x[i],&y[i]);}
	for(k=0;k<=n-2;k++){
		if(x[k+1]>=x[k]){
			X=x[k+1]-x[k];}
			else{
				X=x[k]-x[k+1];}
				if(y[k+1]>=y[k]){
			Y=y[k+1]-y[k];}
			else{
				Y=y[k]-y[k+1];}
		dis[k]=X+Y;
		time[k]=t[k+1]-t[k];
		if(dis[k]<0){
			dis[k]=-1*dis[k];}
			if(time[k]<0){
			time[k]=-1*time[k];}
		di=dis[k]%2;
		tim=time[k]%2;
		if(di!=tim || dis[k]>time[k]){
			printf("No");
			break;}}
	if(di==tim && dis[k]<=time[k]){
		printf("Yes");}
			

	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:25: error: 'X' undeclared (first use in this function)
   17 |                         X=x[k+1]-x[k];}
      |                         ^
main.c:17:25: note: each undeclared identifier is reported only once for each function it appears in
main.c:21:25: error: 'Y' undeclared (first use in this function)
   21 |                         Y=y[k+1]-y[k];}
      |                         ^
Language: C

#include <stdio.h>

int main(void)
{int N,n,i,k,j,l,m,di,tim;
scanf("%d",&N);
n=N+1;
int x[100000];
int t[100000];
int y[100000];
int dis[100000];
int time[100000];
int x[0]=0;y[0]=0;t[0]=0;
for(i=1;i<=n-1;i++){
	scanf("%d%d%d",&t[i],&x[i],&y[i]);}
	for(k=0;k<=N-2;k++){
		dis[k]=x[k+1]+y[k+1]-x[k]-y[k];
		time[k]=t[k+1]-t[k];
		if(dis[k]<0){
			dis[k]=-1*dis[k];}
			if(time[k]<0){
			time[k]=-1*time[k];}
		di=dis[k]%2;
		tim=time[k]%2;
		if(di!=tim || dis[k]>time[k]){
			printf("No");
			break;}}
	if(di==tim && dis[k]<=time[k]){
		printf("Yes");}
			

	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:5: error: conflicting types for 'x'; have 'int[0]'
   12 | int x[0]=0;y[0]=0;t[0]=0;
      |     ^
main.c:7:5: note: previous declaration of 'x' with type 'int[100000]'
    7 | int x[100000];
      |     ^
main.c:12:10: error: invalid initializer
   12 | int x[0]=0;y[0]=0;t[0]=0;
      |          ^