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

// I look at my watch
// it say nine twenty-five
// And I think oh God
// I'm still alive
 
#include <bits/stdc++.h>
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define sz(x) int((x).size())
#define all(v) (v).begin(),(v).end()
#define trace(x) cerr << #x << " = " << x << endl
#define fastio ios_base::sync_with_stdio(0);cin.tie(0)
#define For(i,a,b) for(int i = int(a); i < int(b); ++i)
#define roF(i,a,b) for(int i = int(a); i >= int(b); i--)
using namespace std;
 
typedef long long ll;
typedef pair<int,int> ii;
typedef long double ld;

const int N=4e3+100;
const int inf=2e9;
const ll inf2=5e18;

int fx[]={0,0,-1,1};
int fy[]={1,-1,0,0};

bool gfo[2*N*N][5];
bool vst[N][N];
ll area[2*N*N],A;
int n,m;


int trans(int i,int j){return m*i+j;}

ll sum(ll a,ll b){
	if(a==inf2||b==inf2)return inf2;
	return a+b;
}

void dfs(int y,int x){
	vst[y][x]=true;
	A=sum(A,area[trans(y,x)]);
	For(c,0,4)if(gfo[trans(y,x)][c]){
		int yy=y+fy[c];
		int xx=x+fx[c];
		if(xx<0||xx>=m)continue;
		if(yy<0||yy>=n)continue;
		if(vst[yy][xx])continue;
		dfs(yy,xx);
	}
}


int main(){	
	memset(gfo,false,sizeof(gfo));
	memset(vst,false,sizeof(vst));
	mmeset(area,0,sizeof(area));
	cin>>n>>m;
	set<int>X,Y;
	X.insert(inf);X.insert(-inf);
	Y.insert(inf);Y.insert(-inf);
	vector<ii>LH,LV;
	For(i,0,n){
		int a,b,c;cin>>a>>b>>c;
		if(a>b)swap(a,b);
		X.insert(c);
		Y.insert(a);
		Y.insert(b);
		LV.pb({c,a});
		LV.pb({c,b});
	}
	For(i,0,m){
		int d,e,f;cin>>d>>e>>f;
		if(e>f)swap(e,f);
		X.insert(e);
		X.insert(f);
		Y.insert(d);
		LH.pb({e,d});
		LH.pb({f,d});
	}
	vector<ll>XX,YY;
	for(int x: X)XX.pb(x);
	for(int y: Y)YY.pb(y);
	
	n=sz(Y)-1,m=sz(X)-1;
	For(i,0,sz(YY)-1)For(j,0,sz(XX)-1){
		if(	XX[j]==inf||XX[j]==-inf||XX[j+1]==inf||XX[j+1]==-inf||
			YY[i]==inf||YY[i]==-inf||YY[i+1]==inf||YY[i+1]==-inf)
			area[trans(i,j)]=inf2;
		else area[trans(i,j)]=(YY[i+1]-YY[i])*(XX[j+1]-XX[j]);
	}
	For(i,0,sz(YY)-1)For(j,0,sz(XX)-1){
		For(c,0,4)gfo[trans(i,j)][c]=true;
		if(i==0)gfo[trans(i,j)][1]=false;
		if(i==sz(YY)-2)gfo[trans(i,j)][0]=false;
		if(j==0)gfo[trans(i,j)][3]=false;
		if(j==sz(XX)-2)gfo[trans(i,j)][2]=false;
	}

	for(int i=0;i<sz(LH);i+=2){
		int pos=lower_bound(all(YY),LH[i].ss)-YY.begin();
		For(j,0,sz(XX))if(XX[j]>=LH[i].ff&&XX[j]<LH[i+1].ff){
			gfo[trans(pos-1,j)][0]=false;
			gfo[trans(pos,j)][1]=false;
		}
	}
	for(int i=0;i<sz(LV);i+=2){
		int pos=lower_bound(all(XX),LV[i].ff)-XX.begin();
		For(j,0,sz(YY))if(YY[j]>=LV[i].ss&&YY[j]<LV[i+1].ss){
			gfo[trans(j,pos-1)][3]=false;
			gfo[trans(j,pos)][2]=false;
		}
	}

	//if(sz(LV)==2000||sz(LH)==2000)return 0;

	int iniy=upper_bound(all(YY),0)-YY.begin();
	int inix=upper_bound(all(XX),0)-XX.begin();
	iniy--,inix--;
	A=0;
	dfs(iniy,inix);
	if(A!=inf2)cout<<A<<endl;
	else cout<<"INF"<<endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:60:9: error: 'mmeset' was not declared in this scope; did you mean 'memset'?
   60 |         mmeset(area,0,sizeof(area));
      |         ^~~~~~
      |         memset
Language: C++

#pragma GCC optimize("Ofast")
#include<stdio.h>
#include<vector>
#include<utility> 
#include<queue> 
#include<algorithm>
using namespace std;
long long a[1005],b[1005],c[1005],d[1005],e[1005],f[1005],dir[5]={-1,0,1,0,-1};
bool used[3005][3005]={0},up[3005][3005]={0},down[3005][3005]={0},left[3005][3005]={0},right[3005][3005]={0}; 
vector<long long> x,y;
queue<pair<long long,long long>> que;
long long id_x(long long v){
	return lower_bound(x.begin(),x.end(),v)-x.begin();
}
long long id_y(long long v){
	return lower_bound(y.begin(),y.end(),v)-y.begin();
}
int main(){
	x.emplace_back(100000000000000000);
	x.emplace_back(-100000000000000000);
	y.emplace_back(100000000000000000);
	y.emplace_back(-100000000000000000);
	long long i,j,n,m;
	scanf("%lld%lld",&n,&m);
	for(i=0;i<n;i++){
		scanf("%lld%lld%lld",&a[i],&b[i],&c[i]);
		x.emplace_back(a[i]);
		x.emplace_back(b[i]);
		y.emplace_back(c[i]);
	}
	for(i=0;i<m;i++){
		scanf("%lld%lld%lld",&d[i],&e[i],&f[i]);	
		x.emplace_back(d[i]);
		y.emplace_back(e[i]);
		y.emplace_back(f[i]);
	}
	sort(x.begin(),x.end());
	sort(y.begin(),y.end());
	x.erase(unique(x.begin(),x.end()),x.end());
	y.erase(unique(y.begin(),y.end()),y.end());
	for(i=0;i<n;i++){
		a[i]=id_x(a[i]);
		b[i]=id_x(b[i]);
		c[i]=id_y(c[i]);
		for(j=a[i];j<b[i];j++){
			up[j][c[i]-1]=1;
			down[j][c[i]]=1;
		}
	}
	for(i=0;i<m;i++){
		d[i]=id_x(d[i]);
		e[i]=id_y(e[i]);
		f[i]=id_y(f[i]);
		for(j=e[i];j<f[i];j++){
			right[d[i]-1][j]=1;
			left[d[i]][j]=1;
		}
	}
	que.push({id_x(0)-1,id_y(0)-1});
	used[id_x(0)-1][id_y(0)-1]=1;
	while(que.size()){
		auto z=que.front();
		que.pop();
		for(i=0;i<4;i++){
			if((!i&&left[z.first][z.second])||(i==1&&up[z.first][z.second])||(i==2&&right[z.first][z.second])||(i==3&&down[z.first][z.second]))
				continue;
			long long r=z.first+dir[i],c=z.second+dir[i+1];
			if(r<0||c<0||r>=(int)x.size()-1||c>=(int)y.size()-1||used[r][c])
				continue;
			used[r][c]=1;
			que.push({r,c});
		} 
	}
	for(i=0;i<(int)x.size();i++){
		if(used[i][0]||used[i][y.size()-1]){
			puts("INF");
			return 0;
		}
	}
	for(i=0;i<(int)y.size();i++){
		if(used[0][i]||used[x.size()-1][i]){
			puts("INF");
			return 0;
		}
	}
	long long ans=0;
	for(i=0;i<(int)x.size()-1;i++)
		for(j=0;j<(int)y.size()-1;j++)
			if(used[i][j]){
				ans+=(x[i+1]-x[i])*(y[j+1]-y[j]);
	printf("%lld\n",ans);
}


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

#include <bits/stdc++.h>
#define ll long long
using namespace std;
const int N = 1005;
const int M = 7005;

int a[N], b[N], c[N], d[N], e[N], f[N];
vector <int> vx, vy;
int dx[] = {0, 0, -1, 1}, dy[] = {-1, 1, 0, 0};
bool vis[M][M], ma[M][M];

int get_x(int val){
    return lower_bound(vx.begin(), vx.end(), val) - vx.begin();
}

int get_y(int val){
    return lower_bound(vy.begin(), vy.end(), val) - vy.begin();
}

int main(){
    int n, m; scanf("%d%d", &n, &m);
    vx.push_back(-1.1e9), vx.push_back(0);
    vy.push_back(-1.1e9), vy.push_back(0);
    for(int i = 0; i < n; i++){
        cin >> a[i] >> b[i] >> c[i];
        vx.push_back(a[i]), vx.push_back(b[i]);
        vy.push_back(c[i]);
    }

    for(int i = 0; i < m; i++){
        cin >> d[i] >> e[i] >> f[i];
        vy.push_back(e[i]), vy.push_back(f[i]);
        vx.push_back(d[i]);
    }

    sort(vx.begin(), vx.end()), vx.erase(unique(vx.begin(), vx.end()), vx.end());

    sort(vy.begin(), vy.end()), vy.erase(unique(vy.begin(), vy.end()), vy.end());


    for(int i = 0; i < n; i++){
        a[i] = get_x(a[i]), b[i] = get_x(b[i]), c[i] = get_y(c[i]);
        for(int j = a[i]*2 - 1; j < 2 * b[i]; j++)
            ma[j][2*c[i] - 1] = true;
    }

    for(int i = 0; i < m; i++){
        d[i] = get_x(d[i]), e[i] = get_y(e[i]), f[i] = get_y(f[i]);
        for(int j = e[i]*2-1; j < f[i]*2; j++)
            ma[2*d[i]-1][j] = true;
    }

    int sx = get_x(0)*2 - 1, sy = get_y(0)*2 - 1;

    queue<pair<int, int>> qu;
    qu.push({sx, sy}), vis[sx][sy] = true;
    ll ans = 0;
    bool flag = false;
    while(!qu.empty()){
        int ux = qu.front().first, uy = qu.front().second; qu.pop();
        if(ux == maxm-1 || uy == maxm-1 || ux == 0 || uy == 0){
            flag = true;
            break;
        }
        if(ux % 2 == 0 && uy % 2 == 0){
            int x = ux / 2, y = uy / 2;
            ans += 1ll * (vx[x + 1] - vx[x]) * (vy[y + 1] - vy[y]);
        }
        for(int i = 0; i < 4; i++){
            int xx = ux + dx[i], yy = uy + dy[i];
            if(xx >= maxn || xx < 0 || yy >= maxn || yy < 0 || ma[xx][yy] || vis[xx][yy]) continue;
            qu.push({xx, yy});
            vis[xx][yy] = true;
        }
    }
    if(flag) printf("INF\n");
    else printf("%lld\n", ans);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:61:18: error: 'maxm' was not declared in this scope
   61 |         if(ux == maxm-1 || uy == maxm-1 || ux == 0 || uy == 0){
      |                  ^~~~
a.cc:71:22: error: 'maxn' was not declared in this scope; did you mean 'main'?
   71 |             if(xx >= maxn || xx < 0 || yy >= maxn || yy < 0 || ma[xx][yy] || vis[xx][yy]) continue;
      |                      ^~~~
      |                      main
Language: C++

#include <bits/stdc++.h>
#define ll long long
using namespace std;
const int maxn = 1005;
const int maxm = 7005;
typedef long long ll;


vector <int> vx, vy;
int dx[] = {0, 0, -1, 1}, dy[] = {-1, 1, 0, 0};

int a[maxn], b[maxn], c[maxn], d[maxn], e[maxn], f[maxn];
bool vis[maxm][maxm], ma[maxm][maxm];

int get_x(int val){
    return lower_bound(vx.begin(), vx.end(), val) - vx.begin();
}

int get_y(int val){
    return lower_bound(vy.begin(), vy.end(), val) - vy.begin();
}

int main(){
    int n, m; scanf("%d%d", &n, &m);
    vx.push_back(0), vy.push_back(0); // add start vertex
    vx.push_back(-1.1e9), vy.push_back(-1.1e9); // add boundary data
    for(int i = 0; i < n; i++){
        cin >> a[i] >> b[i] >> c[i];
        vx.push_back(a[i]), vx.push_back(b[i]);
        vy.push_back(c[i]);
    }

    for(int i = 0; i < m; i++){
        cin >> d[i] >> e[i] >> f[i];
        vy.push_back(e[i]), vy.push_back(f[i]);
        vx.push_back(d[i]);
    }

    sort(vx.begin(), vx.end()), vx.erase(unique(vx.begin(), vx.end()), vx.end());

    sort(vy.begin(), vy.end()), vy.erase(unique(vy.begin(), vy.end()), vy.end());


    for(int i = 0; i < n; i++){
        a[i] = get_x(a[i]), b[i] = get_x(b[i]), c[i] = get_y(c[i]);
        for(int j = a[i]*2 - 1; j < 2 * b[i]; j++)
            ma[j][2*c[i] - 1] = true;
    }

    for(int i = 0; i < m; i++){
        d[i] = get_x(d[i]), e[i] = get_y(e[i]), f[i] = get_y(f[i]);
        for(int j = e[i]*2-1; j < f[i]*2; j++)
            ma[2*d[i]-1][j] = true;
    }

    int sx = get_x(0)*2 - 1, sy = get_y(0)*2 - 1;

    queue<pair<int, int>> qu;
    qu.push({sx, sy}), vis[sx][sy] = true;
    ll ans = 0;
    bool flag = false;
    while(!qu.empty()){
        int ux = qu.front().first, uy = qu.front().second; qu.pop();
        if(ux == maxm-1 || uy == maxm-1 || ux == 0 || uy == 0){
            flag = true;
            break;
        }
        if(ux % 2 == 0 && uy % 2 == 0){
            int x = ux / 2, y = uy / 2;
            ans += 1ll * (vx[x + 1] - vx[x]) * (vy[y + 1] - vy[y]);
        }
        for(int i = 0; i < 4; i++){
            int xx = ux + dx[i], yy = uy + dy[i];
            if(xx >= maxn || xx < 0 || yy >= maxn || yy < 0 || ma[xx][yy] || vis[xx][yy]) continue;
            qu.push({xx, yy});
            vis[xx][yy] = true;
        }
    }
    if(flag) printf("INF\n");
    else printf("%lld\n", ans);
    return 0;
}

Compiler output:
a.cc:2:12: error: 'long long long' is too long for GCC
    2 | #define ll long long
      |            ^~~~
a.cc:6:19: note: in expansion of macro 'll'
    6 | typedef long long ll;
      |                   ^~
a.cc:2:17: error: 'long long long' is too long for GCC
    2 | #define ll long long
      |                 ^~~~
a.cc:6:19: note: in expansion of macro 'll'
    6 | typedef long long ll;
      |                   ^~
a.cc:2:17: error: declaration does not declare anything [-fpermissive]
    2 | #define ll long long
      |                 ^~~~
a.cc:6:19: note: in expansion of macro 'll'
    6 | typedef long long ll;
      |                   ^~
Language: C++

#include <bits/stdc++.h>
#define ref(i,n) for(int i=0;i<n;i++)
using namespace std;
#define INF 1111111111
 
int n,m;
int a[1001],b[1001],c[1000],d[1000],e[1000],f[1000];
int U[3000][3000], L[3000][3000];
typedef pair<int,int> P;
vector<vector<bool>>vis;
typedef long long ll ;
 
 
int id(vector<ll>h,ll a){
    return lower_bound(h.begin(),h.end(),a)-h.begin();
}
 
int main(){
 
    cin>>n>>m;
    vector<ll> h,w;
    ref(i,n){
        cin>>a[i]>>b[i]>>c[i];
        h.push_back(a[i]);
        h.push_back(b[i]);
        w.push_back(c[i]);
    }
    ref(i,m) {
        cin>>d[i]>>e[i]>>f[i];
        h.push_back(d[i]);
        w.push_back(f[i]);
        w.push_back(e[i]);
    }
    h.push_back(INF);
    h.push_back(-INF);
    w.push_back(INF);
    w.push_back(-INF);
    h.push_back(0);
    w.push_back(0);
    sort(h.begin(),h.end());
	sort(w.begin(),w.end());
	h.erase(unique(h.begin(),h.end()),h.end());
	w.erase(unique(w.begin(),w.end()),w.end());
 
 
 
	vis=vector<vector<bool>>(h.size(),vector<bool>(w.size(),false));
 
 
	ref(i,n{
		L[id(h,a[i])][id(w,c[i])]++;
		L[id(h,b[i])][id(w,c[i])]--;
	}
	ref(i,m){
		U[id(h,d[i])][id(w,e[i])]++;
		U[id(h,d[i])][id(w,f[i])]--;
	}
	for(int i=1;i<h.size();i++){
		for(int j=1;j<w.size();j++){
			L[i][j]+=L[i-1][j];
			U[i][j]+=U[i][j-1];
		}
	}
 
 
	queue<P>q;
	q.push({id(h,0),id(w,0)});
	ll ans=0;
	while(!q.empty()){
        P p=q.front();
        q.pop();
        int x=p.first,y=p.second;
        if(!x||!y||x==h.size()-1||y==w.size()-1){
            cout<<"INF";
            return 0;
        }
        if(!vis[x][y]){
            vis[x][y]=1;
            ans+=(h[x+1]-h[x])*(w[y+1]-w[y]);
			if(!U[x][y])q.push({x-1,y});
			if(!L[x][y])q.push({x,y-1});
			if(!U[x+1][y])q.push({x+1,y});
			if(!L[x][y+1])q.push({x,y+1});
        }
 
 
	}
	cout<<ans;
	return 0;
}

Compiler output:
a.cc:90:2: error: unterminated argument list invoking macro "ref"
   90 | }
      |  ^
a.cc: In function 'int main()':
a.cc:50:12: error: expected ';' at end of input
   50 |         ref(i,n{
      |            ^
      |            ;
a.cc:50:12: error: statement cannot resolve address of overloaded function
a.cc:50:12: error: expected '}' at end of input
a.cc:18:11: note: to match this '{'
   18 | int main(){
      |           ^
Language: C++

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

#define rep(i, n) for (ll i = 0; i < n; i++)
using namespace std;
typedef long long ll;
using P = pair<ll, ll>;

template<class T> inline bool chmin(T& a,T b) {if (a > b) {a = b; return true;} return false;}
template<class T> inline bool chmax(T& a,T b) {if (a < b) {a = b; return true;} return false;}

const ll MOD = 1000000007;
const ll INF = 1<<30;
//const ll INF = (ll)1e18 + 1;

struct L{
  ll a, b, c;
  L(ll a = 0, ll b = 0, ll c = 0): a(a), b(b), c(c){}
};

const ll dx[] = {-1, 0, 1, 0};
const ll dy[] = {0, -1, 0, 1};

ll main(){
  ll N, M; cin >> N >> M;
  //元々の座標
  //first: 元々の座標　second:圧縮後の座標
  map<ll, ll> mpX, mpY;
  mpX[0] = 0, mpY[0] = 0;

  vector<L> lh, lv;
  rep(i, N){
    ll a, b, c; cin >> a >> b >> c;
    mpX[a] = 0;
    mpX[b] = 0;
    mpY[c] = 0;
    lh.emplace_back(a, b, c);
  }
  rep(i, M){
    ll a, b, c; cin >> c >> a >> b;
    mpY[a] = 0;
    mpY[b] = 0;
    mpX[c] = 0;
    lv.emplace_back(a, b, c);
  }
  //圧縮する前の座標
  //xs[0]:圧縮後の座標0の元座標
  vector<ll> xs, ys;
  for(auto& p: mpX){
    p.second = xs.size();
    xs.push_back(p.first);
  }
  for(auto& p: mpY){
    p.second = ys.size();
    ys.push_back(p.first);
  }

  //扱うグリッドのサイズ
  ll h = xs.size() * 2;
  ll w = ys.size() * 2;
  vector<vector<ll>> d(h, vector<ll>(w));
  rep(i, N){
    ll a = mpX[lh[i].a] * 2;
    ll b = mpX[lh[i].b] * 2;
    ll c = mpY[lh[i].c] * 2;
    for (ll x = a; x <= b; ++x) d[x][c] = -1;
  }
  rep(i, N){
    ll a = mpY[lv[i].a] * 2;
    ll b = mpY[lv[i].b] * 2;
    ll c = mpX[lv[i].c] * 2;
    for (ll y = a; y <= b; ++y) d[c][y] = -1;
  }

  queue<P> q;
  ll sx = mpX[0] * 2, sy = mpY[0] * 2;
  d[sx][sy] = 1;//たどり着けるところを1にする
  q.push(P(sx, sy));
  while (!q.empty()){
    ll x = q.front().first;
    ll y = q.front().second;
    q.pop();
    rep(v, 4){
      ll nx = x + dx[v], ny = y + dy[v];
      if (nx < 0 || nx >= h) continue;
      if (ny < 0 || ny >= w) continue;
      if (d[nx][ny] != 0) continue;
      d[nx][ny] = 1;
      q.push(P(nx, ny));
    }
  }

  ll ans = 0;
  rep(x, h) rep(y, w){
    if (d[x][y] != 1) continue;
    if (x == 0 || x == h - 1 || y == 0 || y == w - 1){
      cout << "INF" << endl;
      return 0;
    }
    if (x % 2 == 0 || y % 2 == 0) continue;
    ll ex = xs[x / 2 + 1] - xs[x / 2];
    ll ey = ys[y / 2 + 1] - ys[y / 2];
    ans += ex * ey;
  }
  cout << ans << endl;
}


Compiler output:
a.cc:33:1: error: '::main' must return 'int'
   33 | ll main(){
      | ^~
Language: C++

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

#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
using P = pair<ll, ll>;

template<class T> inline bool chmin(T& a,T b) {if (a > b) {a = b; return true;} return false;}
template<class T> inline bool chmax(T& a,T b) {if (a < b) {a = b; return true;} return false;}

const ll MOD = 1000000007;
const int INF = 1<<30;
//const ll INF = (ll)1e18 + 1;

struct L{
  int a, b, c;
  L(int a = 0, int b = 0, int c = 0): a(a), b(b), c(c){}
};

const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, -1, 0, 1};

int main(){
  int N, M; cin >> N >> M;
  //元々の座標
  //first: 元々の座標　second:圧縮後の座標
  map<int, int> mpX, mpY;
  mpX[0] = 0, mpY[0] = 0;

  vector<L> lh, lv;
  rep(i, N){
    int a, b, c; cin >> a >> b >> c;
    mpX[a] = 0;
    mpX[b] = 0;
    mpY[c] = 0;
    lh.emplace_back(a, b, c);
  }
  rep(i, M){
    int a, b, c; cin >> c >> a >> b;
    mpY[a] = 0;
    mpY[b] = 0;
    mpX[c] = 0;
    lv.emplace_back(a, b, c);
  }
  //圧縮する前の座標
  //xs[0]:圧縮後の座標0の元座標
  vector<int> xs, ys;
  for(auto& p: mpX){
    p.second = xs.size();
    xs.push_back(p.first);
  }
  for(auto& p: mpY){
    p.second = Ys.size();
    ys.push_back(p.first);
  }

  //扱うグリッドのサイズ
  int h = xs.size() * 2;
  int w = ys.size() * 2;
  vector<vector<int>> d(h, vector<int>(w));
  rep(i, N){
    int a = mpX[lh[i].a] * 2;
    int b = mpX[lh[i].b] * 2;
    int c = mpY[lh[i].c] * 2;
    for (int x = a; x <= b; ++x) d[x][c] = -1;
  }
  rep(i, N){
    int a = mpY[lv[i].a] * 2;
    int b = mpY[lv[i].b] * 2;
    int c = mpX[lv[i].c] * 2;
    for (int y = a; y <= b; ++y) d[c][y] = -1;
  }

  queue<P> q;
  int sx = mpX[0] * 2, sy = mpY[0] * 2;
  d[sx][sy] = 1;//たどり着けるところを1にする
  q.push(P(sx, sy));
  while (!q.empty()){
    int x = q.front().first;
    int y = q.front().second;
    q.pop();
    rep(v, 4){
      int nx = x + dx[v], ny = y + dy[v];
      if (nx < 0 || nx >= h) continue;
      if (ny < 0 || ny >= w) continue;
      if (d[nx][ny] != 0) continue;
      d[nx][ny] = 1;
      q.push(P(nx, ny));
    }
  }

  ll ans = 0;
  rep(x, h) rep(y, w){
    if (d[x][y] != 1) continue;
    if (x == 0 || x == h - 1 || y == 0 || y == w - 1){
      cout << "INF" << endl;
      return 0;
    }
    if (x % 2 == 0 || y % 2 == 0) continue;
    ll ex = xs[x / 2 + 1] - xs[x / 2];
    ll ey = ys[y / 2 + 1] - ys[y / 2];
    ans += ex * ey;
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:63:16: error: 'Ys' was not declared in this scope; did you mean 'ys'?
   63 |     p.second = Ys.size();
      |                ^~
      |                ys
Language: C++

#include<iostream>
using namespace std;
int s[999][999];
char c;
int main()
{
  int a,b;
  cin>>a>>b;
  for(int j=0;j<a+b;j++)
  	for(int i=0;i<3;i++)
  	{
  		cin>>c;
  		s[i]=c;
  	}
	cout<<"INF";
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: incompatible types in assignment of 'char' to 'int [999]'
   13 |                 s[i]=c;
      |                 ~~~~^~
Language: C++

やりたくないです。

Compiler output:
a.cc:1:1: error: extended character 。 is not valid in an identifier
    1 | やりたくないです。
      | ^
a.cc:1:1: error: '\U00003084\U0000308a\U0000305f\U0000304f\U0000306a\U00003044\U00003067\U00003059\U00003002' does not name a type
    1 | やりたくないです。
      | ^~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <string>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <tuple>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cassert>
#include <cstdint>
#include <cctype>
#include <numeric>
#include <bitset>
#include <functional>
#include <atcoder/all>

using namespace std;

using ll =  long long;
using Pll = pair<ll, ll>;
using Pii = pair<int, int>;

constexpr int INF = 1 << 30;
constexpr ll LINF = 1LL << 60;
constexpr ll MOD = 1000000007;
constexpr long double EPS = 1e-10;
constexpr int dyx[4][2] = {
    { 0, 1}, {-1, 0}, {0,-1}, {1, 0}
};

int main() {
    ios::sync_with_stdio(false); cin.tie(nullptr);
    string s,t;
    cin >> s >> t;
    if(s == t.substr(0, t.length()-1)) {
        cout << "Yes\n";
    } else {
        cout << "No\n";
    }
}

Compiler output:
a.cc:21:10: fatal error: atcoder/all: No such file or directory
   21 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>

using namespace std;
int main() {
	
	string s, t;
	cin >> s >> t;
	t.pop_back;

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

	return 0;



}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: invalid use of non-static member function 'void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::pop_back() [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
    8 |         t.pop_back;
      |         ~~^~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:2174:7: note: declared here
 2174 |       pop_back() noexcept
      |       ^~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long 
int main()
{
	string s,t,tem;
    cin>>s>>t;
    tem=t.substr(t.begin(),s.size());
    cout<<(tem==s?"Yes":"No")<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:25: error: cannot convert 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
    8 |     tem=t.substr(t.begin(),s.size());
      |                  ~~~~~~~^~
      |                         |
      |                         std::__cxx11::basic_string<char>::iterator
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:3208:24: note:   initializing argument 1 of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::substr(size_type, size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
 3208 |       substr(size_type __pos = 0, size_type __n = npos) const
      |              ~~~~~~~~~~^~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long 
int main()
{
	string s,t,tem;
    cin>>s>>t;
    tem=t.strsub(t.begin(),s.size());
    cout<<(tem==s?"Yes":"No")<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'strsub'
    8 |     tem=t.strsub(t.begin(),s.size());
      |           ^~~~~~
Language: C++

#include<iostream>
using namespace std;
  void solve()
{
 string S,T;
     cin>>S>>T;
    T.pop_back();
  if(S==T)
  {
    cout<<"Yes"<<endl;
    else
      cout<<"No"<<endl;
  }
}
int main()
{
   solve();
  return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:11:5: error: expected '}' before 'else'
   11 |     else
      |     ^~~~
a.cc:9:3: note: to match this '{'
    9 |   {
      |   ^
a.cc: At global scope:
a.cc:14:1: error: expected declaration before '}' token
   14 | }
      | ^
Language: C++

#include<iostream>
using namespace std;
string S,T;
void input()
{
  cin>>S>>T;
}
  void solve()
{
 
    T.pop_back();
  if(S==T)
  {
    cout<<"Yes"<<endl;
    else
      cout<<"No"<<endl;
  }
}
int main()
{
  void input();
   void solve();
  return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:15:5: error: expected '}' before 'else'
   15 |     else
      |     ^~~~
a.cc:13:3: note: to match this '{'
   13 |   {
      |   ^
a.cc: At global scope:
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

#include<iostream>
using namespace std;
void input()
{
string S,T;
  cin>>S>>T;
}
  void solve()
{
 
    T.pop_back();
  if(S==T)
  {
    cout<<"Yes"<<endl;
    else
      cout<<"No"<<endl;
  }
}
int main()
{
  void input();
   void solve();
  return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:11:5: error: 'T' was not declared in this scope
   11 |     T.pop_back();
      |     ^
a.cc:12:6: error: 'S' was not declared in this scope
   12 |   if(S==T)
      |      ^
a.cc:15:5: error: expected '}' before 'else'
   15 |     else
      |     ^~~~
a.cc:13:3: note: to match this '{'
   13 |   {
      |   ^
a.cc: At global scope:
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

#include<iostream>
using namespace std;
void input()
{
string s,t;
  cin>>s>>t;
}
  void solve()
{
 
    t.pop_back();
  if(s==t)
  {
    cout<<"Yes"<<endl;
    else
      cout<<"No"<<endl;
  }
}
int main()
{
  void input();
   void solve();
  return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:11:5: error: 't' was not declared in this scope; did you mean 'tm'?
   11 |     t.pop_back();
      |     ^
      |     tm
a.cc:12:6: error: 's' was not declared in this scope
   12 |   if(s==t)
      |      ^
a.cc:15:5: error: expected '}' before 'else'
   15 |     else
      |     ^~~~
a.cc:13:3: note: to match this '{'
   13 |   {
      |   ^
a.cc: At global scope:
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

#include<iostream>
using namespace std;
void input()
{
string s,t;
  cin>>s>>t;
}
  void solve()
{
 
    t.pop_back;
  if(s==t)
  {
    cout<<"Yes"<<endl;
    else
      cout<<"No"<<endl;
  }
}
int main()
{
  void input();
   void solve();
  return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:11:5: error: 't' was not declared in this scope; did you mean 'tm'?
   11 |     t.pop_back;
      |     ^
      |     tm
a.cc:12:6: error: 's' was not declared in this scope
   12 |   if(s==t)
      |      ^
a.cc:15:5: error: expected '}' before 'else'
   15 |     else
      |     ^~~~
a.cc:13:3: note: to match this '{'
   13 |   {
      |   ^
a.cc: At global scope:
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

#include<iostream>
using namespace std;
 
void solve()
{
 string s,t;
  cin>>s>>t;
    t.pop_back;
  if(s==t)
  {
    cout<<"Yes"<<endl;
    else
      cout<<"No"<<endl;
  }
}
int main()
{
   void solve()
  return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:8:7: error: invalid use of non-static member function 'void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::pop_back() [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
    8 |     t.pop_back;
      |     ~~^~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:2174:7: note: declared here
 2174 |       pop_back() noexcept
      |       ^~~~~~~~
a.cc:12:5: error: expected '}' before 'else'
   12 |     else
      |     ^~~~
a.cc:10:3: note: to match this '{'
   10 |   {
      |   ^
a.cc: At global scope:
a.cc:15:1: error: expected declaration before '}' token
   15 | }
      | ^
a.cc: In function 'int main()':
a.cc:19:3: error: a function-definition is not allowed here before 'return'
   19 |   return 0;
      |   ^~~~~~
Language: C++

#include<iostream>
using namespace std;
 string s,t;
  cin>>s>>t;
void solve()
{
 
    t.pop_back;
  if(s==t)
  {
    cout<<"Yes"<<endl;
    else
      cout<<"No"<<endl;
  }
}
int main()
{
   void solve()
  return 0;
}


Compiler output:
a.cc:4:3: error: 'cin' does not name a type
    4 |   cin>>s>>t;
      |   ^~~
a.cc: In function 'void solve()':
a.cc:8:7: error: invalid use of non-static member function 'void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::pop_back() [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
    8 |     t.pop_back;
      |     ~~^~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:2174:7: note: declared here
 2174 |       pop_back() noexcept
      |       ^~~~~~~~
a.cc:12:5: error: expected '}' before 'else'
   12 |     else
      |     ^~~~
a.cc:10:3: note: to match this '{'
   10 |   {
      |   ^
a.cc: At global scope:
a.cc:15:1: error: expected declaration before '}' token
   15 | }
      | ^
a.cc: In function 'int main()':
a.cc:19:3: error: a function-definition is not allowed here before 'return'
   19 |   return 0;
      |   ^~~~~~
Language: C++

#include<iostream>
using namespace std;

 string s,t;
  cin>>s>>t;

void solve()
{
 
    t.pop_back;
  if(s==t)
  {
    cout<<"Yes"<<endl;
    else
      cout<<"No"<<endl;
  }
int main()
{
  
   void solve()
  return 0;
}

Compiler output:
a.cc:5:3: error: 'cin' does not name a type
    5 |   cin>>s>>t;
      |   ^~~
a.cc: In function 'void solve()':
a.cc:10:7: error: invalid use of non-static member function 'void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::pop_back() [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
   10 |     t.pop_back;
      |     ~~^~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:2174:7: note: declared here
 2174 |       pop_back() noexcept
      |       ^~~~~~~~
a.cc:14:5: error: expected '}' before 'else'
   14 |     else
      |     ^~~~
a.cc:12:3: note: to match this '{'
   12 |   {
      |   ^
a.cc: In function 'int main()':
a.cc:21:3: error: a function-definition is not allowed here before 'return'
   21 |   return 0;
      |   ^~~~~~
Language: C++

#include<iostream>
using namespace std;
void solve()
{
  
    t.pop_back;
  if(s==t)
  {
    cout<<"Yes"<<endl;
    else
      cout<<"No"<<endl;
  }
int main()
{
  string s,t;
  cin>>s>>t;
   void solve()
  return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:6:5: error: 't' was not declared in this scope; did you mean 'tm'?
    6 |     t.pop_back;
      |     ^
      |     tm
a.cc:7:6: error: 's' was not declared in this scope
    7 |   if(s==t)
      |      ^
a.cc:10:5: error: expected '}' before 'else'
   10 |     else
      |     ^~~~
a.cc:8:3: note: to match this '{'
    8 |   {
      |   ^
a.cc: In function 'int main()':
a.cc:18:3: error: a function-definition is not allowed here before 'return'
   18 |   return 0;
      |   ^~~~~~
Language: C++

#include<iostream>
using namespace std;
void main()
{
  string s,t;
  cin>>s>>t;
  t.pop_back;
  if(s==t)
  {
    cout<<"Yes"<<endl;
    else
      cout<<"No"<<endl;
  }
}

Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | void main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:7:5: error: invalid use of non-static member function 'void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::pop_back() [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
    7 |   t.pop_back;
      |   ~~^~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:2174:7: note: declared here
 2174 |       pop_back() noexcept
      |       ^~~~~~~~
a.cc:11:5: error: expected '}' before 'else'
   11 |     else
      |     ^~~~
a.cc:9:3: note: to match this '{'
    9 |   {
      |   ^
a.cc: At global scope:
a.cc:14:1: error: expected declaration before '}' token
   14 | }
      | ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
  string s,t;
  cin>>s>>t;
  t.pop_back;
  if(s==t)
  {
    cout<<"Yes"<<endl;
    else
      cout<<"No"<<endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: invalid use of non-static member function 'void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::pop_back() [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
    7 |   t.pop_back;
      |   ~~^~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:2174:7: note: declared here
 2174 |       pop_back() noexcept
      |       ^~~~~~~~
a.cc:11:5: error: expected '}' before 'else'
   11 |     else
      |     ^~~~
a.cc:9:3: note: to match this '{'
    9 |   {
      |   ^
a.cc: At global scope:
a.cc:14:3: error: expected unqualified-id before 'return'
   14 |   return 0;
      |   ^~~~~~
a.cc:15:1: error: expected declaration before '}' token
   15 | }
      | ^
Language: C++

#include<iostream>
#include<cmath>
using namespace std;
int main(){
string S,T;
getline(cin,S);
getline(cin,T);
if(S.substr(0,(s.length())) == T.substr(0,(s.length()-1))){
 
cout<<"Yes";
}  
   else{
   cout<<"No";
   }
 
 
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: 's' was not declared in this scope
    8 | if(S.substr(0,(s.length())) == T.substr(0,(s.length()-1))){
      |                ^
Language: C++

#include<iostream>
#include<cmath>
using namespace std;
int main(){
string S,T;
getline(cin,S);
getline(cin,T);
if(S.substr(0,(s.length())) == T.substr(0,(s.length()-1)){

cout<<"Yes";
}  
   else{
   cout<<"No";
   }


return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: 's' was not declared in this scope
    8 | if(S.substr(0,(s.length())) == T.substr(0,(s.length()-1)){
      |                ^
a.cc:12:4: error: expected primary-expression before 'else'
   12 |    else{
      |    ^~~~
a.cc:11:2: error: expected ')' before 'else'
   11 | }
      |  ^
      |  )
   12 |    else{
      |    ~~~~
a.cc:8:3: note: to match this '('
    8 | if(S.substr(0,(s.length())) == T.substr(0,(s.length()-1)){
      |   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
#define rep(i,n) for(ll i=0;i<(n);i++)
#define init(a,i) for(int k=0;k<(i);k++)(a)[k]=0
#define in(a,i) for(int k=0;k<(i);k++)cin>>(a)[k]
#define all(a)  (a).begin(),(a).end()
#define mod 1000000007
#define inf 2147483647
#define range(x,a,b) (a)<=x&&x<=(b)
int main(){
	string s,t;
	cin>>s>>t;
	bool flag=1;
	rep(i,s.size){
		if(s[i]!=t[i])flag=0;
	}
	if(flag)cout<<"Yes";
	else cout<<"No";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   16 |         rep(i,s.size){
      |                 ^
a.cc:5:32: note: in definition of macro 'rep'
    5 | #define rep(i,n) for(ll i=0;i<(n);i++)
      |                                ^
Language: C++

#include <iostream>
using namespace std;
 
int main(){
    //入力を受け取る
    string S,T;
    cin >> S >> T;
  
  bool a = true;
  
  for (int i=0,i > T.size(),i++) {
    if (S.at(i) == T.at(i)) {
      a = true;
    }
    else {
      a = false;
      break;
    }
  }
   if (a = true) {
     cout << "Yes" << endl;
   }
  else {
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: expected ';' before '>' token
   11 |   for (int i=0,i > T.size(),i++) {
      |                 ^~
      |                 ;
a.cc:11:18: error: expected primary-expression before '>' token
   11 |   for (int i=0,i > T.size(),i++) {
      |                  ^
a.cc:11:32: error: expected ';' before ')' token
   11 |   for (int i=0,i > T.size(),i++) {
      |                                ^
      |                                ;
Language: C++

#include <iostream>
using namespace std;
 
int main(){
    //入力を受け取る
    string S,T;
    cin >> S >> T;
  
  bool a = true;
  
  for (int i=0,i < T.size(),i++) {
    if (S.at(i) == T.at(i)) {
      a = true;
    }
    else {
      a = false;
      break;
    }
  }
   if (a = true) {
     cout << "Yes" << endl;
   }
  else {
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: expected ';' before '<' token
   11 |   for (int i=0,i < T.size(),i++) {
      |                 ^~
      |                 ;
a.cc:11:18: error: expected primary-expression before '<' token
   11 |   for (int i=0,i < T.size(),i++) {
      |                  ^
a.cc:11:32: error: expected ';' before ')' token
   11 |   for (int i=0,i < T.size(),i++) {
      |                                ^
      |                                ;
Language: C++

#include <iostream>
using namespace std;
 
int main(){
    //入力を受け取る
    str S,T;
    cin >> S >> T;
  
  bool a = true;
  
  for (int i=0,i < T.size(),i++) {
    if (S.at(i) == T.at(i)) {
      a = true;
    }
    else {
      a = false;
      break;
    }
  }
   if (a = true) {
     cout << "Yes" << endl;
   }
  else {
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'str' was not declared in this scope; did you mean 'std'?
    6 |     str S,T;
      |     ^~~
      |     std
a.cc:7:12: error: 'S' was not declared in this scope
    7 |     cin >> S >> T;
      |            ^
a.cc:7:17: error: 'T' was not declared in this scope
    7 |     cin >> S >> T;
      |                 ^
a.cc:11:17: error: expected ';' before '<' token
   11 |   for (int i=0,i < T.size(),i++) {
      |                 ^~
      |                 ;
a.cc:11:18: error: expected primary-expression before '<' token
   11 |   for (int i=0,i < T.size(),i++) {
      |                  ^
a.cc:11:32: error: expected ';' before ')' token
   11 |   for (int i=0,i < T.size(),i++) {
      |                                ^
      |                                ;
Language: C++

import sys
def input(): return sys.stdin.readline().rstrip()

S = input()
T = input()

size = len(S)

if S == T[:size]:
    print("Yes")
else:
    print("No")

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include<bits/stdc++.h>
int main() {
  string s, t;
  cin >> s >> t;
  for (int i = 0; i < (int) s.size(); i++) {
    if (s[i] != t[i]) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'string' was not declared in this scope
    3 |   string s, t;
      |   ^~~~~~
a.cc:3:3: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin >> s >> t;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:4:10: error: 's' was not declared in this scope
    4 |   cin >> s >> t;
      |          ^
a.cc:4:15: error: 't' was not declared in this scope; did you mean 'tm'?
    4 |   cin >> s >> t;
      |               ^
      |               tm
a.cc:7:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |       cout << "No" << endl;
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:7:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |       cout << "No" << endl;
      |                       ^~~~
      |                       std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:11:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |   cout << "Yes" << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:11:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 |   cout << "Yes" << endl;
      |                    ^~~~
      |                    std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C

int main(void) {
	int	S,T;
	scanf("%d"S,T);
	if(S+1==T)
	printf("Yes");
	else
	printf("No");
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:3:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 |         scanf("%d"S,T);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void) {
main.c:3:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 |         scanf("%d"S,T);
      |         ^~~~~
main.c:3:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:3:19: error: expected ')' before 'S'
    3 |         scanf("%d"S,T);
      |              ~    ^
      |                   )
main.c:5:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    5 |         printf("Yes");
      |         ^~~~~~
main.c:5:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:5:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:5:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    7 |         printf("No");
      |         ^~~~~~
main.c:7:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

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

int main(){
    string S, T;
    cin >> S >> T;

    for(int i = 0; i < S.size(); i++){
        if(S.at(i) != T.at()){
            cout << "No" << endl;
            return 0;
        }
    }

    cout << "Yes" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:27: error: no matching function for call to 'std::__cxx11::basic_string<char>::at()'
    9 |         if(S.at(i) != T.at()){
      |                       ~~~~^~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:1287:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::at(size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]'
 1287 |       at(size_type __n) const
      |       ^~
/usr/include/c++/14/bits/basic_string.h:1287:7: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/basic_string.h:1309:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::at(size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]'
 1309 |       at(size_type __n)
      |       ^~
/usr/include/c++/14/bits/basic_string.h:1309:7: note:   candidate expects 1 argument, 0 provided
Language: C++

#include <bits/stdc++.h>
#include <math.h>
using namespace std;
using ll = long long;
int main() {
  string a,b;
  cin>>a>>b;
  ll c=a.size();
  string d="Yes";
  for(ll i=0;i<c;i++){
    if(a.at(i)!=b.at(i)){
      d="No";
      brak;
    }
  }
  cout<<d<<endl;
  
}

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

#include<string>
using namespace std;

int main(){
  string s,t;
  cin >> s >> t;
  if(s == t.substr(0,s.length()+1)){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
}
     

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> s >> t;
      |   ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<string>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:8:5: error: 'cout' was not declared in this scope
    8 |     cout << "Yes" << endl;
      |     ^~~~
a.cc:8:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:22: error: 'endl' was not declared in this scope
    8 |     cout << "Yes" << endl;
      |                      ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include<string>
  +++ |+#include <ostream>
    2 | using namespace std;
a.cc:10:5: error: 'cout' was not declared in this scope
   10 |     cout << "No" << endl;
      |     ^~~~
a.cc:10:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:21: error: 'endl' was not declared in this scope
   10 |     cout << "No" << endl;
      |                     ^~~~
a.cc:10:21: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'