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

#include <algorithm>
#include <cstdio>
#include <vector>
struct segT {
	int n, seg[200005];
	int val[4000005], idx[4000005], tp;
	inline void modify(int pos, int x)
	{
		for (; pos <= n; pos += pos & -pos) {
			idx[tp] = pos;
			val[tp++] = seg[pos];
			seg[pos] = std::max(seg[pos], x);
		}
	}
	inline int query(int pos)
	{
		int res = -1e9;
		for (; pos; pos -= pos & -pos) {
			res = std::max(res, seg[pos]);
		}
		return res;
	}
	inline void pop(int x)
	{
		while (tp > x) {
			tp--;
			seg[idx[tp]] = val[tp];
		}
	}
} seg[2];
char ans[200005];
int arr[200005], val[200005], enp[200005][2], suf[200005];
int main()
{
	// freopen("AGC028-E.in", "r", stdin);
	int n, cur_mx = 1e9;
	scanf("%d", &n);
	for (int i = 0; i < n; i++) {
		scanf("%d", arr + i);
		arr[i] = n - arr[i] + 1;
		val[i] = arr[i] < cur_mx;
		if (arr[i] < cur_mx) {
			cur_mx = arr[i];
		}
	}
	seg[0].n = seg[1].n = n;
	memset(seg[0].seg, 0, sizeof(seg[0].seg));
	memset(seg[1].seg, -0x3f, sizeof(seg[1].seg));
	for (int i = n - 1; i >= 0; i--) {
		suf[i] = suf[i + 1] + val[i];
		int tmp[2];
		for (int j = 0; j < 2; j++) {
			enp[i][j] = seg[j].tp;
			tmp[j] = std::max(0, seg[j].query(arr[i]));
		}
		for (int j = 0; j < 2; j++) {
			int x = tmp[j] + val[i] + 1;
			seg[x & 1].modify(arr[i], x);
		}
	}
	std::vector<int> cur = {n + 1, n + 1}, len = {0, 0};
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < 2; j++) {
			seg[j].pop(enp[i][j]);
		}
		for (int j = 0; j < 2; j++) {
			auto ncur = cur, nlen = len;
			if (arr[i] < ncur[j]) {
				ncur[j] = arr[i];
				nlen[j]++;
			}
			bool flg = false;
			if (i + 1 == n) {
				flg = nlen[0] == nlen[1];
			} else {
				for (int k = 0; k < 2; k++) {
					int x = nlen[k] - nlen[k ^ 1] + suf[i + 1];
					if (x >= 0 && seg[x & 1].query(ncur[k ^ 1]) >= x) {
						flg = true;
					}
				}
			}
			if (flg) {
				ans[i] = j + '0';
				cur = ncur;
				len = nlen;
				break;
			}
		}
		if (!ans[i]) {
			puts("-1");
			return 0;
		}
	}
	puts(ans);
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:47:9: error: 'memset' was not declared in this scope
   47 |         memset(seg[0].seg, 0, sizeof(seg[0].seg));
      |         ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <vector>
  +++ |+#include <cstring>
    4 | struct segT {
Language: C++

#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef pair<int,P> P1;
typedef pair<P,P> P2;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 1000000000
#define mod 1000000007
#define fi first
#define sc second
#define rep(i,x) for(int i=0;i<x;i++)
#define repn(i,x) for(int i=1;i<=x;i++)
#define SORT(x) sort(x.begin(),x.end())
#define ERASE(x) x.erase(unique(x.begin(),x.end()),x.end())
#define POSL(x,v) (lower_bound(x.begin(),x.end(),v)-x.begin())
#define POSU(x,v) (upper_bound(x.begin(),x.end(),v)-x.begin())
struct bity
{
	#define d 63
	vector<ll> wek;
	bity(){}
	bity(int v)
	{
		wek.resize((v/d)+2, 0);
	}
	void upper(int v)
	{
	    while(wek.size() < (v/d)+2)) wek.pb(0);
	}
	void ustaw(int v)
	{
		wek[v/d]|=(1LL<<(v%d));
	}
	void zeruj()
	{
		fill(wek.begin(), wek.end(), 0);
	}
	int licz()
	{
		int ret=0;
		for (const ll &i : wek)
			ret+=__builtin_popcountll(i);
		return ret;
	}
};
 
void oruj(bity &a, const bity &b)
{
	int r=min(a.wek.size(), b.wek.size());
	for (int i=0; i<r; i++)
		a.wek[i]|=b.wek[i];
}

int n;
char f[505][505];
bity B[10][505];
ll ans;
int C[10];
int cur[10];
int main(){
	scanf("%d",&n);
	for(int i=0;i<n;i++) scanf("%s",&f[i]);
	rep(i,n)rep(j,n)if(f[i][j]!='#')C[f[i][j]-'0']++;
	repn(x,9) rep(i,n) B[x][i] = bity(0);
	for(int i=0;i<2*n-1;i++){
		for(int j=min(i,n-1);j>=max(0,i-n+1);j--){
			int x = j, y = i-j;
			if(f[x][y] != '#'){
			    B[f[x][y]-'0'][x].upper(C[f[x][y]-'0']);
				if(x) repn(w,9) oruj(B[w][x],B[w][x-1]);
				repn(w,9) ans += 1LL*w*(f[x][y]-'0')*(B[w][x].licz());
				B[f[x][y]-'0'][x].ustaw(cur[f[x][y]-'0']++);
			}
			else{
				repn(w,9) B[w][x].zeruj();
			}
		}
	}
	cout << ans << endl;
}


Compiler output:
a.cc: In member function 'void bity::upper(int)':
a.cc:37:40: error: expected primary-expression before ')' token
   37 |             while(wek.size() < (v/d)+2)) wek.pb(0);
      |                                        ^
Language: C++

#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef pair<int,P> P1;
typedef pair<P,P> P2;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 1000000000
#define mod 1000000007
#define fi first
#define sc second
#define rep(i,x) for(int i=0;i<x;i++)
#define repn(i,x) for(int i=1;i<=x;i++)
#define SORT(x) sort(x.begin(),x.end())
#define ERASE(x) x.erase(unique(x.begin(),x.end()),x.end())
#define POSL(x,v) (lower_bound(x.begin(),x.end(),v)-x.begin())
#define POSU(x,v) (upper_bound(x.begin(),x.end(),v)-x.begin())
struct bity
{
	#define d 63
	vector<ll> wek;
	bity(){}
	bity(int v)
	{
		wek.resize((v/d)+2, 0);
	}
	void upper(int v)
	{
	    while(wek.size() < (v/d)+2)) wek.pb(0);
	}
	void ustaw(int v)
	{
		wek[v/d]|=(1LL<<(v%d));
	}
	void zeruj()
	{
		fill(wek.begin(), wek.end(), 0);
	}
	int licz()
	{
		int ret=0;
		for (const ll &i : wek)
			ret+=__builtin_popcountll(i);
		return ret;
	}
};
 
void oruj(bity &a, const bity &b)
{
	int r=min(a.wek.size(), b.wek.size());
	for (int i=0; i<r; i++)
		a.wek[i]|=b.wek[i];
}

int n;
char f[505][505];
bity B[10][505];
ll ans;
int C[10];
int cur[10];
int main(){
	scanf("%d",&n);
	for(int i=0;i<n;i++) scanf("%s",&f[i]);
	rep(i,n)rep(j,n)if(f[i][j]!='#')C[f[i][j]-'0']++;
	repn(x,9) rep(i,n) B[x][i] = bity(0);
	for(int i=0;i<2*n-1;i++){
		for(int j=min(i,n-1);j>=max(0,i-n+1);j--){
			int x = j, y = i-j;
			if(f[x][y] != '#'){
			    B[f[x][y]-'0'][x].upper(cur[f[x][y]-'0']+1);
				if(x) repn(w,9) oruj(B[w][x],B[w][x-1]);
				repn(w,9) ans += 1LL*w*(f[x][y]-'0')*(B[w][x].licz());
				B[f[x][y]-'0'][x].ustaw(cur[f[x][y]-'0']++);
			}
			else{
				repn(w,9) B[w][x].zeruj();
			}
		}
	}
	cout << ans << endl;
}


Compiler output:
a.cc: In member function 'void bity::upper(int)':
a.cc:37:40: error: expected primary-expression before ')' token
   37 |             while(wek.size() < (v/d)+2)) wek.pb(0);
      |                                        ^
Language: C++

#include<cstdio>
#include<algorithm>
using namespace std;
char p[510][510];
int Up[510][510], Down[510][510];
int B[510][510], E[510][510], BB[510], EE[510], S[510];
int T[510][510], v[510];
int n, w[510][510], L[510], R[510];
long long res;
int main() {
	int i, j, k;
	scanf("%d", &n);
	for (i = 1; i <= n; i++) {
		scanf("%s", p[i] + 1);
		for (j = 1; j <= n; j++) {
			if(p[i][j]>='0' && p[i][j]<='9')w[i][j] = p[i][j] - '0';
			else w[i][j] = -1;
		}
	}
	for (i = 0; i <= n + 1; i++)for (j = 0; j <= n + 1; j++)if (i == 0 || i > n || j == 0 || j > n)w[i][j] = -1;
	for (i = n; i >= 1; i--) {
		for (j = n; j >= 1; j--) {
			if (w[i][j] == -1)continue;
			Down[i][j] = i;
			Down[i][j] = max(Down[i][j], Down[i][j + 1]);
			Down[i][j] = max(Down[i][j], Down[i + 1][j]);
		}
	}
	for (i = 1; i <= n; i++) {
		for (j = 1; j <= n; j++) {
			if (w[i][j] == -1) {
				Up[i][j] = n + 1;
				continue;
			}
			Up[i][j] = i;
			if(w[i][j-1] != -1)Up[i][j] = min(Up[i][j], Up[i][j - 1]);
			if(w[i-1][j] != -1)Up[i][j] = min(Up[i][j], Up[i - 1][j]);
		}
	}
	for (i = 1; i <= n; i++) {
		int pv = 0, s = 0;
		for (j = 1; j <= n; j++) {
			if (w[i][j] == -1) {
				pv = j;
				B[i][j] = 1e9, E[i][j] = -1e9;
				s = 0;
				continue;
			}
			T[i][j] = pv + 1;
			res += s*w[i][j];
			s += w[i][j];
			int b = T[i][j], e = j;
			if (i != 1) {
				B[i][j] = 1e9, E[i][j] = -1e9;
				for (k = b; k <= e; k++) {
					if (w[i - 1][k] != -1) {
						B[i][j] = min(B[i][j], T[i - 1][k]);
						E[i][j] = max(E[i][j], k);
					}
				}
			}
		}
		for (j = 1; j <= n; j++) BB[j] = B[i][j], EE[j] = E[i][j];
		for (j = i - 1; j >= 1; j--) {
			for (k = 1; k <= n; k++) {
				S[k] = S[k - 1];
				if (Down[j][k] >= i) {
					S[k] += w[j][k];
				}
				if (j > 1) {
					if (B[j][k] <= E[j][k])v[k] = 1;
					else v[k] = 0;
				}
			}
			for (k = 1; k <= n; k++) {
				if (BB[k] <= EE[k]) {
					res += (S[EE[k]] - S[BB[k] - 1])*w[i][k];
				}
			}
			if (j == 1)break;
			for (k = 1; k <= n; k++) {
				L[k] = L[k - 1];
				if (v[k])L[k] = k;
			}
			R[n + 1] = n + 1;
			for (k = n; k >= 1; k--) {
				R[k] = R[k + 1];
				if (v[k])R[k] = k;
			}
			for (k = 1; k <= n; k++) {
				int b = BB[k], e = EE[k];
				if (Up[i][k] >= j)continue;
				BB[k] = B[j][R[b]], EE[k] = E[j][L[e]];
			}
		}
	}
	printf("%lld\n", res);


Compiler output:
a.cc: In function 'int main()':
a.cc:97:31: error: expected '}' at end of input
   97 |         printf("%lld\n", res);
      |                               ^
a.cc:10:12: note: to match this '{'
   10 | int main() {
      |            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
bitset<250000>ch[250000];
int N,M;
vector<string>V;
int MP[1500][1500][10],emt[10];
ll to=0;
void ree(int r,int c)
{
    printf("to:: %lld\n",to);
    //for(int i=0;i<10;i++)printf("%d :: %d\n",i,MP[r][c][i]);
    int*cnt=MP[r][c];--cnt[V[r][c]-'0'];
   // for(int i=0;i<10;i++)printf("%d :: %d & %d\n",i,cnt[i],MP[r][c][i]);
    for(int i=0;i<10;i++)
        to+=((V[r][c]-'0'+i>9)+1)*cnt[i];
    /*for(int i=0;i<10;i++)
        for(int j=i;j<10;j++)
            to+=((i+j>9)+1)*cnt[i]*(ll)(i==j?cnt[i]-1:cnt[j]);
            */
}
int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    cin>>N;
    V.resize(N);
    for(auto&I:V)cin>>I;
    for(int i=0;i<N;i++)
        for(int j=0;j<N;j++)
            for(int k=0;k<2;k++)
                if(V[i][j]!='#')
                {
                    int r=i,c=j;
                    if(k&1)r++;
                    else c++;
                    if(V[r][c]!='#')
                        ch[i*500+j].set(r*500+c);
                }
    for(int k=0;k<250000;k++)
        for(int i=0;i<k;i++)
            if(ch[i].test(k))
                ch[i]|=ch[k];
    for(int k=0,nm;k<250000;k++)
    {
        nm=V[k/500][k%500]-'0';
        for(int i=ch[k]._Find_first();i<ch[k].size();i=ch[k]._Find_next(i))
            to+=(V[i/500][i%500]-'0'+nm>9)+1;
    }
    cout<<to;
}


Compiler output:
/tmp/cceHif4s.o: in function `ree(int, int)':
a.cc:(.text+0x12): relocation truncated to fit: R_X86_64_PC32 against symbol `to' defined in .bss section in /tmp/cceHif4s.o
a.cc:(.text+0x54): relocation truncated to fit: R_X86_64_PC32 against symbol `MP' defined in .bss section in /tmp/cceHif4s.o
a.cc:(.text+0x6e): relocation truncated to fit: R_X86_64_PC32 against symbol `V[abi:cxx11]' defined in .bss section in /tmp/cceHif4s.o
a.cc:(.text+0xbc): relocation truncated to fit: R_X86_64_PC32 against symbol `V[abi:cxx11]' defined in .bss section in /tmp/cceHif4s.o
a.cc:(.text+0x119): relocation truncated to fit: R_X86_64_PC32 against symbol `to' defined in .bss section in /tmp/cceHif4s.o
a.cc:(.text+0x123): relocation truncated to fit: R_X86_64_PC32 against symbol `to' defined in .bss section in /tmp/cceHif4s.o
/tmp/cceHif4s.o: in function `main':
a.cc:(.text+0x163): relocation truncated to fit: R_X86_64_PC32 against symbol `N' defined in .bss section in /tmp/cceHif4s.o
a.cc:(.text+0x17b): relocation truncated to fit: R_X86_64_PC32 against symbol `N' defined in .bss section in /tmp/cceHif4s.o
a.cc:(.text+0x187): relocation truncated to fit: R_X86_64_PC32 against symbol `V[abi:cxx11]' defined in .bss section in /tmp/cceHif4s.o
a.cc:(.text+0x196): relocation truncated to fit: R_X86_64_PC32 against symbol `V[abi:cxx11]' defined in .bss section in /tmp/cceHif4s.o
a.cc:(.text+0x238): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

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

#define GET(x,y) *(map+((y-1)*(n+1))+(x-1))
#define NUM(x,y) ((GET(x,y))-'0')

int n;
char* map;

int isOK(int Xx,int Xy,int Yx,int Yy)
{
  if( (Xx==Yx)&&(Xy==Yy) ) return 1;
  if(Xx>Yx) return 0; 
  if(Xy>Yy) return 0; 
  if( '#' == GET(Xx, Xy) ) return 0;
  if( isOK(Xx+1, Xy, Yx, Yy) ) return 1;
  if( isOK(Xx, Xy+1, Yx, Yy) ) return 1;
  return 0;
}

int calc(int Xx,int Xy,int Yx,int Yy)
{
  int x,y;
  int ok=isOK(Xx,Xy,Yx,Yy);
//  printf("%d,%d,%d,%d=%d/", Xx,Xy,Yx,Yy, ok);
  return ok*NUM(Xx,Xy)*NUM(Yx,Yy);
}

int main(void)
{
  int i;
  int sum=0;
  int Xx,Xy,Yx,Yy;
  scanf("%d",&n); 
//  printf ("%d\n",n);
  map = malloc((n+1)*(n+1));

  for(i=0;i<n;i++)
    scanf("%s",(map+(n+1)*i)); 
//  for(i=0;i<n;i++)
//    printf("%s\n",(map+(n+1)*i));

  for(Xx=1;Xx<=n;Xx++)
  {
    for(Xy=1;Xy<=n;Xy++)
    {
      if( '#' == GET(Xx, Xy) ) continue;
      for(Yx=1;Yx<=n;Yx++)
      {
        for(Yy=1;Yy<=n;Yy++)
        {
          if( (Xx>=Yx) && (Xy>=Yy) ) continue;
          if( '#' == GET(Yx, Yy) )
          {
//            if( (Xx == Yx) || (Xy == Yy ) ) break; 
            continue;
          }
          sum += calc(Xx,Xy,Yx,Yy);
        }
      }      
    }
  }
  printf( "%d", sum );
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:15: error: invalid conversion from 'void*' to 'char*' [-fpermissive]
   36 |   map = malloc((n+1)*(n+1));
      |         ~~~~~~^~~~~~~~~~~~~
      |               |
      |               void*
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main (void)
{
  cin>>x;
  if(x==1){cout<<"Hello World"<<endl;}
  else
  {
    cin>>a>>b;
    cout<<a+b<<endl;
    
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: 'x' was not declared in this scope
    6 |   cin>>x;
      |        ^
a.cc:10:10: error: 'a' was not declared in this scope
   10 |     cin>>a>>b;
      |          ^
a.cc:10:13: error: 'b' was not declared in this scope
   10 |     cin>>a>>b;
      |             ^
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main (void)
{
  cin>>x;
  if(x==1){cout<<"Hello World"<<endl}
  else
  {
    cin>>a>>b;
    cout<<a+b<<endl;
    
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: 'x' was not declared in this scope
    6 |   cin>>x;
      |        ^
a.cc:7:37: error: expected ';' before '}' token
    7 |   if(x==1){cout<<"Hello World"<<endl}
      |                                     ^
      |                                     ;
a.cc:10:10: error: 'a' was not declared in this scope
   10 |     cin>>a>>b;
      |          ^
a.cc:10:13: error: 'b' was not declared in this scope
   10 |     cin>>a>>b;
      |             ^
Language: C++

#include<Iostream>
using namespace std;
int main(){
  int a,b,c;
  cin>>a;
  if(a==1)
    cout<<"Hellow World";
  else {
    cin>>b>>c;
    cout<<b+c;
  }
  return 0;
}
    
    

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

#include <bits/stdc++.h>
using namespace std;
using ll =long long;
#define all(v) v.begin(),v.end()
 
int main() {
ll N;
  cin>>N;
  if(N==1) {
cou<<"Hello World"<<endl;
  return 0;
  }
  ll A,B;
  cin>>A>>B;
  cout<<A+B<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:1: error: 'cou' was not declared in this scope; did you mean 'cos'?
   10 | cou<<"Hello World"<<endl;
      | ^~~
      | cos
Language: C++

#include<iostream>
using namespace std;
int main(){
int k;
  cin>>k;
  if(k==1)
    cout <<"Hello World"<<endl;
  if(k==2)
    int a,b;
      cin >>a>>b;
      cout<<a+b<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: 'a' was not declared in this scope
   10 |       cin >>a>>b;
      |             ^
a.cc:10:16: error: 'b' was not declared in this scope
   10 |       cin >>a>>b;
      |                ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin >> c;
  if (n==1){
    cout << "Hello World" << endl;
  }
  else{
    int a,b;
    cin >> a >>b;
    cout << a+b << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: 'c' was not declared in this scope
    5 |   cin >> c;
      |          ^
Language: C++

#include <iostream>
using namespace std;

int main() {
    int N, A, B;
    cin >> N;

    if (N == 1) cout << "Hello World"
    else {
        cin >> A >> B;
        cout << A + B << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:38: error: expected ';' before 'else'
    8 |     if (N == 1) cout << "Hello World"
      |                                      ^
      |                                      ;
    9 |     else {
      |     ~~~~
Language: Java

import java.util.*;

public class A{
	public static void main(String[] args) {
		Scanner fs = new Scanner(System.in);
		int n = fs.nextInt();
		if(n == 1)System.out.println("Hello World");
		else {
			int a = fs.nextInt(),b = fs.nextInt();
			System.out.println(a+b);
		}
		fs.close();
	}
}

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

package Atcoder;

import java.util.Scanner;

public class A {

	public static void main(String[] args) {
		Scanner fs = new Scanner(System.in);
		int n = fs.nextInt();
		if(n == 1)System.out.println("Hello World");
		else {
			int a = fs.nextInt(),b = fs.nextInt();
			System.out.println(a+b);
		}
		fs.close();
	}

}


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

import java.util.Scanner;

public class A {

	public static void main(String[] args) {
		Scanner fs = new Scanner(System.in);
		int n = fs.nextInt();
		if(n == 1)System.out.println("Hello World");
		else {
			int a = fs.nextInt(),b = fs.nextInt();
			System.out.println(a+b);
		}
		fs.close();
	}

}

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

//package Atcoder;

import java.util.Scanner;

public class D {

	public static void main(String[] args) {
		Scanner fs = new Scanner(System.in);
		int n = fs.nextInt();
		if(n == 1)System.out.println("Hello World");
		else {
			int a = fs.nextInt(),b = fs.nextInt();
			System.out.println(a+b);
		}
		fs.close();

	}

}


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

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

int main() {
  int N,T;
  cin>>N>>T;
  int ans=10000;
  for(int i=0;i<N;i++){
    int c,t;
    cin>>c>>t;
    if(t<=T){
      ans=min(ans,c);
    }
  }
  if(ans==10000){
    cout<<TLE<<endl;
  }
  else{
    cout<<ans<<endl;
  }
}




Compiler output:
a.cc: In function 'int main()':
a.cc:16:11: error: 'TLE' was not declared in this scope
   16 |     cout<<TLE<<endl;
      |           ^~~
Language: Java

public class Main{
  
  	public static void main(String[] args){
      	
      	Scanner sc = new Scanner(System.in);
      	int N = sc.nextInt();
      
      	if(N == 1){
          System.out.println("Hello World");
        }else if(N == 2){
          int A = sc.nextInt();
          int B = sc.nextInt();
          System.out.println(A+B);
        }
    }
}

Compiler output:
Main.java:5: error: cannot find symbol
      	Scanner sc = new Scanner(System.in);
      	^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
      	Scanner sc = new Scanner(System.in);
      	                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.util.*;

public class Main{
  
  	pubic static void main(String[] args){
      	
      	Scanner sc = new Scanner(System.in);
      	int N = sc.nextInt();
      
      	if(N == 1){
          System.out.println("Hello World");
        }else if(N == 2){
          int A = sc.nextInt();
          int B = sc.nextInt();
          System.out.println(A+B);
        }
    }
}
      	

Compiler output:
Main.java:5: error: <identifier> expected
  	pubic static void main(String[] args){
  	     ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
void h(){
  cout << "Hello World" << endl;
  exit(0);
}
int main() {
  int x,a,b; cin>>x;
  if(x==1) h();
  cin>>x>>y;
  cout << x+y << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: 'y' was not declared in this scope
   10 |   cin>>x>>y;
      |           ^
Language: Java

import java.util.*;

public class Main {
    public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
            if(N==1){
 			System.out.println("Hello World");
 			
        }else{
        int A = sc.nextInt();
        int B = sc.nextInt(); 

			System.out.println(A+B);
    }
}

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

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

int main()
 {
	//code
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

    int n;
    cin>>n;
    if(n==2){
        int a,b;
        cin>>a>>b;
        cout<<a+b<<endl;
    }
 else   if(n==1){
        cout<<"Hello World"<<endl;
    }
}
	return 0;
}

Compiler output:
a.cc:21:9: error: expected unqualified-id before 'return'
   21 |         return 0;
      |         ^~~~~~
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Language: C++

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

int main() {
int n;
cin>>n;
string a,b;
cin>>a>>b;
if(n%2==0)cout<<a+b<<endl;
else cout<<"Hello"<<" "<<"World“<<endl;
}


Compiler output:
a.cc:10:26: warning: missing terminating " character
   10 | else cout<<"Hello"<<" "<<"World“<<endl;
      |                          ^
a.cc:10:26: error: missing terminating " character
   10 | else cout<<"Hello"<<" "<<"World“<<endl;
      |                          ^~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:11:1: error: expected primary-expression before '}' token
   11 | }
      | ^
Language: C++

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

int main() {
int n;
cin>>n;
string a,b;
cin>>a>>b;
if(n%2==0)cout<<a+b<<endl;
else cout<<“Hello"<<" "<<"World“<<endl;
}


Compiler output:
a.cc:10:12: error: extended character “ is not valid in an identifier
   10 | else cout<<“Hello"<<" "<<"World“<<endl;
      |            ^
a.cc:10:23: error: extended character “ is not valid in an identifier
   10 | else cout<<“Hello"<<" "<<"World“<<endl;
      |                       ^
a.cc: In function 'int main()':
a.cc:10:12: error: '\U0000201cHello' was not declared in this scope
   10 | else cout<<“Hello"<<" "<<"World“<<endl;
      |            ^~~~~~
Language: C++

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

int main() {
int n;
cin>>n;
string a,b;
cin>>a>>b;
if(n%2==0)cout<<a+b<<endl;
else cout<<“Hello World“<<endl;
}


Compiler output:
a.cc:10:12: error: extended character “ is not valid in an identifier
   10 | else cout<<“Hello World“<<endl;
      |            ^
a.cc:10:19: error: extended character “ is not valid in an identifier
   10 | else cout<<“Hello World“<<endl;
      |                   ^
a.cc: In function 'int main()':
a.cc:10:12: error: '\U0000201cHello' was not declared in this scope
   10 | else cout<<“Hello World“<<endl;
      |            ^~~~~~
Language: C++

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

int main() {
int n;
cin>>n;
string a,b;
cin>>a>>b;
if(n%2==0)cout<<a+b<<endl;
else cout<<“ Hello World“<<endl;
}


Compiler output:
a.cc:10:12: error: extended character “ is not valid in an identifier
   10 | else cout<<“ Hello World“<<endl;
      |            ^
a.cc:10:20: error: extended character “ is not valid in an identifier
   10 | else cout<<“ Hello World“<<endl;
      |                    ^
a.cc: In function 'int main()':
a.cc:10:12: error: '\U0000201c' was not declared in this scope
   10 | else cout<<“ Hello World“<<endl;
      |            ^
Language: C++


using namespace std;

int main() {
	int x;
	cin >> x;
	if (x == 1) cout << "Hello World" << endl;
	else{
		int a,b;
		cin >> a >> b;
		cout << a + b << endl;
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin >> x;
      |         ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | 
a.cc:7:21: error: 'cout' was not declared in this scope
    7 |         if (x == 1) cout << "Hello World" << endl;
      |                     ^~~~
a.cc:7:21: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:46: error: 'endl' was not declared in this scope
    7 |         if (x == 1) cout << "Hello World" << endl;
      |                                              ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | 
a.cc:11:17: error: 'cout' was not declared in this scope
   11 |                 cout << a + b << endl;
      |                 ^~~~
a.cc:11:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:34: error: 'endl' was not declared in this scope
   11 |                 cout << a + b << endl;
      |                                  ^~~~
a.cc:11:34: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

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

int main() {
	int x;
	cin >> x;
	if (x == 1) cout << "Hello World" << endl;
	else{
		int a,b;
		cin >> a >> b;
		cout << a + b << endl;
}


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

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

int main() {
int n;
  cin >> n;
  if(n == 1) cout << "Hello World" << endl;
  else if(n == 1) {
    int a, b;
    cin >> a >> b;
    cout << a+b << endl;
}

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

    #include<bits/stdc++.h>
    #define REP(i,n) for(long long i=0;i<(long long)n;i++)
    //#define _GLIBCXX_DEBUG
    using namespace std;
    using ll = long long;
    using Pi = pair<int,int>;
    using Pl = pair<ll,ll>;
    using Vl = vector<ll>;
    using vi = vector<int>;
    using Graph = vector<vi>;
    
    int main(){
        cin.tie(0);
        ios::sync_with_stdio(false);
        //std::cout << std::fixed << std::setprecision(15); //"for float-base problem"
        int N,A,B;
      cin>>N;
      if(N==1){
        cout << "Hello World" << endl;
        return 0;
        }else{
        cin >> A >> B;
        cout << A+B<< endl;
      }
      return 0}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:15: error: expected ';' before '}' token
   25 |       return 0}
      |               ^
      |               ;
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;
using ll = long long;

int main()
{
	int n;
	cin >> n;
	if (n == 1)
		cout << "Hello World"
	else
	{
		int a, b;
		cin >> a >> b;
		cout << a + b;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:38: error: expected ';' before 'else'
   12 |                 cout << "Hello World"
      |                                      ^
      |                                      ;
   13 |         else
      |         ~~~~
Language: C++

#pragma GCC optimize ("Ofast")
#pragma GCC target ("tune=native")
#include <bits/stdc++.h>
using namespace std;
int main() { ios_base::sync_with_stdio(false); cin.tie(0); int N; cin >> N; int x[N], y[N], h[N], height, expected; for (int i = 0; i < N; i++) { 	cin >> x[i] >> y[i] >> h[i]; if(h[i]) height = h[i] + abs(x[i] - i) + abs(y[i] - j);} for (int i = 0; i <= 100; i++) { 	for (int j = 0; j <= 100; j++) { 		int k; 		for (k = 1; k < N; k++) { 			expected = max(height - abs(x[k] - i) - abs(y[k] - j), 0); 			if (h[k] != expected) break; 		} 		if (k == N) { 			cout << i << ' ' << j << ' ' << height; 			exit(EXIT_SUCCESS); 		} 	} } return 0; }


Compiler output:
a.cc: In function 'int main()':
a.cc:5:234: error: 'j' was not declared in this scope
    5 | int main() { ios_base::sync_with_stdio(false); cin.tie(0); int N; cin >> N; int x[N], y[N], h[N], height, expected; for (int i = 0; i < N; i++) {       cin >> x[i] >> y[i] >> h[i]; if(h[i]) height = h[i] + abs(x[i] - i) + abs(y[i] - j);} for (int i = 0; i <= 100; i++) {  for (int j = 0; j <= 100; j++) {                int k;          for (k = 1; k < N; k++) {                       expected = max(height - abs(x[k] - i) - abs(y[k] - j), 0);                      if (h[k] != expected) break;            }               if (k == N) {                   cout << i << ' ' << j << ' ' << height;                         exit(EXIT_SUCCESS);             }       } } return 0; }
      |                                                                                                                                                                                                                                          ^
Language: C++

#include <bits/stdc++.h>
using namespace std; 
int main(){
  int n,a,b;
  cin >> n>> a >>b;
  if(n==1){
    cout << "Hello World";
  }else{
    cout << a+b;
  }

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

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


int main() {
    int n;
    cin >> n;
    if(a == 1){
        cout << "Hello World";
    }
    else
    {
        int a, b;
        cin >> a >> b;
        cout << a+b;
    }
    
    cout << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:8: error: 'a' was not declared in this scope
   14 |     if(a == 1){
      |        ^
a.cc:19:13: error: redeclaration of 'int a'
   19 |         int a, b;
      |             ^
a.cc:14:8: note: '<typeprefixerror>a' previously declared here
   14 |     if(a == 1){
      |        ^
Language: C++

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


int main() {
    int n;
    cin >> a;
    if(a == 1){
        cout << "Hello World";
    }
    else
    {
        int a, b;
        cin >> a >> b;
        cout << a+b;
    }
    
    cout << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:12: error: 'a' was not declared in this scope
   13 |     cin >> a;
      |            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> V;
#define rep(i,e) for(ll i=0;i<e;i++ )
typedef pair<ll,ll> P;
const ll mod = 1e9+7;
const ll INF = INT32_MAX;

ll i,j;





int main(){
   ll N;
   cin>>N;
   if(N==1)cout<<"Hello World"<<endl;
   else{
      ll A,B;
      cin>>A>>B;
      cout<<A+B<<endl;
   }


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

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

using ll=long long;
const ll MOD=1000000007;

int main() {
  int n;
  cin >> n;
  if(n==1)
    cout << "hello World" << endl;
  else{
    int a,b;
    cin >> a >> b;
    cout << a+b << endl;
}

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

// include
// ------------------------------------------------
#include <bits/stdc++.h>
#include <vector>
#include <algorithm>
#include <math.h>

using namespace std;

// func
// ------------------------------------------------
int CalcSumOfDigit(int n);      // 各桁の和を計算する。
string upper(string str);       // 英字を大文字に変換する。
string lower(string str);       // 英字を小文字に変換する。

// define
// ------------------------------------------------
#define all(a)        (a).begin(),(a).end()
#define rall(a)       (a).rbegin(),(a).rend()
#define pb            push_back
#define sz(a)         int((a).size())
#define rep(i,n)      for(int(i)=0;(i)<(n);(i)++)
#define repe(i,n)     for(int(i)=0;(i)<=(n);(i)++)
#define vsort(v)      sort((v).begin(),(v).end())
#define rvsort(v)     sort(rall((v)))
#define vi            vector<int>
#define GCD(a,b)      __gcd((a),(b))
#define LCM(a,b)      (a)/GCD((a),(b))*(b)

const int INF = 1e9;

// code
// ------------------------------------------------
int main() {

  int n;
  cin >> n:

  if(n ==1) 
    cout << "Hello World";
  else
  {
    int a,b;
    cin >> a >> b;
    cout << a + b;
  }
  
  return 0;
}

// funcの実体
// ------------------------------------------------
int CalcSumOfDigit(int n)
{
  int s = 0;
  while(n)
  {
    s += n % 10;
    n = n / 10;
  }
  return s;
}

string upper(string str)
{
  for(auto itr = str.begin();itr != str.end() ; itr++)
  {
    if(97 <= *itr && *itr <= 122)
    {
      *itr = *itr - 32;
    }
  }
  return str;
}

string lower(string str)
{
  for(auto itr = str.begin();itr != str.end() ; itr++)
  {
    if(65 <= *itr && *itr <= 90)
    {
      *itr = *itr + 32;
    }
  }
  return str;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:37:11: error: expected ';' before ':' token
   37 |   cin >> n:
      |           ^
      |           ;
a.cc:41:3: error: 'else' without a previous 'if'
   41 |   else
      |   ^~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(ll i=0;i<(n);++i)
#define all(a) (a).begin(),(a).end()
#define dunk(a) cout << (a) << endl
#define rall(a) (a).rbegin(),(a).rend()
const int INF = 2e9;
using namespace std;
using Graph = vector<vector<int>>;
typedef pair<int,int> P;
typedef long long ll;

int main(){
  int N;
  cin >> N;
  if(N==1) printf("%s","Hello World");
  else {cin >> A >> B;
              printf("%d",A+B);
             }
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:16:16: error: 'A' was not declared in this scope
   16 |   else {cin >> A >> B;
      |                ^
a.cc:16:21: error: 'B' was not declared in this scope
   16 |   else {cin >> A >> B;
      |                     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n;cin>>n;
    if(n==1)cout<<"Hello World"<<endl;
    else{
         int a,b;cin>>a>>b;
         cout<<a+b<<endl;
        }
    }
}

Compiler output:
a.cc:11:1: error: expected declaration before '}' token
   11 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define lvector vector<ll> 
#define P pair<ll,ll>
#define rep(i,n) for(ll (i)=0; (i)<(n); ++(i))
#define print(a) cout << (a) << endl

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ll n,a,b;cin>>n>>a>>b;
  if(n==1) puts("Hello World");else print(A+B);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:43: error: 'A' was not declared in this scope
   13 |   if(n==1) puts("Hello World");else print(A+B);
      |                                           ^
a.cc:7:27: note: in definition of macro 'print'
    7 | #define print(a) cout << (a) << endl
      |                           ^
a.cc:13:45: error: 'B' was not declared in this scope
   13 |   if(n==1) puts("Hello World");else print(A+B);
      |                                             ^
a.cc:7:27: note: in definition of macro 'print'
    7 | #define print(a) cout << (a) << endl
      |                           ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  int n;cin>>n;
  if(n==1)cout<<"Hello World\n";
  else int a;cin>>n>>a;cout<<n+a<<endl;}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:22: error: 'a' was not declared in this scope
    6 |   else int a;cin>>n>>a;cout<<n+a<<endl;}
      |                      ^
Language: C++

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

int main(){
  int n;
  cin n;
  if(n==1)
    cout << "Hello World" << endl;
  else{
    int a,b;
    cin >> a >> b;
    cout << a+b << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'n'
    6 |   cin n;
      |      ^~
      |      ;
Language: C++

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

int main(){
  int N;
  cin >> N;
  if (N == 1){
    cout << "Hello World" << endl;
  }
  else {
    cin >> A >> B;
    cout << A + B << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: 'A' was not declared in this scope
   11 |     cin >> A >> B;
      |            ^
a.cc:11:17: error: 'B' was not declared in this scope
   11 |     cin >> A >> B;
      |                 ^
Language: C++

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

int main(){
  int N;
  cin >> N;
  if (N == 1){
    cout << "Hello World" << endl;
  }
  else {
    cin >> A >> B;
    cout << A + B << endl;
  }
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespaced'
    2 | using namespaced std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> N;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |     cout << "Hello World" << 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:8:30: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |     cout << "Hello World" << 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:12: error: 'A' was not declared in this scope
   11 |     cin >> A >> B;
      |            ^
a.cc:11:17: error: 'B' was not declared in this scope
   11 |     cin >> A >> B;
      |                 ^
a.cc:12:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |     cout << A + B << 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:12:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   12 |     cout << A + B << endl;
      |                      ^~~~
      |                      std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  int n,a,b;
  cin >> n;
  if(n==1) cout << "Hello World" <<< endl;
  else{
    cin >> a >> b;
    cout << a+b << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:36: error: expected primary-expression before '<' token
    6 |   if(n==1) cout << "Hello World" <<< endl;
      |                                    ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
  int n;
  cin>>n;
  if(n==0)
  {
  	cout<<"Hello World\n";
	  return 0; 
  }
  cin>>a>>b;
  cout<<a+b<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:8: error: 'a' was not declared in this scope
   12 |   cin>>a>>b;
      |        ^
a.cc:12:11: error: 'b' was not declared in this scope
   12 |   cin>>a>>b;
      |           ^
Language: C++

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

int main(){

string N;
cin>>N;
int i;

for(i=0;i<2;i++){
if(N.at(i)==1){i=9;}
else if(N.at(i)==9){i=1}}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:24: error: expected ';' before '}' token
   12 | else if(N.at(i)==9){i=1}}
      |                        ^
      |                        ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define REP(i,n) for(int i=0; i<(n); i++)
#define REP2(i,x,n) for(int i=x; i<(n); i++)
int main()
{
    int N;
    cin >> N;

    if (N==1){
        cout << "Hello World" << endl;
    }
    else{
        int A, B;
    cin >> A>>b;
    cout << A+B << endl; 
    }
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:15: error: 'b' was not declared in this scope
   15 |     cin >> A>>b;
      |               ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int a[3], i = 0;
    while(cin >> a[i++]);
    if(i == 1) cout << "Hello World";
    else cout << a[1] + a[2];


Compiler output:
a.cc: In function 'int main()':
a.cc:7:30: error: expected '}' at end of input
    7 |     else cout << a[1] + a[2];
      |                              ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: Java

import java.util.*;

public class Main{
  public static void main(String...args){
    Scanner s = new Scanner(System.in);
    int n = s.nextInt();
    switch(n){
      case 1: System.out.println("Hello World"); break;
      case 2: int a = s.nextInt, b = s.nextInt(); System.out.println(a + b); break;
    }
  }
}

Compiler output:
Main.java:9: error: cannot find symbol
      case 2: int a = s.nextInt, b = s.nextInt(); System.out.println(a + b); break;
                       ^
  symbol:   variable nextInt
  location: variable s of type Scanner
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define vsort(vec) sort(vec.begin(), vec.end())
#define vreverse(vec) reverse(vec.begin(), vec.end())
using ll =long long;
const ll INF =999999999;

//最大公約数
ll gcd(ll a, ll b){
   if (a%b==0){
       return(b);
   }else{
       return(gcd(b,a%b));
   }
}
//最小公倍数
ll lcm(ll a, ll b){
   return a*b/gcd(a,b);
}

//素数判定
ll isprime(ll n){
  bool prime=true;
  for(int i=2;i<n;i++){
    if(n%i==0){
      prime=false; break;
    }
  }
if(prime){cout<<n<<" is prime"<<endl;
         }else{cout<<n<<" is not prime"<<endl;}

}
//階乗　20くらいが限界
ll factorial(ll n){
  ll a=1;ll b=n;
  for(int i=0;i<n;i++){
    a*=b;
    b--;
  }
  return a;
}

//組み合わせ　nCr
ll comb(ll a,ll b){
  ll c;
  c=factorial(a)/(factorial(a-b)*factorial(b));
  return c; 
}




//10億7。　　　100000007
//2*2行列 H*W
//vector<vector<int>> vec(H,vector<int>(W));
//for(int i=0;i<H;i++){
//for(int j=0;j<W;j++){
//cin>>vec[i][j];
//  }
//}

//文字列→数列
//string S;int A=atoi(S.c_str());
//数列→文字列
//int A;string S=to_string(A);
//数字判定　isdigit(a)
//pair宣言　pair<int,int> p(5,7);
//ソート　sort(vec.begin(),vec.end());



int main(){
cout<<fixed<<setprecision(10);

int N;cin>>N;
  if(N==1){
    cout<<"Hello World"<<endl;
  }else{N==2){
    int A,B;cin>>A>>B;
    cout<<A+B<<endl;
  }
  
}


Compiler output:
a.cc: In function 'll isprime(ll)':
a.cc:32:1: warning: no return statement in function returning non-void [-Wreturn-type]
   32 | }
      | ^
a.cc: In function 'int main()':
a.cc:78:13: error: expected ';' before ')' token
   78 |   }else{N==2){
      |             ^
      |             ;
a.cc:83:2: error: expected '}' at end of input
   83 | }
      |  ^
a.cc:72:11: note: to match this '{'
   72 | int main(){
      |           ^
Language: C++

using namespace std;
#define rep(i,n) for(ll i=0;i<n;i++)
#define repl(i,l,r) for(ll i=(l);i<(r);i++)
#define per(i,n) for(ll i=n-1;i>=0;i--)
#define lper(i,r,l) for(ll i=r-1;i>=l;i--)
#define fi first
#define se second
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define CST(x) cout<<fixed<<setprecision(x)
using ll=long long;
using vl=vector<ll>;
using vvl=vector<vector<ll>>;
using pl=pair<ll,ll>;
const ll MOD=1000000007;
const ll MOD9=998244353;
const int inf=1e9;
const ll INF=4e18;
const ll dy[4]={1,0,-1,0};
const ll dx[4]={0,-1,0,1};
int main() {
  int N;
  cin >> N;
  if (N==1) {
    cout <<"Hello World" << endl;
  }
  else {
    int A;
    int B;
    cin >>A>>B;
    int c=A+B;
    cout << c<< endl;
  }
}


Compiler output:
a.cc:12:10: error: 'vector' does not name a type
   12 | using vl=vector<ll>;
      |          ^~~~~~
a.cc:13:11: error: 'vector' does not name a type
   13 | using vvl=vector<vector<ll>>;
      |           ^~~~~~
a.cc:14:10: error: 'pair' does not name a type
   14 | using pl=pair<ll,ll>;
      |          ^~~~
a.cc: In function 'int main()':
a.cc:23:3: error: 'cin' was not declared in this scope
   23 |   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:25:5: error: 'cout' was not declared in this scope
   25 |     cout <<"Hello World" << endl;
      |     ^~~~
a.cc:25:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:25:29: error: 'endl' was not declared in this scope
   25 |     cout <<"Hello World" << endl;
      |                             ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
a.cc:32:5: error: 'cout' was not declared in this scope
   32 |     cout << c<< endl;
      |     ^~~~
a.cc:32:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:32:17: error: 'endl' was not declared in this scope
   32 |     cout << c<< endl;
      |                 ^~~~
a.cc:32:17: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'