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

#include <iostream>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cmath>
#include <functional>
#include <numeric>
#include <iomanip>
#define fi first
#define se second
#define fcout(n) cout<<fixed<<setprecision((n))
#define cinl(str) getline(cin,(str))
using namespace std;
bool value(int y,int x,int R,int C){return 0<=y&&y<R&&0<=x&&x<C;}
typedef pair<int,int> pii;
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long > vll;
typedef vector< vi > vvi;
double pie=acos(-1);
int INF=10000009;
int dx[4] = { 0,-1,0,1 };
int dy[4] = { -1,0,1,0 };

int V;
vi G[2005];
vi rG[2005];
vi vs;
bool used[2005];
int cmp[2005];
void add_edge(int from, int to){
	G[from].push_back(to);
	rG[to].push_back(from);
}

void dfs(int v){
	used[v] = true;
	for(int i = 0; i < G[v].size(); i++){
		if(!used[G[v][i]]) dfs(G[v][i]);
	}
	vs.push_back(v);
}

void rdfs(int v, int k){
	used[v] = true;
	cmp[v] = k;
	for(int i = 0; i < rG[v].size(); i++){
		if(!used[rG[v][i]]) rdfs(rG[v][i], k);
	}
}

int scc(){
	memset(used, 0, sizeof(used));
	vs.clear();
	for(int v=0; v < V; v++){
		if(!used[v]) dfs(v);	
	}
	memset(used, 0, sizeof(used));
	int k=0;
	for(int i = vs.size() - 1; i >= 0; i--){ 
		if(!used[vs[i]]) rdfs(vs[i], k++);
	}
	return k;
}

int main() {
	int n;
	string rel;
	int u[105],d[105];
	cin>>n;
	V = 250;
	for(int i = 0; i < n; i++){
		cin>>u[i]>>rel>>d[i];
		u[i]--;
		d[i]--;
		if(rel == "lock"){
			add_edge(d[i]+100,u[i]);
		}
		else{
			add_edge(u[i],d[i]+100);
		}
	}
	int check = scc();
	if(check == V){
		cout<<'0'<<endl;
	}
	else{
		cout<<'1'<<endl;
	}
}

Compiler output:
a.cc: In function 'int scc()':
a.cc:58:9: error: 'memset' was not declared in this scope
   58 |         memset(used, 0, sizeof(used));
      |         ^~~~~~
a.cc:14:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   13 | #include <iomanip>
  +++ |+#include <cstring>
   14 | #define fi first
Language: C++

#include "iostream"
#include "queue"
using namespace std;

int Q;
int U, D;
char query[5];
queue<int> dir[201];
int Now, Next;
bool Is_use[201];

int main() {
	cin >> Q;
	for (int i = 0; i < Q; i++) {
		cin >> U >> query >> D;
		if (query[0] == 'w') {
			dir[U].push(D + 100);
		}
		else {
			dir[D + 100].push(U);
		}
	}
	for (int i = 1; i <= 100; i++) {
		while (!dir[i].empty()) {
			for (int j = 1; j <= 200; j++) {
				Is_use[j] = true;
			}
			Now = i;
			Is_use[i] = false;
			while (!dir[Now].empty()) {
				Next = dir[Now].front();
				dir[Now].pop();
				if (Is_use[Next]) {
					Is_use[Next] = false;
				}
				else {
					cout << "1\n";
					return 0;
				}
				Now = Next;
			}
		}
	}
	cout << "0\n";
	return 0;

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

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

typedef long long ll;
typedef pair<int, int> P;

#define pb push_back
#define rep(i, a, n) for(int i = (a); i < (n); i++)
#define dep(i, a, n) for(int i = (a); i >= (n); i--)
#define mod 1e9+7

__attribute__((constructor))
void initial() {
  cin.tie(0);
  ios::sync_with_stdio(false);
}

int n;
vector<int> u[101];
int d[101];
int doneU[101], doneD[101]:
int f = 0;

void solve(int i, int m, map<int, int> loopU, map<int, int> loopD) {
  if(f) return;
  if(m == 0) {
    if(loopD[i]) {
      f = 1;
      return;
    }
    loopD[i] = 1;
    if(d[i]) solve(d[i], !m, loopU, loopD);
  }else {
    if(loopU[i]) {
      f = 1;
      return;
    }
    loopU[i] = 1;
    rep(j, 0, u[i].size()) {
      solve(u[i][j], !m, loopU, loopD);
    }
  }
}

int main() {
  cin >> n;
  rep(i, 0, n) {
    int a, b;
    string s;
    cin >> a >> s >> b;
    if(s[0] == 'l') {
      d[b] = a;
    }else {
      u[a].pb(b);
    }
  }
  rep(i, 1, 101) {
    if(d[i]) {
      map<int, int> a, b;
      solve(i, 0, a, b);
    }
  }
  rep(i, 1, 101) {
    if(u[i].size() > 0) {
      map<int, int> a, b;
      solve(i, 1, a, b);
    }
  }
  cout << f << endl;
}

Compiler output:
a.cc:21:27: error: expected initializer before ':' token
   21 | int doneU[101], doneD[101]:
      |                           ^
a.cc: In function 'void solve(int, int, std::map<int, int>, std::map<int, int>)':
a.cc:25:6: error: 'f' was not declared in this scope
   25 |   if(f) return;
      |      ^
a.cc:28:7: error: 'f' was not declared in this scope
   28 |       f = 1;
      |       ^
a.cc:35:7: error: 'f' was not declared in this scope
   35 |       f = 1;
      |       ^
a.cc: In function 'int main()':
a.cc:69:11: error: 'f' was not declared in this scope
   69 |   cout << f << endl;
      |           ^
Language: C++

#include<cstdio>
#include<iostream>
#include<string>
#include<algorithm>
#include<cmath>
#include<cstring>
#include<vector>
#include<cstdlib>
using namespace std;

#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define rrep(i,n) for(int i=n-1;i>=0;i--)
#define rrep1(i,n) for(int i=n;i>=1;i--)
#define pb push_back

vector<int> ch[1001];

int N;
const int mod=1000000007;
struct node{
	int type;
	int op;
};
int ans;

node d[1001];
int dp[1001];
bool used[1001];
string s;
int cnt=0;

int dfs(int v){
	
	if(dp[v]>=0) return dp[v];
	int res=0;
	if(ch[v].size()==0) res=1;
	else if(d[v].type==0){
		res=1;
		rep(i,ch[v].size()){
			res*=dfs(ch[v][i]);
			res%=mod;
		}
	}
	else if(d[v].type==1){
		res=0;
		rep(i,ch[v].size()){
			res+= dfs(ch[v][i])
			res%=mod;
		}
	}
	else if(d[v].type==2){
		res=0;
		int k=ch[v].size();
		for(int s=1;s< (1<<k); s++){
			int sub=1;
			rep(i,k){
				if((s>>i) &1) sub*= dfs(ch[v][i]) ;
			}
			res+=sub;
			res%=mod;
		}
	}
	if(d[v].op==1) res++;
	return dp[v]=(res%mod);
}

int main()
{
	memset(dp,-1,sizeof(dp));
	cin>>N;
	rep(i,N){
		cin>>s;
		d[i].type=d[i].op=0;
		if(s[0]=='A'){
			d[i].type=1;
		}
		else if(s[0]=='R'){
			d[i].type=2;
		}
		else if(s[0]=='E'){
			d[i].type=0;
		}
		
		if(s.size()>=2){
			d[i].op=1;
		}
	}
	int x,y;
	rep(i,N-1){
		cin>>x>>y;
		x--; y--;
		ch[x].pb(y);
	}
	
	cout<< dfs(0)%mod <<endl;
}

Compiler output:
a.cc: In function 'int dfs(int)':
a.cc:48:44: error: expected ';' before 'res'
   48 |                         res+= dfs(ch[v][i])
      |                                            ^
      |                                            ;
   49 |                         res%=mod;
      |                         ~~~
Language: C++

#include<cstdio>
#include<iostream>
#include<string>
#include<algorithm>
#include<cmath>
#include<cstring>
#include<vector>
#include<cstdlib>
using namespace std;

#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define rrep(i,n) for(int i=n-1;i>=0;i--)
#define rrep1(i,n) for(int i=n;i>=1;i--)
#define pb push_back

vector<int> ch[10001];

int N;
const int mod=1000000007;
struct node{
	int type;
	int op;
};
int ans;

node d[10001];
int dp[10001];
bool used[10001];
string s;
int cnt=0;

int dfs(int v){
	
	if(dp[v]>=0) return dp[v];
	int res=0;
	if(ch[v].size()==0) res=1;
	else if(d[v].type==0){
		res=1;
		rep(i,ch[v].size()){
			res*=dfs(ch[v][i]);
			res%=mod;
		}
	}
	else if(d[v].type==1){
		res=0;
		rep(i,ch[v].size()){
			res+= dfs(ch[v][i]);
			res%=mod;
		}
	}
	int sub;
	else if(d[v].type==2){
		res=0;
		int k=ch[v].size();
		for(int s=1;s< (1<<k); s++){
			
			sub=1;
			rep(i,k){
				if( (s>>i) &1 ) sub*= dfs(ch[v][i]) ;
				sub%=mod;
			}
			res+=sub;
			res%=mod;
		}
	}
	if(d[v].op==1) res++;
	return dp[v]=(res%mod);
}

int main()
{
	memset(dp,-1,sizeof(dp));
	cin>>N;
	rep(i,N){
		cin>>s;
		d[i].type=d[i].op=0;
		if(s[0]=='A'){
			d[i].type=1;
		}
		else if(s[0]=='R'){
			d[i].type=2;
		}
		else if(s[0]=='E'){
			d[i].type=0;
		}
		
		if(s.size()>=2){
			d[i].op=1;
		}
	}
	int x,y;
	rep(i,N-1){
		cin>>x>>y;
		x--; y--;
		ch[x].pb(y);
	}
	
	cout<< dfs(0)%mod <<endl;
}

Compiler output:
a.cc: In function 'int dfs(int)':
a.cc:53:9: error: 'else' without a previous 'if'
   53 |         else if(d[v].type==2){
      |         ^~~~
Language: Java

public class Main {
	public static void main (String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = 300;
		int n = scan.nextInt();
		int[][] p = new int[N+1][N+1];
		int[][] sp = new int[N+1][N+1];
		for (int i = 1; i <= n; i++) {
			for (int j = 1; j <= n; j++) {
				p[i][j] = scan.nextInt();
			}
		}
		
		int max = 0;
		for (int x = 1; x <= n; x++) {
			for (int y = 1; y <= n; y++) {
				for (int i = x; i <= n; i ++) {
					for (int j = y; j <= n; j++) {
						sp[i][j] = sp[i-1][j] + sp[i][j-1] + p[i][j] - sp[i-1][j-1];
						if (sp[i][j] > max)  {
							max = sp[i][j];
						}
					}
				}
				for (int i = x; i <= n; i ++) {
					for (int j = y; j <= n; j++) {
						sp[i][j] = 0;
					}
				}
			}
		}
		System.out.println(max);
		scan.close();
	}
}

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

public class Main {
	public static void main (String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = 300;
		int n = scan.nextInt();
		int[][] p = new int[N+1][N+1];
		int[][] sp = new int[N+1][N+1];
		for (int i = 1; i <= n; i++) {
			for (int j = 1; j <= n; j++) {
				p[i][j] = scan.nextInt();
			}
		}
		
		int max = 0;
		for (int x = 1; x <= 1; x++) {
			for (int y = 1; y <= 1; y++) {
				for (int i = x; i <= 4; i ++) {
					for (int j = y; j <= 4; j++) {
						if(i <3 || j < 3) {
							sp[i][j] = sp[i-1][j] + sp[i][j-1] + p[i][j] - sp[i-1][j-1];
						} else {
							sp[i][j] = sp[i-1][j] + sp[i][j-1] + p[i][j] - sp[i-1][j-1] - p[i-1][j-1];
						}
						if (sp[i][j] > max)  {
							max = sp[i][j];
						}
					}
				}
				for (int i = 0; i <= n; i ++) {
					for (int j = 0; j <= n; j++) {
						sp[i][j] = 0;
					}
				}
			}
		}
		System.out.println(max);
		scan.close();
	}
}

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

import java.util.Scanner;

public class Main {
	static int[][] t;
	static int[][] u;
	static int n;
	public static void main (String[] args) {
		int N =300;
		t = new int[N+1][N+1];
		u = new int[N+1][N+1];
		Scanner scan = new Scanner(System.in);
		n =scan.nextInt();
		for(int i=1;i<=n;i++){
			for(int j=1;j<=n;j++){
				t[i][j] = scan.nextInt();
			u[i][j]=t[i][j]+u[i-1][j]+u[i][j-1]-u[i-1][j-1];
			}
		}
		int ans=-10000;
		for(int i=1;i<=n;i++){
			for(int j=i;j<=n;j++){
				if(ans > calc(i,j))
					ans= calc(i,j);	
			}
		}
	}
	
	static int sum(int ai,int aj,int bi,int bj){
		  ai--;
		  aj--;
		  return u[bi][bj]-u[ai][bj]-u[bi][aj]+u[ai][aj];
	}
	
	static int calc(int ah,int bh){
		int res=-100000;
		int maxm=0;
		for(int i=1;i<=n;i++){
			if (res < maxm+sum(ah,i,bh,i)) {
				res = maxm+sum(ah,i,bh,i);
			}
			int d=t[ah][i]+t[bh][i];
			if(ah==bh)d/=2;
			if( maxm + d < sum(ah,i,bh,i) ) {
				maxm=sum(ah,i,bh,i);
			}else {
				maxm = maxm + d;
			}
		}
		return res;

Compiler output:
Main.java:49: error: reached end of file while parsing
		return res;
		           ^
1 error
Language: C++

#include <algorithm>
#include <iostream>
#include <queue>
#define N 300
using namespace std;
typedef pair<int,int> P;
int n,p[N][N],s,ans,a1,a2,b1,b2,d[N][N];
priority_queue<P> A,B;

int main(){
  cin>>n;
  for(int i=0;i<n;i++)
    for(int j=0;j<n;j++) cin>>p[i][j];
  for(int i=0;i<n;i++){
    s=0;
    for(int j=0;j<n;j++) s+=p[j][i];
    A.push(P(s,i));
  }
  for(int i=0;i<n;i++){
    s=0;
    for(int j=0;j<n;j++) s+=p[i][j];
    B.push(P(s,i));
  }
  P t=A.top(); A.pop();
  a1=t.second;
  t=A.top(); A.pop();
  a2=t.second;
  t=B.top(); B.pop();
  b1=t.second;
  t=B.top(); B.pop();
  b2=t.second;
  for(int i=0;i<n;i++)
    for(int j=0;j<n;j++) d[i][j]=p[i][j];
  for(int i=0;i<n;i++)
    for(int j=1;j<n;j++) d[i][j]=d[i][j-1]+p[i][j];
  for(int i=1;i<n;i++)
    for(int j=0;j<n;j++) d[i][j]=d[i-1][j]+d[i][j];
  for(int i=0;i<n;i++){
    for(int j=0;j<n;j++){
      for(int k=i;k<n;k++){
	for(int l=j;l<n;l++){
	  //if(!(a1==j||a2==j||a1==l||a2==l||b1==i||b2==i||b1==k||b2==k)) continue;
	  int sum=d[k][l],sum2=0;
	  if(i&&j) sum=sum-d[i-1][l]-d[k][j-1]+d[i-1][j-1];
	  else if(i) sum=sum-d[i-1][l];
	  else if(j) sum=sum-d[k][j-1];
	  if(i+1&&j+1) sum2=d[k-1][l-1]-d[i][l-1]-d[k-1][j]+d[i][j];
	  else if(i+1) sum2=d[k-1][l-1]-d[i][l-1];
	  else if(j+1) sum2=d[k-1][l-1]-d[k-1][j];
	  ans=max(ans,sum-sum2);
	  }else ans=max(ans,sum);
	}
      }
    }
  }
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:51:12: error: 'else' without a previous 'if'
   51 |           }else ans=max(ans,sum);
      |            ^~~~
a.cc:51:29: error: 'sum' was not declared in this scope
   51 |           }else ans=max(ans,sum);
      |                             ^~~
a.cc: At global scope:
a.cc:56:3: error: 'cout' does not name a type
   56 |   cout<<ans<<endl;
      |   ^~~~
a.cc:57:3: error: expected unqualified-id before 'return'
   57 |   return 0;
      |   ^~~~~~
a.cc:58:1: error: expected declaration before '}' token
   58 | }
      | ^
Language: C++

#include <algorithm>
#include <iostream>
#define N 310
#define INF (1e9)
#define make make_pair
using namespace std;
typedef pair<int,int> P;
int n,p[N][N],ans,d[N][N];
P c[N][N];

int main(){
  cin>>n;
  for(int i=1;i<=n;i++)
    for(int j=1;j<=n;j++) cin>>p[i][j];
  for(int i=1;i<=n;i++)
    for(int j=1;j<=n;j++) d[i][j]=p[i][j];
  for(int i=1;i<=n;i++)
    for(int j=2;j<=n;j++) d[i][j]=d[i][j-1]+p[i][j];
  for(int i=2;i<=n;i++)
    for(int j=1;j<=n;j++) d[i][j]=d[i-1][j]+d[i][j];
  ans=-INF;
  for(int i=1;i<=n;i++)
    for(int j=1;j<=n;j++) c[i][j]=P(-1,-INF);
  
  for(int k=1;k<=n;k++){
    for(int l=k+1;l<=n;l++){
      for(int i=1;i<=n;i++){
	int sum=d[j][l]-d[i-1][l]-d[j][k-1]+d[i-1][k-1],sum2=0;
	if(j-i>=2&&l-k>=2) sum2=d[j-1][l-1]-d[i][l-1]-d[j-1][k]+d[i][k];
	if(c[k][l].second<sum-sum2) c[k][l]=P(i,sum-sum2);
      }
    }
  }
  for(int k=1;k<=n;k++){
    for(int l=k+1;l<=n;l++){
      int j=c[k][l].first;
      for(int i=1;i<c[k][l].first;i++){
	int sum=d[j][l]-d[i-1][l]-d[j][k-1]+d[i-1][k-1],sum2=0;
	if(j-i>=2&&l-k>=2) sum2=d[j-1][l-1]-d[i][l-1]-d[j-1][k]+d[i][k];
	ans=max(ans,sum-sum2);
      }
      for(int i=j;i<=n;i++){
	int sum=d[j][l]-d[i-1][l]-d[j][k-1]+d[i-1][k-1],sum2=0;
	if(j-i>=2&&l-k>=2) sum2=d[j-1][l-1]-d[i][l-1]-d[j-1][k]+d[i][k];
	ans=max(ans,sum-sum2);
      }
    }
  }
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:19: error: 'j' was not declared in this scope
   28 |         int sum=d[j][l]-d[i-1][l]-d[j][k-1]+d[i-1][k-1],sum2=0;
      |                   ^
a.cc:29:28: error: 'sum2' was not declared in this scope; did you mean 'sum'?
   29 |         if(j-i>=2&&l-k>=2) sum2=d[j-1][l-1]-d[i][l-1]-d[j-1][k]+d[i][k];
      |                            ^~~~
      |                            sum
a.cc:30:31: error: 'sum2' was not declared in this scope; did you mean 'sum'?
   30 |         if(c[k][l].second<sum-sum2) c[k][l]=P(i,sum-sum2);
      |                               ^~~~
      |                               sum
Language: C++

#include <algorithm>
#include <iostream>
#define N 310
#define INF (1e9)
#define make make_pair
using namespace std;
typedef pair<int,int> P;
int n,p[N][N],ans,d[N][N];
P c[N][N];

int main(){
  cin>>n;
  for(int i=1;i<=n;i++)
    for(int j=1;j<=n;j++) cin>>p[i][j];
  for(int i=1;i<=n;i++)
    for(int j=1;j<=n;j++) d[i][j]=p[i][j];
  for(int i=1;i<=n;i++)
    for(int j=2;j<=n;j++) d[i][j]=d[i][j-1]+p[i][j];
  for(int i=2;i<=n;i++)
    for(int j=1;j<=n;j++) d[i][j]=d[i-1][j]+d[i][j];
  ans=-INF;
  for(int i=1;i<=n;i++)
    for(int j=1;j<=n;j++) c[i][j]=P(1,-INF);
  
  for(int k=1;k<=n;k++){
    for(int l=k+1;l<=n;l++){
      for(int i=c[k][l];i<=n;i++){
	int sum=d[j][l]-d[i-1][l]-d[j][k-1]+d[i-1][k-1],sum2=0;
	if(j-i>=2&&l-k>=2) sum2=d[j-1][l-1]-d[i][l-1]-d[j-1][k]+d[i][k];
	if(c[k][l].second<sum-sum2) c[k][l]=P(i,sum-sum2);
      }
    }
  }
  for(int k=1;k<=n;k++){
    for(int l=k+1;l<=n;l++){
      int j=c[k][l].first;
      for(int i=1;i<c[k][l].first;i++){
	int sum=d[j][l]-d[i-1][l]-d[j][k-1]+d[i-1][k-1],sum2=0;
	if(j-i>=2&&l-k>=2) sum2=d[j-1][l-1]-d[i][l-1]-d[j-1][k]+d[i][k];
	ans=max(ans,sum-sum2);
      }
      for(int i=j;i<=n;i++){
	int sum=d[j][l]-d[i-1][l]-d[j][k-1]+d[i-1][k-1],sum2=0;
	if(j-i>=2&&l-k>=2) sum2=d[j-1][l-1]-d[i][l-1]-d[j-1][k]+d[i][k];
	ans=max(ans,sum-sum2);
      }
    }
  }
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:23: error: cannot convert 'P' {aka 'std::pair<int, int>'} to 'int' in initialization
   27 |       for(int i=c[k][l];i<=n;i++){
      |                 ~~~~~~^
      |                       |
      |                       P {aka std::pair<int, int>}
a.cc:28:19: error: 'j' was not declared in this scope
   28 |         int sum=d[j][l]-d[i-1][l]-d[j][k-1]+d[i-1][k-1],sum2=0;
      |                   ^
a.cc:29:28: error: 'sum2' was not declared in this scope; did you mean 'sum'?
   29 |         if(j-i>=2&&l-k>=2) sum2=d[j-1][l-1]-d[i][l-1]-d[j-1][k]+d[i][k];
      |                            ^~~~
      |                            sum
a.cc:30:31: error: 'sum2' was not declared in this scope; did you mean 'sum'?
   30 |         if(c[k][l].second<sum-sum2) c[k][l]=P(i,sum-sum2);
      |                               ^~~~
      |                               sum
Language: C++

#include <algorithm>
#include <iostream>
#define N 310
#define INF (1e9)
using namespace std;
int n,p[N][N],ans,c,ma,d[N][N];

int main(){
  cin>>n;
  for(int i=1;i<=n;i++)
    for(int j=1;j<=n;j++) cin>>p[i][j];
  for(int i=1;i<=n;i++)
    for(int j=1;j<=n;j++) d[i][j]=p[i][j];
  for(int i=1;i<=n;i++)
    for(int j=2;j<=n;j++) d[i][j]=d[i][j-1]+p[i][j];
  for(int i=2;i<=n;i++)
    for(int j=1;j<=n;j++) d[i][j]=d[i-1][j]+d[i][j];
  ans=-INF;
  for(int i=1;i<=n;i++)
    for(int j=1;j<=n;j++) c[i][j]=P(1,-INF);
  for(int k=1;k<=n;k++){
    for(int l=k+1;l<=n;l++){
      c=1;
      ma=-INF;
      for(int i=c;i<=n;i++){
	int sum=d[j][l]-d[i-1][l]-d[j][k-1]+d[i-1][k-1],sum2=0;
	if(j-i>=2&&l-k>=2) sum2=d[j-1][l-1]-d[i][l-1]-d[j-1][k]+d[i][k];
	if(ma<sum-sum2) ma=sum-sum2,c=i;
      }
    }
  }
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:28: error: invalid types 'int[int]' for array subscript
   20 |     for(int j=1;j<=n;j++) c[i][j]=P(1,-INF);
      |                            ^
a.cc:20:35: error: 'P' was not declared in this scope
   20 |     for(int j=1;j<=n;j++) c[i][j]=P(1,-INF);
      |                                   ^
a.cc:26:19: error: 'j' was not declared in this scope
   26 |         int sum=d[j][l]-d[i-1][l]-d[j][k-1]+d[i-1][k-1],sum2=0;
      |                   ^
a.cc:27:28: error: 'sum2' was not declared in this scope; did you mean 'sum'?
   27 |         if(j-i>=2&&l-k>=2) sum2=d[j-1][l-1]-d[i][l-1]-d[j-1][k]+d[i][k];
      |                            ^~~~
      |                            sum
a.cc:28:19: error: 'sum2' was not declared in this scope; did you mean 'sum'?
   28 |         if(ma<sum-sum2) ma=sum-sum2,c=i;
      |                   ^~~~
      |                   sum
Language: C++

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

#define REP(i, n) FOR(i, 0, n)
#define FOR(i, a, b) for(int i = a; i < b; i++)

#define PB push_back

#define MOD 1000000007LL
typedef long long ll;

int a[321][321];
int sm[321][321];

int cnt(int a, int b, int c, int d){
	return sm[c][d]-sm[a][d]-sm[c][b]+sm[a][b];
}

inline gt(int i, int j, int k, int l){
	int a = cnt(i, k, j, l), b = 0;
	if(j-i>=3 && l-k>=3){
		b = cnt(i+1, k+1, j-1, l-1);
		// printf("*");
	}
	return a-b;
}

#define LAR(a, b) a=max(a, (b))

int main(){
	int n;
	scanf("%d", &n);
	REP(i, n) REP(j, n) scanf("%d", a[i]+j);
	REP(i, n) sm[i][0]=sm[0][i]=0;
	REP(i, n){
		REP(j, n){
			sm[i+1][j+1]=sm[i][j+1]+sm[i+1][j]-sm[i][j]+a[i][j];
		}
	}
	// REP(i, n+1){
	// 	REP(j, n+1){
	// 		printf("%d ", sm[i][j]);
	// 	}
	// 	printf("\n");
	// }

	int ans = 0;
	REP(i, n){
		FOR(j, i+1, n+1){
			int nwsm = 0,
					mxsm = 0,
					mxid = 0;
			REP(l, n+1){
				LAR(ans, gt(i, j, l-1, l));
				if(l>=3){
					nwsm -= cnt(i, j, l-3, l-2);
					if(j-i >= 3){
						nwsm += cnt(i+1, j-1, l-2, l-1);
					}
					if(mxsm > nwsm){
						mxid = l-2;
					}
				}
				LAR(ans, gt(i, j, mxid, l));
			}
		}
	}
	printf("%d\n", ans);
}

Compiler output:
a.cc:19:8: error: ISO C++ forbids declaration of 'gt' with no type [-fpermissive]
   19 | inline gt(int i, int j, int k, int l){
      |        ^~
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

import static java.lang.Integer.parseInt;

/**
 * The Number of Participants
 */
public class P0315 {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line;
		String[] words;

		int p, m, c;

		StringTokenizer st = new StringTokenizer(br.readLine());
		p = parseInt(st.nextToken());
		m = parseInt(st.nextToken());
		c = parseInt(st.nextToken());

		System.out.println(p + m + c);
	}
}

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

#include<stdio.h>

int main(void){

int p,m,c;

scanf("%d %d %d",&p,&m,&c);

printf("%d\n",a+m+c);

return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:15: error: 'a' undeclared (first use in this function)
    9 | printf("%d\n",a+m+c);
      |               ^
main.c:9:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

imt main()
{
int p,m,c;
scanf("%d %d %d",&p,&m,&c);
printf("%d\n",p+m+c);
return 0;
}

Compiler output:
main.c:3:1: error: unknown type name 'imt'; did you mean 'int'?
    3 | imt main()
      | ^~~
      | int
Language: C++

#include<stdio.h>
int main(){
    int p,m,c;
    scanf("%d %d %d",&p,&m&c);
    printf("%d",p+m+c);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:27: error: invalid operands of types 'int*' and 'int' to binary 'operator&'
    4 |     scanf("%d %d %d",&p,&m&c);
      |                         ~~^~
      |                         |  |
      |                         |  int
      |                         int*
Language: C++

#include  <iostream>
using namespace std;
int main(){
int p,m,c;
   cin>>p>>m>>c;
   cout<<p+m+c<<endl:
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:21: error: expected ';' before ':' token
    6 |    cout<<p+m+c<<endl:
      |                     ^
      |                     ;
Language: C++

#include<iostream>
using namespace std;

int main() {
	 
	int p, m, c, ans;
	cin >> p >> m >> c;

	/* 参加人数の計算 */
	ans = p + m + c;  /* 参加人数 ＝ プログラム人数 + モバイル人数 + CG人数  */

	cout << ans << endl;

	return 0;


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

#include<iostream>
using namespace std;
int main() {
    int a, b, c;
    cin a >> b >> c;
    int m;
    m = a+b+c;
    cout << m << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: expected ';' before 'a'
    5 |     cin a >> b >> c;
      |        ^~
      |        ;
Language: C++

#include<iostream>
using namespace std;
int main() {
    int ; a, b, c;
    cin a >> b >> c;
    int m;
    m = a+b+c;
    cout << m << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: declaration does not declare anything [-fpermissive]
    4 |     int ; a, b, c;
      |     ^~~
a.cc:4:11: error: 'a' was not declared in this scope
    4 |     int ; a, b, c;
      |           ^
a.cc:4:14: error: 'b' was not declared in this scope
    4 |     int ; a, b, c;
      |              ^
a.cc:4:17: error: 'c' was not declared in this scope
    4 |     int ; a, b, c;
      |                 ^
a.cc:5:8: error: expected ';' before 'a'
    5 |     cin a >> b >> c;
      |        ^~
      |        ;
Language: C++

#include<iostream>
using namespace std;
int main() {
    int a,b,c;
    cin a >> b >> c;
    int m;
    m = a+b+c;
    cout << m << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: expected ';' before 'a'
    5 |     cin a >> b >> c;
      |        ^~
      |        ;
Language: C++

#include<iostream>
#include<string>

int main(){
  string x;
  int n =x.size();
int i;
  for(i=0;i<n;i++){
    cin >> str[i];
  }
  for (i=n;i>0;i--){
    cout << str[i] << endl;
  }return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string x;
      |   ^~~~~~
a.cc:5:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included 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:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:10: error: 'x' was not declared in this scope
    6 |   int n =x.size();
      |          ^
a.cc:9:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 |     cin >> str[i];
      |     ^~~
      |     std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:12: error: 'str' was not declared in this scope; did you mean 'std'?
    9 |     cin >> str[i];
      |            ^~~
      |            std
a.cc:12:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |     cout << str[i] << 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:13: error: 'str' was not declared in this scope; did you mean 'std'?
   12 |     cout << str[i] << endl;
      |             ^~~
      |             std
a.cc:12:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   12 |     cout << str[i] << 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 p;
 int m;
 int c;
 cin >> p >> m >> c ;
 cout << p + m + c endl;
 
 return0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: expected ';' before 'endl'
   10 |  cout << p + m + c endl;
      |                   ^~~~~
      |                   ;
a.cc:12:2: error: 'return0' was not declared in this scope
   12 |  return0;
      |  ^~~~~~~
Language: C++

#include<iostream>

using namespace std;

int main(){
 int p, m, c;
 cin >> p >> m >> c ;
 cout << p + m + c endl;
 
 return0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: expected ';' before 'endl'
    8 |  cout << p + m + c endl;
      |                   ^~~~~
      |                   ;
a.cc:10:2: error: 'return0' was not declared in this scope
   10 |  return0;
      |  ^~~~~~~
Language: C++

#include <iostream>

using namespace std;
int main(){
  int a, b, c
    cin >> a >> b >> c;
  c = a + b + c;
  cout << c << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: expected initializer before 'cin'
    6 |     cin >> a >> b >> c;
      |     ^~~
a.cc:7:3: error: 'c' was not declared in this scope
    7 |   c = a + b + c;
      |   ^
Language: C++

#include <iostream>

using namespace std;
int main(){
  int p, m, c
    cin >> p >> m >> c;
  c = p + m + c;
  cout << c << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: expected initializer before 'cin'
    6 |     cin >> p >> m >> c;
      |     ^~~
a.cc:7:3: error: 'c' was not declared in this scope
    7 |   c = p + m + c;
      |   ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
int p,m,i;
cin >> p >> m >> i;
cout << p+m+i <<< endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: expected primary-expression before '<' token
    7 | cout << p+m+i <<< endl;
      |                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int p, m, c;
int main()
{
	cin >> n >> m >> c;
	cout << n + m + c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: 'n' was not declared in this scope; did you mean 'yn'?
    6 |         cin >> n >> m >> c;
      |                ^
      |                yn
Language: C++

#include "bits/stdc++.h"
using namespace std;
int main(){
  int a,b,c;
  cin>>a>>b>>c;
  cout<<a+b+c<<endl;
  return 0;
}
  int a,b,c;
  cin>>a>>b>>c;
  cout<<a+b+c<<endl;
  return 0;
}

Compiler output:
a.cc:10:3: error: 'cin' does not name a type
   10 |   cin>>a>>b>>c;
      |   ^~~
a.cc:11:3: error: 'cout' does not name a type
   11 |   cout<<a+b+c<<endl;
      |   ^~~~
a.cc:12:3: error: expected unqualified-id before 'return'
   12 |   return 0;
      |   ^~~~~~
a.cc:13:1: error: expected declaration before '}' token
   13 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int a,b,c;
  cin>>a>>b>>c;
  cout<<a+b+c<<endl;
  return 0;
}
  int a,b,c;
  cin>>a>>b>>c;
  cout<<a+b+c<<endl;
  return 0;
}

Compiler output:
a.cc:10:3: error: 'cin' does not name a type
   10 |   cin>>a>>b>>c;
      |   ^~~
a.cc:11:3: error: 'cout' does not name a type
   11 |   cout<<a+b+c<<endl;
      |   ^~~~
a.cc:12:3: error: expected unqualified-id before 'return'
   12 |   return 0;
      |   ^~~~~~
a.cc:13:1: error: expected declaration before '}' token
   13 | }
      | ^
Language: C++

#include <stdio.h>
#define rep(i, n) for(int i = 0; i < n; ++i)

int main(void) {
  int n, ans = 0, i;
  rep(i, 3) {
    scanf("%d", &n);
    ans += m;
  }
  printf("%d\n", ans);
  return 0;
}


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

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

int main(){
	int p,m,c;
	cin>>p>>m>>c;
	cout << p+m+c <<endl;
	return 0;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin>>p>>m>>c;
      |         ^~~
a.cc:7:9: error: 'cout' was not declared in this scope
    7 |         cout << p+m+c <<endl;
      |         ^~~~
a.cc:7:25: error: 'endl' was not declared in this scope
    7 |         cout << p+m+c <<endl;
      |                         ^~~~
Language: C++

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

int main(){
    int p,m,c;
    cin>>p>>m>>c
    cout<<p+m+c<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: expected ';' before 'cout'
    6 |     cin>>p>>m>>c
      |                 ^
      |                 ;
    7 |     cout<<p+m+c<<endl;
      |     ~~~~
Language: C++

#include  <bits/stdc++.h>

using namespace std:

int main(){
    int p,m,c;
    cin>>p>>m>>c;
    cout<<p + m + c<<endl;
    
return 0;
}


Compiler output:
a.cc:3:20: error: expected ';' before ':' token
    3 | using namespace std:
      |                    ^
      |                    ;
a.cc:3:20: error: expected unqualified-id before ':' token
Language: C

#include <stdio.h>
int main(void)
{
    int ha,hb,ka,kb,a,b,c,d,ht,kt;
    scanf("%d %d",&ha,&hb);
    scanf("%d %d",&ka,&kb);
    scanf("%d %d %d %d",&a,&b,&c,&d);
    ht=ha*a+hb*b;
    if(ha<=10)
      ht+=(ha/10)*c;
    if(hb<=20)
      ht+=(hb/20)*d;
    kt=ka*a+kb*b;
    if(ka<=10)
      kt+=(ka/10)*c;
    if(kb<=20)
      kt+=(kb/20)*d;
    if(ht>kt)
    printf("hiroshi\n");
    if(kt>ht)
    printf("kenjiro\n");
    if(kt==ht)
    printf("even");
    }
}





Compiler output:
main.c:25:1: error: expected identifier or '(' before '}' token
   25 | }
      | ^
Language: C

#include<stdio.h>
int main(void)
{
	int h1,h2,k1,k2,a,b,c,d,f,g;
	scanf("%d%d%d%d%d%d%d%d",&h1,&h2,&k1,&k2,&a,&b,&c,&d)+
	f=a*h1+h1/10*c+b*h2+h2/20*d;
	g=a*k1+k1/10*c+b*k2+k2/20*d;
	if(f>g)
	{
		 printf("hiroshi\n");
    }
    else if(f<g)
    {
    printf("kenjiro\n");
    }
    else
    {
        printf("even\n");
    }
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:10: error: lvalue required as left operand of assignment
    6 |         f=a*h1+h1/10*c+b*h2+h2/20*d;
      |          ^
Language: C

#include <stdio.h>

int main(){
int k1,k2,h1,h2,a,b,c,d,x,y;
scanf("%d%d",&h1,&h2);
scanf("%d%d",&k1,&k2);
scanf("%d%d%d%d",&a,&b,&c,&d);
x=((h1*a)+(h1/10*c))+((h2*b)+(h2/20*d));
y=((k1*a)+(k1/10*c))+((k2*b)+(k2/20*d))
if(x>y){
printf("hiroshi\n");
}else if(x<y){
printf("kenjiro\n");
}else{
printf("even\n");
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:40: error: expected ';' before 'if'
    9 | y=((k1*a)+(k1/10*c))+((k2*b)+(k2/20*d))
      |                                        ^
      |                                        ;
   10 | if(x>y){
      | ~~
Language: C

#include <stdio.h>

int main(void) {
    int a[7];
    int hiroshi,kenjiro;
    int i;
    for(i = 0;i <= 7;i++){
        scanf("&d",&n);
    }
    hiroshi = a[0] * a[4] + (a[0] / 10) * a[6] + a[1] * a[5] + (a[1] / 20) * a[7];
    kenjiro = a[2] * a[4] + (a[2] / 10) * a[6] + a[3] * a[5] + (a[3] / 20) * a[7];
    if(hiroshi = kenjiro){
        printf("even\n");
    } else if (hiroshi > kenjiro){
        printf("hiroshi\n");
    } else {
        printf("kenjiro\n");
    }
    return 0;
}
//ko_i,ko_y,ke_i,ke_y,po_i,po_y,bo_i,bo_y;

Compiler output:
main.c: In function 'main':
main.c:8:21: error: 'n' undeclared (first use in this function)
    8 |         scanf("&d",&n);
      |                     ^
main.c:8:21: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(void)
{
????????int h1,h2,k1,k2,a,b,c,d,H,K;
????????scanf ("%d%d",&h1,&h2);
????????scanf ("%d%d",&k1,&k2);
????????scanf ("%d%d%d%d",&a,&b,&c,&d);
????????H=h1*a+h2*b+(h1/10)*c+(h2/20)*d;
????????K=k1*a+k2*b+(k1/10)*c+(k2/20)*d;
????????if (H>K)
????????printf ("hiroshi\n");
????????else if (H<K)
????????printf ("kenjiro\n");
????????else
????????printf ("even\n");
????????return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:1: error: expected expression before '?' token
    4 | ????????int h1,h2,k1,k2,a,b,c,d,H,K;
      | ^
main.c:5:1: error: expected expression before '?' token
    5 | ????????scanf ("%d%d",&h1,&h2);
      | ^
main.c:5:24: error: 'h1' undeclared (first use in this function)
    5 | ????????scanf ("%d%d",&h1,&h2);
      |                        ^~
main.c:5:24: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:28: error: 'h2' undeclared (first use in this function)
    5 | ????????scanf ("%d%d",&h1,&h2);
      |                            ^~
main.c:6:1: error: expected expression before '?' token
    6 | ????????scanf ("%d%d",&k1,&k2);
      | ^
main.c:6:24: error: 'k1' undeclared (first use in this function)
    6 | ????????scanf ("%d%d",&k1,&k2);
      |                        ^~
main.c:6:28: error: 'k2' undeclared (first use in this function)
    6 | ????????scanf ("%d%d",&k1,&k2);
      |                            ^~
main.c:7:1: error: expected expression before '?' token
    7 | ????????scanf ("%d%d%d%d",&a,&b,&c,&d);
      | ^
main.c:7:28: error: 'a' undeclared (first use in this function)
    7 | ????????scanf ("%d%d%d%d",&a,&b,&c,&d);
      |                            ^
main.c:7:31: error: 'b' undeclared (first use in this function)
    7 | ????????scanf ("%d%d%d%d",&a,&b,&c,&d);
      |                               ^
main.c:7:34: error: 'c' undeclared (first use in this function)
    7 | ????????scanf ("%d%d%d%d",&a,&b,&c,&d);
      |                                  ^
main.c:7:37: error: 'd' undeclared (first use in this function)
    7 | ????????scanf ("%d%d%d%d",&a,&b,&c,&d);
      |                                     ^
main.c:8:1: error: expected expression before '?' token
    8 | ????????H=h1*a+h2*b+(h1/10)*c+(h2/20)*d;
      | ^
main.c:8:9: error: 'H' undeclared (first use in this function)
    8 | ????????H=h1*a+h2*b+(h1/10)*c+(h2/20)*d;
      |         ^
main.c:9:1: error: expected expression before '?' token
    9 | ????????K=k1*a+k2*b+(k1/10)*c+(k2/20)*d;
      | ^
main.c:9:9: error: 'K' undeclared (first use in this function)
    9 | ????????K=k1*a+k2*b+(k1/10)*c+(k2/20)*d;
      |         ^
main.c:10:1: error: expected expression before '?' token
   10 | ????????if (H>K)
      | ^
main.c:12:1: error: expected expression before '?' token
   12 | ????????else if (H<K)
      | ^
main.c:14:1: error: expected expression before '?' token
   14 | ????????else
      | ^
main.c:16:1: error: expected expression before '?' token
   16 | ????????return 0;
      | ^
Language: C

include<stdio.h>

int main(int argc, char const *argv[]) {
   int h1,h2,k1,k2,a,b,c,d;
   int m,n;
   scanf("%d%d%d%d%d%d%d%d",&h1,&h2,&k1,&k2,&a,&b,&c,&d);
   m = h1*a+h2*b+(h1/10)*c+(h2/20)*d;
   n = k1*a+k2*b+(k1/10)*c+(k2/20)*d;
   if (m > n) {
      /* code */
      printf("hiroshi\n");
   } else if (m < n) {
      /* code */
      printf("kenjiro\n");
   } else {
      printf("even\n");
   }
   return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
    int h,hh;
    int k,kk;
    int a,b,c,d;
    cin>>h>>hh>>k>>kk;
    cin>>a>>b>>c>>d;
    int x=(a*h+c*(h/10))+(b*hh+d*(hh/10));
    int y=(a*k+c*(k/10))+(b*kk+d*(kk/10));
    if(x==y){
        cout<<“even”<<endl;
    }else if(x>y){
        cout<<“hiroshi”<<endl;
    }else{
        cout<<“kenjiro”<<endl;
    }
    return 0;
}



Compiler output:
a.cc:12:15: error: extended character “ is not valid in an identifier
   12 |         cout<<“even”<<endl;
      |               ^
a.cc:12:15: error: extended character ” is not valid in an identifier
a.cc:14:15: error: extended character “ is not valid in an identifier
   14 |         cout<<“hiroshi”<<endl;
      |               ^
a.cc:14:15: error: extended character ” is not valid in an identifier
a.cc:16:15: error: extended character “ is not valid in an identifier
   16 |         cout<<“kenjiro”<<endl;
      |               ^
a.cc:16:15: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:12:15: error: '\U0000201ceven\U0000201d' was not declared in this scope
   12 |         cout<<“even”<<endl;
      |               ^~~~~~
a.cc:14:15: error: '\U0000201chiroshi\U0000201d' was not declared in this scope
   14 |         cout<<“hiroshi”<<endl;
      |               ^~~~~~~~~
a.cc:16:15: error: '\U0000201ckenjiro\U0000201d' was not declared in this scope
   16 |         cout<<“kenjiro”<<endl;
      |               ^~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
    int h,hh;
    int k,kk;
    int a,b,c,d;
    cin>>h>>hh>>k>>kk;
    cin>>a>>b>>c>>d;
    int x=(a*h+c*(h/10))+(b*hh+d*(hh/10));
    int y=(a*k+c*(k/10))+(b*kk+d*(kk/10));
    if(x==y){
        cout<<“even”<<endl;
    }else if(x>y){
        cout<<“hiroshi”<<endl;
    }else{
        cout<<“kenjiro”<<endl;
    }
    return 0;
}




Compiler output:
a.cc:12:15: error: extended character “ is not valid in an identifier
   12 |         cout<<“even”<<endl;
      |               ^
a.cc:12:15: error: extended character ” is not valid in an identifier
a.cc:14:15: error: extended character “ is not valid in an identifier
   14 |         cout<<“hiroshi”<<endl;
      |               ^
a.cc:14:15: error: extended character ” is not valid in an identifier
a.cc:16:15: error: extended character “ is not valid in an identifier
   16 |         cout<<“kenjiro”<<endl;
      |               ^
a.cc:16:15: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:12:15: error: '\U0000201ceven\U0000201d' was not declared in this scope
   12 |         cout<<“even”<<endl;
      |               ^~~~~~
a.cc:14:15: error: '\U0000201chiroshi\U0000201d' was not declared in this scope
   14 |         cout<<“hiroshi”<<endl;
      |               ^~~~~~~~~
a.cc:16:15: error: '\U0000201ckenjiro\U0000201d' was not declared in this scope
   16 |         cout<<“kenjiro”<<endl;
      |               ^~~~~~~~~
Language: C++

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

int main() {
  int h1, h2, k1, k2; cin >> h1 >> h2 >> k1 >> k2;
  int a, b, c, d; cin >> a >> b >> c >> d;

  auto calc = [&](int h, int k) {
                int score = h * a + k * b;
                score += c * (h / 10);
                score += d * (k / 20); 
                fprintf(stderr, "score = %d\n", score);
                return score;
              };

  int va = calc(h1, k1), vb = calc(h2, k2);
  if(va == vb) cout << "even" << endl;
  else if(va > vb) cout << "hiroshi" << endl;
  else cout << "kenjiro" << endl;
  return 0;
}


#error "a"


Compiler output:
a.cc:26:2: error: #error "a"
   26 | #error "a"
      |  ^~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
	int a, b, c, d; cin >> a >> b >> c >> d;
	int e, f, g, h; cin >> e >> f >> g >> h;
	int h = a*e + (a / 10)*g + b*f + (b / 10)*h;
	int k = c*e + (c / 10)*g + d*f + (d / 10)*h;
	if (h > k)cout << "hiroshi\n";
	else if (h < k)cout << "kenjiro\n";
	else cout << "even\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: redeclaration of 'int h'
    6 |         int h = a*e + (a / 10)*g + b*f + (b / 10)*h;
      |             ^
a.cc:5:22: note: 'int h' previously declared here
    5 |         int e, f, g, h; cin >> e >> f >> g >> h;
      |                      ^
Language: C++

#include <iostream>
using namespace std;
int main(){
    int h1, h2, k1, k2, a, b, c, d, h, k;

    cin >> h1 >> h2;
    cin >> k1 >> k2;
    cin >> a >> b >> c >> d;

    h = h1*a + h1/10*c + h2*b + h2/10*d;
    k = k1*a + k1/10*c + k2*b + k2/10*d;

    if(hr > k){
        cout << "hiroshi" << endl;
    }
    else if(k > hr){
        cout << "Kenjiro" << endl;
    }
    else{
        cout << "even" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:8: error: 'hr' was not declared in this scope; did you mean 'h'?
   13 |     if(hr > k){
      |        ^~
      |        h
Language: C++

#include "bits/stdc++.h"/*????????¬(?¶??????????)*/

using namespace std;/*????????¬(?¶??????????)*/

int main()
{
	int hh;
	int hhh;
	int kk;
	int kkk;
	int a;
	int b;
	int c;
	int d;
	cin >> hh >> hhh;
	cin >> kk >> kkk;
	cin >> a >> b >> c >> d;
	cout << a + b + c << endl;

	int hiro = (hh * a) + (hhh * b) +((hh / 10) * c) + ((hhh / 20) * d);
	int kenji = (kk * a) + (kkk * b) +((kk / 10) * c) + ((kkk / 20) * d);
	if(hiro > kenji) cout << hiroshi <<endl;
	if(hiro < kenji) cout << kenjiro << endl;
	if(hiro == kenji) cout << "even" <<endl;

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:34: error: 'hiroshi' was not declared in this scope; did you mean 'hiro'?
   22 |         if(hiro > kenji) cout << hiroshi <<endl;
      |                                  ^~~~~~~
      |                                  hiro
a.cc:23:34: error: 'kenjiro' was not declared in this scope; did you mean 'kenji'?
   23 |         if(hiro < kenji) cout << kenjiro << endl;
      |                                  ^~~~~~~
      |                                  kenji
Language: C++

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


int main(){
    int h1, h2, k1, k2, a, b, c, d, p1, p2;
    cin >> h1 >> h2 >> k1 >> k2 >> a >> b >>  c >> d;
    
    p1 = h1 * a + h2 *b +  (h1 / 10) * c + (h2 / 10) * d;
    p2 = k1 * a + k2 *b +  (k1 / 10) * c + (k2 / 10) * d;
    
    if(p1 > p2){
        cout << "hiroshi";
    }else if(p1 < p2){
        cout << "kenjiro";
    }else cout "even";
    
    cout << endl;
    
    
    return  0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:15: error: expected ';' before string constant
   16 |     }else cout "even";
      |               ^~~~~~~
      |               ;
Language: C++

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

int main(){
    int x1,x2,y1,y2;
    cout<<x1<<x2<<y1<<y2;
    cout<<a<<b<<c<<d;
    int x=x1*a+x1/10*c+x2*b+x2/20*d;
    int y=y1*a+y1/10*c+y2*b+y2/20*d;
    if(x<y) cout<<k"enjiro"<<endl;
        else if(x>y) cout<<"hiroshi"<<endl;
        else cout<<"even"<<endl;
    return 0;
    
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:5: error: 'cout' was not declared in this scope
    6 |     cout<<x1<<x2<<y1<<y2;
      |     ^~~~
a.cc:7:11: error: 'a' was not declared in this scope
    7 |     cout<<a<<b<<c<<d;
      |           ^
a.cc:7:14: error: 'b' was not declared in this scope
    7 |     cout<<a<<b<<c<<d;
      |              ^
a.cc:7:17: error: 'c' was not declared in this scope
    7 |     cout<<a<<b<<c<<d;
      |                 ^
a.cc:7:20: error: 'd' was not declared in this scope
    7 |     cout<<a<<b<<c<<d;
      |                    ^
a.cc:10:19: error: 'k' was not declared in this scope
   10 |     if(x<y) cout<<k"enjiro"<<endl;
      |                   ^
a.cc:11:39: error: 'endl' was not declared in this scope
   11 |         else if(x>y) cout<<"hiroshi"<<endl;
      |                                       ^~~~
a.cc:12:28: error: 'endl' was not declared in this scope
   12 |         else cout<<"even"<<endl;
      |                            ^~~~
Language: C++

int main(){
  int h1, h2, k1, k2;
  int a, b, c, d;
  int p1, p2;

  cin >> h1 >> h2 >> k1 >> k2 >> a >> b >> c >>d;

  p1 = h1 * a + h2 * b + (h1 / 10) * c + (h2 / 10) * d;
  p2 = k1 * a + k2 * b + (k1 / 10) * c + (k2 / 10) * d;

  if(p1 > p2){
    cout << "hiroshi";
  }else if(p1 < p2){
    cout << "kenziro";
  }else cout << "even";
  cout << endl;

  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> h1 >> h2 >> k1 >> k2 >> a >> b >> c >>d;
      |   ^~~
a.cc:12:5: error: 'cout' was not declared in this scope
   12 |     cout << "hiroshi";
      |     ^~~~
a.cc:14:5: error: 'cout' was not declared in this scope
   14 |     cout << "kenziro";
      |     ^~~~
a.cc:15:9: error: 'cout' was not declared in this scope
   15 |   }else cout << "even";
      |         ^~~~
a.cc:16:3: error: 'cout' was not declared in this scope
   16 |   cout << endl;
      |   ^~~~
a.cc:16:11: error: 'endl' was not declared in this scope
   16 |   cout << endl;
      |           ^~~~