criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.util.Scanner;
public class AOJ_1108{
    int ans_dict,num_of_stations,num_of_routes;
    int[][] node;
    boolean[][] visited;
    String ans_routes;
    void run(){
        Scanner sc = new Scanner(System.in);
        while(true){
            num_of_stations = sc.nextInt();
            num_of_routes = sc.nextInt();
            if(num_of_stations == 0 && num_of_routes == 0){
                break;
            }
            node = new int[num_of_stations+1][num_of_stations+1];
            for(int i = 0;i < num_of_routes;i++){
                int a = sc.nextInt();
                int b = sc.nextInt();
                int len = sc.nextInt();
                node[a][b] = len;
                node[b][a] = len;
            }
            ans_routes = "";
            
            /*
              for(int i = 0;i < num_of_stations;i++){
              for(int ii = 0;ii < num_of_stations;ii++){
              System.out.print(node[i][ii] + " ");
              }
              System.out.println();
              }
            */
            visited = new boolean[num_of_stations+1][num_of_stations+1];
            for(int i = 1;i < num_of_stations + 1;i++){
                for(int ii = 1;ii < num_of_stations;ii++){
                    visited[i][ii] = node[i][ii] > 0;
                }
            }
            for(int cur_node = 1;cur_node < num_of_stations + 1;cur_node++){
                DFS(cur_node,""+cur_node,0);
            }
            System.out.println(ans_dict);
            System.out.println(ans_routes);
          
        }
    }
    void DFS(int cur_node,String routes,int total_dist){
        //System.out.println(cur_node+" "+routes+" "+total_dist);
        if(ans_dict == total_dist){
            ans_routes = ans_routes.compareTo(routes) < 0 ? ans_routes : routes;
        }
        if(ans_dict < total_dist){
            ans_routes = routes;
            ans_dict = total_dist;
        }
        for(int next_node = 1;next_node < num_of_stations;next_node++){
            if(visited[cur_node][next_node]){
                visited[cur_node][next_node] = false;
                visited[next_node][cur_node] = false;
                DFS(next_node,routes+" "+next_node,total_dist+node[cur_node][next_node]);
                visited[cur_node][next_node] = true;
                visited[next_node][cur_node] = true;
            }
        }
    }
    public static void main(String[] args){
        new AOJ_1108().run();
    }
}

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

#include <stdio.h>
#include <vector>
using namespace std;
int RB[11][11],j,N;bool used[11][11];vector<int>a,x;
void dfs(int here, int prev, int cost) {used[here][prev]=used[prev][here]=0;x.push_back(here);for (int i=1,k=0;i<=N;i++) if (used[here][i] && RB[here][i]) k++,dfs(i,here,cost+RB[here][i]);if (!k) if (j<cost) j=cost,a=x;x.pop_back();used[here][prev]=used[prev][here]=1;}
int main() {int i,k,f;for (i=0;i<11;i++) for (j=0;j<11;used[i][j++]=1);while (1) {a.clear(),x.clear();scanf("%d %d",&N,&k);if (!N && !k) return 0;for (i=1;i<=N;i++) for (j=1;j<=N;RB[i][j++]=0);while (k--) {scanf("%d %d %d",&i,&j,&f);RB[i][j]=RB[j][i]=f;}for (i=1,j=0;i<=N;i++) dfs(i,i,0);printf("%d\n",j);for (printf("%d",a[0]),i=1,j=a.size();i<j;printf(" %d",a[i++]));puts("");}}

Compiler output:
a.cc: In function 'void dfs(int, int, int)':
a.cc:5:194: error: 'k' was not declared in this scope
    5 | void dfs(int here, int prev, int cost) {used[here][prev]=used[prev][here]=0;x.push_back(here);for (int i=1,k=0;i<=N;i++) if (used[here][i] && RB[here][i]) k++,dfs(i,here,cost+RB[here][i]);if (!k) if (j<cost) j=cost,a=x;x.pop_back();used[here][prev]=used[prev][here]=1;}
      |                                                                                                                                                                                                  ^
Language: C++

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

#define NIL -1

vector< vector<int> > edge;
vector<int> answer;

class Result
{
public:
    vector<int> path;
    int cost;
};

Result rec(int v, vector< vector<int> > visited, int cost) {
    Result result;
    result.cost = cost;
    int maxCost = cost;
    for(int i=0; i<edge.size(); i++) {
        if(visited[v][i]) continue;
        if(edge[v][i]==NIL) continue;
        visited[v][i] = visited[i][v] = 1;
        Result r = rec(i, visited, cost+edge[v][i]);
        if(maxCost >= r.cost) continue;
        maxCost = r.cost;
        result = r;
        result.path.insert(result.path.begin(), i);
    }
    return result;
}
void solve() {
    Result result;
    int maxCost = NIL;
    vector< vector<int> > visited(edge.size(), vector<int>(edge.size(), 0));
    for(int i=0; i<edge.size(); i++) {
        Result r = rec(i, visited, 0);
        if(maxCost >= r.cost) continue;
        maxCost = r.cost;
        result = r;
        result.path.insert(result.path.begin(), i);
    }
    cout<<result.cost<<endl;
    for(vector<int>::iterator i=result.path.begin(); i!=result.path.end(); i++) {
        if(i!=result.path.begin()) cout<<" ";
        cout<<*i+1;
    }
    cout<<endl;
}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
テつ?
ll calc(ll x,ll y,ll z){
テつ?つ?l A=x*x*x+y*y*y;
テつ?つ?eturn (A<=z*z*z) ? A:0;
}
テつ?
int main(){
テつ?つ?l z;
テつ?つ?hile(cin>>z,z){
テつ?
テつ?つ?つ?つ?l mx=0;
テつ?つ?つ?つ?or(int i=1;i<2000;i++)
テつ?つ?つ?つ?つ?つ?or(int j=1;j<2000;j++)mx=max(mx,calc(i,j,z));
テつ?つ?つ?つ?out<<z*z*z-mx<<endl;
テつ?つ?
テつ?つ?eturn 0;
}

Compiler output:
a.cc:4:1: error: '\U000030c6\U00003064' does not name a type
    4 | テつ?
      | ^~~~
a.cc:9:1: error: '\U000030c6\U00003064' does not name a type
    9 | テつ?
      | ^~~~
Language: C++

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

int main(){
    long long int n;
    while(cin >> n, n){
        long long int ans = 100000;
        for(long long int i=1; pow(i,3) <= pow(n, 3); i++){
            for(long long int j=1; pow(i,3)+pow(j,3) <= pow(n,3); j++){
                long long int m = pow(n,3)-pow(i, 3)-pow(j, 3);
                if(ans > m) ans = m;
            }
        }
     

Compiler output:
a.cc: In function 'int main()':
a.cc:15:10: error: expected '}' at end of input
   15 |         }
      |          ^
a.cc:8:23: note: to match this '{'
    8 |     while(cin >> n, n){
      |                       ^
a.cc:15:10: error: expected '}' at end of input
   15 |         }
      |          ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: Java

import java.util.*;
import java.lang.Math;

public class AOJ1110
{
    static int[] d={-5,-4,-3,-1,0,1,3,4,5};
    static int[] a={0,2,5,7,8,10,13,15,16,18};
    
    public static void main(String[] args)
    {
        ArrayList<Integer> layout;
	Scanner sc=new Scanner(System.in);
	int attend=sc.nextInt();
	for(int i=0;i<attend;i++){
	    layout =new ArrayList<Integer>();
	    for(int j=0;j<4*5;j++){
		layout.add(sc.nextInt());
	    }
	    
	    System.out.println((20-2*solve(layout,0)));
	    
	}
	
    }
    static int solve(ArrayList<Integer> layout,int step)
    {
	int rem=step;
	for(int current=0;current<20;current++){
	    int currentCard =layout.get(current);
	    if(currentCard==0)break;
	    for(int k=0;k<d.length;k++){
		if((current%4==0&&k%3==0)||(current%4==3&&k%3==2)||k==4)continue;
		if((current<4&&k<3)||(current>=16&&k>5))continue;
		int next=current+d[k];
		int nextCard=layout.get(next);
		if(nextCard==0)break;
		if(currentCard==nextCard){
		    ArrayList<Integer> nextLayout=new ArrayList<Integer>(layout);
		    nextLayout.remove(Math.max(current,next));
		    nextLayout.remove(Math.min(current,next));
		    nextLayout.add(0);
		    nextLayout.add(0);
		    rem=Math.max(rem,solve(nextLayout,step+1));
		    if(rem==10)return 10;
		}
	    }
	}
	
	return rem;
    }  
}

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

4
1 4 5 2
3 1 4 3
5 4 2 2
4 5 2 3
1 1 3 5
5 1 5 1
4 5 3 2
3 2 1 4
1 4 5 3
2 3 4 2
1 2 1 2
5 4 5 4
2 1 2 1
3 5 3 4
3 3 5 4
4 2 3 1
2 5 3 1
3 5 4 2
1 5 4 1
4 5 3 2

Compiler output:
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 4
      | ^
Language: C

#include <iostream>
#include <cstdio>
#include <memory.h>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <queue>
#include <map>
#include <vector>

using namespace std;
char a1[1100][60],b1[1100][60],c1[1100][60],a2[1100][60],b2[1100][60],c2[1100][60];
int a[1100],c[1100];
int main()
{
    int n,m;
    while(cin>>n>>m&&n+m)
    {
        int j=0,b=0;
        bool flag;
        for(int i=1;i<=n;i++)
        {
            scanf("%s",a1[i]);
            scanf("%s",b1[i]);
            scanf("%s",c1[i]);
            if(strcmp(a1[i],"deny")==0)
            {
                c[j++]=i;
            }
        }
        for(int i=1;i<=m;i++)
        {
            scanf("%s",a2[i]);
            scanf("%s",b2[i]);
            scanf("%s",c2[i]);
        }
        for(int i=1;i<=m;i++)
        {
            flag=0;
            for(int k=0;k<=j;k++)
            {
                int l;
                for(l=0;l<8;l++)
                {
                    if(b1[k][l]!=a2[i][l]&&b1[k][l]!='?')
                        break;
                    if(c1[k][l]!=b2[i][l]&&c1[k][l]!='?')
                        break;
                }
                if(l==8)
                {
                    flag=1;
                    break;
                }
            }
            if(flag==1)
            {
                continue;
            }
            for(int k=1;k<=n;k++)
            {
                flag=0;
                for(int l=0;l<j;l++)
                {
                    if(c[l]==k)
                    {
                        flag=1;
                        break;
                    }
                }
                if(flag)
                    continue;
                int l;
                for(l=0;l<8;l++)
                {
                    if(b1[k][l]!=a2[i][l]&&b1[k][l]!='?')
                        break;
                    if(c1[k][l]!=b2[i][l]&&c1[k][l]!='?')
                        break;
                }
                if(l==8)
                    a[b++]=i;
            }
        }
        cout<<b<<endl;
        for(int i=0;i<b;i++)
        {
            cout<<a2[a[i]]<<" "<<b2[a[i]]<<" "<<c2[a[i]]<<endl;
        }
    }
    return 0;
}

Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C

#include <cstdio>

int father[1010];
int n,m;
void init(int val){
	for(int i=1;i<=val;i++){
		father[i]=i;
	}
}
int find(int val){
	if(father[val]==val) return val;
	return find(father[val]);
}
void combine(int x,int y){
	int tx = find(x);
	int ty = find(y);
	if(tx!=ty)
		father[tx]=ty;
}
int main(){
	while(scanf("%d",&n)!=EOF&&n){
		scanf("%d",&m);
		init(n);
		int a,b;
		for(int i=0;i<m;i++){
			scanf("%d%d",&a,&b);
			combine(a,b);
		}
		int ans = 0;
		for(int i=1;i<=n;i++){
			if(father[i]==i)
				ans++;
		}
		printf("%d\n",ans-1);
	}
	return 0;
}


Compiler output:
main.c:1:10: fatal error: cstdio: No such file or directory
    1 | #include <cstdio>
      |          ^~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n)   FOR(i,0,n)
#define pb push_back
#define mp make_pair
typedef long long ll;
typedef pair<int,int> pint;

string s[1024][3],ans[1024][3];
bool ck(string c1,string c2){
    bool flag=true;
    rep(i,8){
        if(c2[i]=='?') continue;
        if(c1[i]!=c2[i]){
            flag =false;break;
        } 
    }
    return flag;
}
int main(){
    int n,m; 
    while(cin>>n>>m,n){
        int cnt=0;
        rep(i,n) cin>>s[i][0]>>s[i][1]>>s[i][2];
        rep(i,m){
            string t1, t2,t3;
            cin>>t1>>t2>>t3;
            for(int j=n-1;j>=0;--j){
                if(ck(t1,s[j][1])&&ck(t2,s[j][2])){
                    if(s[j][0][0]=='p'&&!flag){
                        ans[cnt][0]=t1,ans[cnt][1]=t2,ans[cnt][2]=t3;
                        ++cnt;
                    }
                    break;
                }
            }
        }
        cout<<cnt<<endl;
        rep(i,cnt) cout<<ans[i][0]<<' '<<ans[i][1]<<' '<<ans[i][2]<<endl;;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:42: error: 'flag' was not declared in this scope
   31 |                     if(s[j][0][0]=='p'&&!flag){
      |                                          ^~~~
Language: C++

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

struct rule {
  bool permit;
  string src;
  string dst;
  rule(bool p, const string& s, const string& d)
    : permit(p), src(s), dst(d)
  {}
};

bool match(const string& pat, const string& addr)
{
  const int N = min(pat.size(), addr.size());
  for (int i = 0; i < N; i++) {
    if (pat[i] != '?' && pat[i] != addr[i]) {
      return false;
    }
  }
  return true;
}

bool legal(const vector<rule>& rules, const string& src, const string& dst)
{
  for (vector<rule>::const_iterator it(rules.begin()); it != rules.end(); ++it) {
    if (it->permit && match(it->src, src) && match(it->dst, dst)) {
      return true;
    }
    if (!it->permit && match(it->src, src) && match(it->dst, dst)) {
      return false;
    }
  }
  return false;
}

int main()
{
  int n, m;
  while (cin >> n >> m && n != 0 && m != 0) {
    vector<rule> rules;
    for (int i = 0; i < n; i++) {
      string p, s, d;
      cin >> p >> s >> d;
      rules.push_back(rule(p == "permit", s, d));
    }
    reverse(rules.begin(), rules.end());
    vector<string> ans;
    for (int i = 0; i < m; i++) {
      string s, d, p;
      cin >> s >> d >> p;
      if (legal(rules, s, d)) {
        ans.push_back(s + " " + d + " " + p);
      }
    }
    cout << ans.size() << endl;
    for (vector<string>::const_iterator it(ans.begin()); it != ans.end(); ++it) {
      cout << *it << endl;
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:48:5: error: 'reverse' was not declared in this scope
   48 |     reverse(rules.begin(), rules.end());
      |     ^~~~~~~
Language: C++

#include<iosrteam>
#include<algorithm>
using namespace std;

int main(){
int a[10];
for(int i=0;i<10;i++)cin >> a[i];
sort(a,a+10);
for(int i=9;i>6;i--)cout << a[i] << endl;
}

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

import java.util.Scanner;
public class Mian
{
	public static void main(String arg[])
	{
		Scanner in = new Scanner(System.in);
		int a[][]=new int[5][5];
		int n=in.nextInt();
		while(n-->0)
		{
			for(int i=0; i<5; i++)
				for(int j=0; j<5; j++)
					a[i][j]=in.nextInt();
			int max=0;
			for(int i=0; i<5; i++)
			{
				for(int j=0; j<5; j++) //ここまで始点決定の記述
				{
					for(int h=i;h<5;h++)
					{
						for(int w=j;w<5;w++)
						{
							boolean flag =true;
							int co=0;
							for(int x=i;x<=h;x++)
								for(int y=j;y<=w;y++)
								{
									if(a[x][y]==0)
										flag = false;
									else
										co++;
								}
							if(flag)
								max=Math.max(max, co);
						}
					}
				}
			}
			System.out.println(max);
		}
	}
}

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

import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Scanner;
import java.util.Stack;
 
 
public class Main_Fast {
     
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
         
        final int m = sc.nextInt();
        
        for(int tt = 0; tt < m; tt++){
        	int[][] sum = new int[5][5];
        	
        	for(int i = 0; i < 5; i++){
        		for(int j = 0; j < 5; j++){
        			sum[i][j] = sc.nextInt();
        		}
        	}
        	/*
        	for(int i = 0; i < 5; i++){
        		for(int j = 1; j < 5; j++){
        			sum[i][j] += sum[i][j-1];
        		}
        	}
        	*/
        	for(int j = 0; j < 5; j++){
        		for(int i = 1; i < 5; i++){
        			if(sum[i][j] == 0){
        				continue;
        			}else if(sum[i-1][j] == 0){
        				continue;
        			}else{
        				sum[i][j] += sum[i-1][j];
        			}
        		}
        	}
        	/*
        	for(int i = 0; i < 5; i++){
        		for(int j = 0; j < 5; j++){
        			System.out.print(sum[i][j] + " ");
        		}
        		System.out.println();
        	}
        	*/
        	int max = Integer.MIN_VALUE;
        	Stack<Integer> stack = new Stack<Integer>();
        	Stack<Integer> number = new Stack<Integer>();
        	for(int i = 0; i < 5; i++){
        		stack.clear();
        		number.clear();
        		
        		for(int j = 0; j < 5; j++){
        			//System.out.println(stack);
        			//System.out.println(number);
        			
        			if(stack.isEmpty()){
        				stack.push(sum[i][j]);
        				number.push(j);
        			}else if(stack.peek() <= sum[i][j]){
        				stack.push(sum[i][j]);
        				number.push(j);
        			}else{
        				while(!stack.isEmpty() && stack.peek() > sum[i][j]){
        					final int high = stack.pop();
        					final int dist = j - number.pop();
        					
        					max = Math.max(max, high * dist);
        				}
        				
        				stack.push(sum[i][j]);
        				number.push(j);
        			}
        		}
        		while(!stack.isEmpty()){
        			final int high = stack.pop();
        			final int dist = 5 - number.pop();
        					
        			max = Math.max(max, high * dist);
        		}
        	}
        	
        	
        	
        	System.out.println(max);
        }
         
         
    }
 
}

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

import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Scanner;
import java.util.Stack;
 
 
public class Main_Fast {
     
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
         
        final int m = sc.nextInt();
        
        for(int tt = 0; tt < m; tt++){
        	int[][] sum = new int[5][5];
        	
        	for(int i = 0; i < 5; i++){
        		for(int j = 0; j < 5; j++){
        			sum[i][j] = sc.nextInt();
        		}
        	}
        	/*
        	for(int i = 0; i < 5; i++){
        		for(int j = 1; j < 5; j++){
        			sum[i][j] += sum[i][j-1];
        		}
        	}
        	*/
        	for(int j = 0; j < 5; j++){
        		for(int i = 1; i < 5; i++){
        			if(sum[i][j] == 0){
        				continue;
        			}else{
        				sum[i][j] += sum[i-1][j];
        			}
        		}
        	}
        	/*
        	for(int i = 0; i < 5; i++){
        		for(int j = 0; j < 5; j++){
        			System.out.print(sum[i][j] + " ");
        		}
        		System.out.println();
        	}
        	*/
        	int max = Integer.MIN_VALUE;
        	Stack<Integer> stack = new Stack<Integer>();
        	Stack<Integer> number = new Stack<Integer>();
        	for(int i = 0; i < 5; i++){
        		stack.clear();
        		number.clear();
        		
        		for(int j = 0; j < 5; j++){
        			//System.out.println(i + " " + j + " " + stack);
        			//System.out.println(i + " " + j + " " + number);
        			
        			if(stack.isEmpty()){
        				stack.push(sum[i][j]);
        				number.push(j);
        			}else if(stack.peek() < sum[i][j]){
        				stack.push(sum[i][j]);
        				number.push(j);
        			}else{
        				int num = j;
        				
        				while(!stack.isEmpty() && stack.peek() > sum[i][j]){
        					final int high = stack.pop();
        					final int place = number.pop();
        					
        					num = Math.min(num, place);
        					
        					final int dist = j - place;
        					
        					//System.out.println("<" + dist + " " + high + ">");
        					
        					max = Math.max(max, high * dist);
        				}
        				
        				if(stack.isEmpty() || stack.peek() < sum[i][j]){
        					stack.push(sum[i][j]);
        					number.push(num);
        				}
        			}
        		}
        		
        		//System.out.println(i + " " + 5 + " " + stack);
    			//System.out.println(i + " " + 5 + " " + number);
        		
        		while(!stack.isEmpty()){
        			final int high = stack.pop();
        			final int dist = 5 - number.pop();
        			
        			//System.out.println("<" + dist + " " + high + ">");
        			
        			max = Math.max(max, high * dist);
        		}
        	}
        	
        	System.out.println(max);
        }
         
         
    }
 
}

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

#include<stdio.h>
int main(){
  int a[7][7],m,i,j,k,l,n,o,not,max,my,mx;
  scanf("%d",&m);
  for(i=0;i<m;i++){
    //syokika
    for(j=0;j<7;j++){
      for(k=0;k<7;k++){
	a[j][k]=0;
      }
    }
    max=0;
    //in
    for(j=0;j<5;j++){
      for(k=0;k<5;k++){
	scanf("%d",&a[j][k]);
      }
    }
    //syori
    for(j=0;j<5;j++){
      for(k=0;k<5;k++){
	if(a[j][k]==1){
	  for(l=0;k+l<6;l++){
	    if(a[j][k+l]==1){
	      mx=l+1;
	      for(n=0;j+n<6;n++){
		not=0;
		for(o=0;o<=l;o++){
		  if(a[j+n][k+o]==0)not=1;
		}
		if(not==1){
		  my=n;
        	  if(max<my*mx){
		    max=my*mx;
		  }
		  break;
		}
	      }
	    }
	    else{
	      break;
	    }
	  }

	}
      }
    }
    printf("%d\n",max);
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:29: error: expected unqualified-id before 'not' token
    3 |   int a[7][7],m,i,j,k,l,n,o,not,max,my,mx;
      |                             ^~~
a.cc:12:5: error: 'max' was not declared in this scope
   12 |     max=0;
      |     ^~~
a.cc:25:15: error: 'mx' was not declared in this scope; did you mean 'm'?
   25 |               mx=l+1;
      |               ^~
      |               m
a.cc:27:20: error: expected primary-expression before '=' token
   27 |                 not=0;
      |                    ^
a.cc:29:40: error: expected primary-expression before '=' token
   29 |                   if(a[j+n][k+o]==0)not=1;
      |                                        ^
a.cc:31:23: error: expected primary-expression before '==' token
   31 |                 if(not==1){
      |                       ^~
a.cc:32:19: error: 'my' was not declared in this scope; did you mean 'm'?
   32 |                   my=n;
      |                   ^~
      |                   m
Language: Java

import java.util.Scanner;


public class Jigsaw {

	static char[][] input = new char[9][4];
	static char[][] puzzles = new char[9][4];
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int cnt = Integer.parseInt(s.nextLine());
		for(int i=0 ; i<cnt ; i++) {
			String[] tmp = s.nextLine().split(" ");
			for(int j=0 ; j<9 ; j++) {
				input[j] = tmp[j].toCharArray();
			}
			boolean[] isUsed = new boolean[9];
			System.out.println(solve(0, isUsed));
		}
	}

	public static int solve(int position, boolean[] isUsed) {
		if(position == 9)
			return 1;
		int cnt = 0;
		for(int i=0 ; i<9 ; i++) {
			// ??¢???????±?????????????????????????????????´???
			if(isUsed[i])
				continue;
			char[] puzzle = input[i];
			puzzles[position] = puzzle;
			for(int j=0 ; j<4 ; j++) {
				if(check(position)) {
					isUsed[i] = true;
					cnt += solve(position+1, isUsed);
					isUsed[i] = false;
				}
				rotate(position);
			}
		}
		puzzles[position] = null;
		return cnt;
	}

	public static boolean check(int position) {
		boolean result = false;
		return result;
	}

	public static void rotate(int position) {
		char[] tmp = puzzles[position];
		char tm = tmp[0];
		for(int i=1 ; i<tmp.length ; i++) {
			tmp[i-1] = tmp[i];
		}
		tmp[tmp.length-1] = tm;
	}
}

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

import java.util.*;
class Main{
    String[][] puzzle;
    String[][] field; 
    boolean[] used;
    void run(){
	Scanner sc=new Scanner(System.in);
	int n=sc.nextInt();
	for(int attend=0;attend<n;attend++){
	    field =new String[3][3];
	    puzzle=new String[9][4];
	    used=new boolean[9];
	    for(int i=0;i<9;i++){
		setPuzzle(i,sc.next());
	    }
	    System.out.println(dfs(0));
	}
    }
    void setPuzzle(int num,String pu){
	for(int i=0;i<4;i++){
	    puzzle[num][i]=pu.substring(i,pu.length())+pu.substring(0,i);
	}
    }
    int dfs(int step){
	if(step==9) return 1;
	int ans=0;
	for(int i=0;i<9;i++){
	    if(used[i]==true)continue;
	    for(int j=0;j<4;j++){
		if(step>2){
		    if(!puzzleCompare(field[step/3-1][step%3].charAt(2),puzzle[i][j].charAt(0)))continue;
		}
		if(step%3!=0){
		    if(!puzzleCompare(field[step/3][step%3-1].charAt(3),puzzle[i][j].charAt(1)))continue;
		}
		field[step/3][step%3]=puzzle[i][j];
		used[i]=true;
		ans+=dfs(step+1);
		used[i]=false;
	    }
	}
	return ans;
    }
    boolean puzzleCompare(char puz1,char puz2){
	if(puz1-'a'+'A'==puz2)return true;
	else if(puz2-'a'+'A'==puz1)return true;
	else return false;
    }
    public static void Main(String[] args){
	new AOJ1116().run();
    }
}

Compiler output:
Main.java:50: error: cannot find symbol
	new AOJ1116().run();
	    ^
  symbol:   class AOJ1116
  location: class Main
1 error
Language: C++

#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;

char s[9][5], t[3][3][5];
int dx[]{ -1,0,1,0 }, dy[]{ 0,1,0,-1 };
int dfs(int p) {
	int res = 0;
	rep(i, 3)rep(j, 3) {
		if (t[i][j][0])continue;
		rep(k, 4) {
			rep(l, 4) {
				int nx = i + dx[l], ny = j + dy[l];
				if (nx < 0 || 3 <= nx || ny < 0 || 3 <= ny || !t[nx][ny][0])continue;
				if (abs(s[p][(l + k) % 4] - t[nx][ny][(l + 2) % 4]) != 'a' - 'A')goto g;
			}
			if (p == 8)res++;
			else {
				rep(l, 4)t[i][j][l] = s[p][(l + k) % 4];
				res += dfs(p + 1); t[i][j][0] = 0;
			}g:;
		}
	}
	return res;
}
int main() {
	int n; scanf("%d", &n);
	rep(i, n) {
		scanf("%s", s[j]);
		printf("%d\n", dfs(0));
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:31: error: 'j' was not declared in this scope
   29 |                 scanf("%s", s[j]);
      |                               ^
Language: C++

#include <vector>
#include <list>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <climits>
#include <cassert>
using namespace std;
inline int toInt (string s) {int v; istringstream sin(s); sin>>v; return v;}
template<class T> inline string toString(T x){ostringstream sout;sout<<x;return sout.str();}
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int,int> pii;
typedef long long ll;
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define EACH(t,i,c) for(t::iterator i=(c).begin();i!=(c).end();++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
const double EPS=1e-10;
const double PI=acos(-1.0);

struct P{
	string sides;
	P(string sides):sides(sides){}
};
typedef vector<P> vP;
typedef vector<vP> vvP;
int dx[]={0,1,0,-1},dy[]={-1,0,1,0};

bool match(char l,char r){
	if(l==' '||r==' '){
		return true;
	}
	if(l>r){
		swap(l,r);
	}
	switch(l){
	case 'R':
		return r=='r';
	case 'G':
		return r=='g';
	case 'B':
		return r=='b';
	case 'W':
		return r=='w';
	default:
		assert(r!='R'&&r!='G'&&r!='B'&&r!='W');
		return false;
	}
}

bool ok(vvP &board,P piece,int x,int y){
	REP(i,4){
		int xx=x+dx[i],yy=y+dy[i];
		if(xx>=0&&xx<3&&yy>=0&&yy<3){
			if(!match(board[xx][yy].sides[(i+2)%4],piece.sides[i])){
				return false;
			}
		}
	}
	return true;
}

P rotate(P &p,int a){
	P ret("    ");
	REP(i,4){
		ret.sides[i]=p.sides[(i+a)%4];
	}
	return ret;
}
int aaaa=0;
int dfs(vvP &board,vi used,int n,vP &pieces){
	if(n==9){
		return 1;
	}
	int res=0;
	int x=n%3,y=n/3;
	REP(i,9){
		if(!used[i]){
			REP(j,4){
				P piece=rotate(pieces[i],j);
				if(ok(board,piece,x,y)){
					vi newUsed(used);
					newUsed[i]=1;
					vvP newBoard(board);
					newBoard[x][y]=piece;
					res+=dfs(newBoard,newUsed,n+1,pieces);
				}
			}
		}
	}
	aaaa=max(aaaa,res);
	return res;
}

int main(){
	int N;
	cin>>N;
	REP(i,N){
		vP pieces;
		REP(j,9){
			string sides;
			cin>>sides;
			pieces.push_back(P(sides));
		}
		cout<<dfs(vvP(3,vP(3,P("    "))),vi(9),0,pieces)<<endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:123:27: error: cannot bind non-const lvalue reference of type 'vvP&' {aka 'std::vector<std::vector<P> >&'} to an rvalue of type 'vvP' {aka 'std::vector<std::vector<P> >'}
  123 |                 cout<<dfs(vvP(3,vP(3,P("    "))),vi(9),0,pieces)<<endl;
      |                           ^~~~~~~~~~~~~~~~~~~~~~
a.cc:89:14: note:   initializing argument 1 of 'int dfs(vvP&, vi, int, vP&)'
   89 | int dfs(vvP &board,vi used,int n,vP &pieces){
      |         ~~~~~^~~~~
Language: C++

#include <vector>
#include <list>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <climits>
#include <cassert>
using namespace std;
inline int toInt (string s) {int v; istringstream sin(s); sin>>v; return v;}
template<class T> inline string toString(T x){ostringstream sout;sout<<x;return sout.str();}
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int,int> pii;
typedef long long ll;
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define EACH(t,i,c) for(t::iterator i=(c).begin();i!=(c).end();++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
const double EPS=1e-10;
const double PI=acos(-1.0);


const int UNDEF=INT_MAX;
int main(){
	int p,s;
	int cc=0;
	while(cin>>p,p){
		if(cc){
			cout<<endl<<endl;
		}
		cin>>s;
		vvi cells(p+1,vi(s+1,UNDEF));
		vector<pii> undefs;
		REP(i,p+1){
			REP(j,s+1){
				string s;
				cin>>s;
				if(s=="?"){
					cells[i][j]=UNDEF;
					undefs.push_back(make_pair(i,j));
				}else{
					cells[i][j]=toInt(s);
				}
			}
		}

		vi ans(undefs.size());

		bool flag=true;
		vi used(undefs.size(),0);
		while(flag){
			flag=false;
			REP(kk,undefs.size()){
				if(used[kk])continue;
				pii u=undefs[kk];

				int sum2=0;
				REP(i,s){
					if(cells[u.first][i]==UNDEF){
						if(i!=u.second){
							goto ng_s;
						}
					}else{
						sum2+=cells[u.first][i];
					}
				}
				ans[kk]=(cells[u.first][s]-sum2);
				cells[u.first][u.second]=ans[kk];
				used[kk]=1;
				flag=true;
				goto ng_p;
ng_s:;
				int sum1=0;
				REP(i,p){
					if(cells[i][u.second]==UNDEF){
						if(i!=u.first){
							goto ng_p;
						}
					}else{
						sum1+=cells[i][u.second];
					}
				}
				ans[kk]=(cells[p][u.second]-sum1);
				cells[u.first][u.second]=ans[kk];
				used[kk]=1;
				flag=true;
	ng_p:;
			}
		}

		if(find(ALL(used),0)==used.end()){
			REP(i,ans.size()){
				if(i==ans.size()-1){
					cout<<ans[i];
				}else{
					cout<<ans[i]<<endl;
				}
			}
		}else{
			cout<<"NO";
		}
		cc++;
	}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:104:9: error: jump to label 'ng_p'
  104 |         ng_p:;
      |         ^~~~
a.cc:88:38: note:   from here
   88 |                                 goto ng_p;
      |                                      ^~~~
a.cc:90:37: note:   crosses initialization of 'int sum1'
   90 |                                 int sum1=0;
      |                                     ^~~~
Language: Java

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

        int n;
        int x,y,dx,dy;
        int xmax,ymax;
        int d,dmax;

        Scanner kbd=new Scanner(System.in);

        n=kbd.nextInt();
        x=0;
        y=0;
        d=0;

        for(int i=0; i<n; i++){
        dmax=0;
        xmax=0;
        ymax=0;
        while(true){
           dx=kbd.nextInt();
           dy=kbd.nextInt();
           x+=dx;
           y+=dy;
           d=x*x+y*y;
           if(dmax<d){
              dmax=d;
              xmax=x;
              ymax=y;
           } else if(dmax==d){
                if(x>xmax){
                xmax=x;
                ymax=y;
                }
           }
           if(dx==0 && dy==0){
                System.out.println(xmax+" "+ymax);
                break;
                }
           }
        }

        }
}

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

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>
#include<stack>

using namespace std;

typedef long long Int;
typedef vector<int> vint;
typedef pair<int,int> pint;
typedef vector<string> vstring;
typedef vector<pint> vpint;
typedef stringstream SS;

template<class T> void chmin(T &t, T f) { if (t > f) t = f; }
template<class T> void chmax(T &t, T f) { if (t < f) t = f; }

#define rep(i,n) for(int i=0;i<(n);++i)
#define repn(i,m,n) for(int i=(m);i<(n);++i)
#define repd(i,n) for(int i=(n)-1;i>=0;--i)
#define repnd(i,m,n) for(int i=(n)-1;i>=(m);--i)
#define rep0(i,n) for(i=0;i<(n);++i)
#define repn0(i,m,n) for(i=(m);i<(n);++i)
#define repd0(i,n) for(i=(n)-1;i>=0;--i)
#define repnd0(i,m,n) for(i=(n)-1;i>=(m);--i)
#define repc(i,n) for(int i=0;i<=(n);++i)
#define repcn(i,m,n) for(int i=(m);i<=(n);++i)
#define repcd(i,n) for(int i=(n);i>=0;--i)
#define repcnd(i,m,n) for(int i=(n);i>=(m);--i)
#define repc0(i,n) for(i=0;i<=(n);++i)
#define repcn0(i,m,n) for(i=(m);i<=(n);++i)
#define repcd0(i,n) for(i=(n);i>=0;--i)
#define repcnd0(i,m,n) for(i=(n);i>=(m);--i)
#define all(n) n.begin(),n.end()
#define sz(n) ((int)(n).size())
#define IL for(;;)
#define MP make_pair
#define PB push_back
#define X second
#define Y first
#define p_queue(n) priority_queue<n,vector<n>,greater<n> >
#define PUTLINE cout<<"LINE:"<<__LINE__<<endl;

const int INF = 2147483647/3;
const double EPS = 1e-10;
const double PI = acos(-1.0);

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



int main() {
	int n;
	cin >> n;
	rep (iii, n) {
		int x = 0, y = 0;
		int resx = 0, resy = 0, dis = 0;
		int dx, dy;
		IL {
			cin >> dx >> dy;
			if (dx == 0 && dy == 0) break;
			x += dx;
			y += dy;
			if (dis < x * x + y * y || dis == x * x + y * y && resx < x) {
				resx = x;
				resy = y;
				dis = x * x + y * y;
			}
		}
		cout << resx << " " << resy << endl;
	}
	return 0;
}

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

#include <iostream>
#include <algorithm>
using namespace std;
int n, dx, dy;
int main() {
	cin >> n;
	for(int i = 0; i < n; i++) {
		int x = 0, y = 0, px = 0, py = 0;
		while(cin >> dx >> dy, dx | dy) {
			x += dx, y += dy;
			if((10000LL * (px * px + py * py) + px) < 10000LL * (x * x + y * y) + x)) px = x, py = y;
		}
		cout << px << ' ' << py << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:97: error: expected primary-expression before ')' token
   11 |                         if((10000LL * (px * px + py * py) + px) < 10000LL * (x * x + y * y) + x)) px = x, py = y;
      |                                                                                                 ^
Language: C++

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


int main(){
  int n, dx, dy;
  int px, py;
  long long int mdis, dis;
  int mpx, mpy;
  cin>> n;
  for(int i = 0;i < n;i++){
    px = py = 0;
    mdis = 0;
    do{
      cin >> dx >> dy;
      px += dx;
      py += dy;
      dis = pow(px,2)+pow(py,2);
      if( mdis < dis){
        mpx = px;mpy = py;
        mdis = dis;
      }
    }while(dx||dy);
    cout << mpx << " " << mpy << endl;
  }
  return 0;

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

#include<iostream>

using namespace std;

struct P
{
	int x,y;
};

P maxP(const P a,const P b){
	int la=a.x*a.x+a.y*a.y;
	int lb=b.x*b.x+b.y*b.y;

	if(la>lb)return a;
	if(la<lb)return b;

	if(a.x>b.x)
		return a;
	else
		return b;
}

int main(){
	int n;
	cin >> n;
	for(int i=0;i<n;i++){
		P d,p={0,0},m={0,0};
		while(cin >> d.x >> d.y, d.x|d.y){
			p.x+=d.x;p.y+=d.y;
			m=maxP(m,p);
		}
		cout m.x << " " << m.y << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:21: error: expected ';' before 'm'
   32 |                 cout m.x << " " << m.y << endl;
      |                     ^~
      |                     ;
Language: C++

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

using namespace std;

int up[101];
int down[101];

bool isaonb(int a,int b){
  while(up[b]){
    if(a==b)return true;
    b=up[b];
  }
  return false;
}

void overaf(int a){
  while(up[a]){
    int upa=up[a];
    down[up[a]]=0;
    up[a]=0;
    a=upa;
  }
  down[a]=0;
}

int topa(int a){
  while(up[a])a=up[a];
  return a;
}

main(){
  int m;
  while(cin>>m){
    if(m==0)break;

    memset(up,0,sizeof(up));
    memset(down,0,sizeof(down));

    int i,j;
    while(cin>>i>>j){
      if(i==0 && j==0)break;
      if(i==j)continue;
      if(i==0)continue;
      if(j==0){
	if(down[i]==0)continue;
	else {
	  overaf(down[i]);
	  continue;
	}
      }

      if(isaonb(i,j)){
	continue;
      }else if(isaonb(j,i)){
	if(down[i])overaf(down[i]);
	else overaf(i);
	up[j]=i;
	down[i]=j;
	continue;
      }else{
	if(down[i])overaf(down[i]);
	else overaf(i);
	int topj=topa(j);
	up[topj]=i;
	down[i]=topj;
	continue;
      }
    }

    vector<int> pile;
    for(int i=1;i<=m;i++){
      if(down[i])continue;
      int num=1;
      int cur=i;
      while(up[cur]){
	++num;
	cur=up[cur];
      }
      pile.push_back(num);
    }
    sort(pile.begin(),pile.end());
    for(int i=0;i<pile.size();i++){
      cout<<pile[i]<<endl;
    }
    cout<<"end"<<endl;
  }
}

Compiler output:
a.cc:33:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   33 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:38:5: error: 'memset' was not declared in this scope
   38 |     memset(up,0,sizeof(up));
      |     ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include<algorithm>
  +++ |+#include <cstring>
    4 |
Language: C++

#include <iostream>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <complex>
#include <cstdio>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;

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

int m,I,J,p[10000][100],s[10000],P;

void destroy(int pI,int ppI){
	p[pI][ppI]=0;
	for(int i=ppI+1;i<s[pI];i++){
		p[P][0]=p[pI][i];
		s[P++]=1;
		p[pI][i]=0;
	}
	s[pI]=ppI;
}

int main(){
	while(cin>>m&&m){
		memset(p,0,sizeof(p));
		fill(s,s+10000,0);
		rep(i,m){p[i][0]=i+1;s[i]=1;}
		P=m;
		while(cin>>I>>J&&I){
			if(I==J)continue;
			int pI,ppI,pJ,ppJ;
			if(!J){
				rep(i,10000)rep(j,m){
					if(p[i][j]==I){pI=i;ppI=j;}
				}
				if(ppI){
					destroy(pI,ppI);
					p[P][0]=I;
					s[P++]=1;
				}
				continue;
			}
			rep(i,10000)rep(j,m){
				if(p[i][j]==I){pI=i;ppI=j;}
				if(p[i][j]==J){pJ=i;ppJ=j;}
			}
			if(pI==pJ){
				if(ppI>ppJ)continue;
				else{
					int pppJ=P+ppJ-ppI;
					destroy(pI,ppI);
					p[pppJ][1]=I;
					s[pppJ]++;
				}
			}
			else{
				destroy(pI,ppI);
				p[pJ][s[pJ]++]=I;
			}
		}
		sort(s,s+10000);
		rep(i,10000)if(s[i])cout<<s[i]<<(i<9999?"\n":"\nend\n");
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:17: error: 'memset' was not declared in this scope
   32 |                 memset(p,0,sizeof(p));
      |                 ^~~~~~
a.cc:12:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   11 | #include <stack>
  +++ |+#include <cstring>
   12 | #include <string>
Language: C++

#include <iostream>
#include <vector>
using namespace std;
typedef pair<int, int> P;

bool empty(vector<int> &vi){ return vi.empty(); }


int main(){
  int m;
  while(cin >> m && m){
    int I, J;
    vector<vector<int> > vvi;
    for(int i = 1; i <= m; i++){
      vector<int> vi;
      vi.push_back(i);
      vvi.push_back(vi);
    }
		   
    while(cin >> I >> J && (I || J)){
      if(I == J) continue;
      if(J == 0){
	bool ok = false;
	for(int i = 0; i < (int)vvi.size(); i++){
	  for(int j = 0; j < (int)vvi[i].size(); j++){
	    if(vvi[i][j] == I){
	      ok = true;
	      if(j != 0){
		if(j == ((int)vvi[i].size() - 1)){
		  vector<int> vi;
		  vi.push_back(I);
		  vvi[i].pop_back();
		  vvi.push_back(vi);
		  
		}else{
		  int c = vvi[i].size() - j;
		  for(int k = 0; k < c; k++){
		    vector<int> vi(1, vvi[i][vvi[i].size() - 1]);
		    vvi[i].pop_back();
		    vvi.push_back(vi);
		  }
		  
		}
		
	      }
	      break;
	    }
	  }
	  if(ok) break;
	}
      }else{
	P pi, pj;
	for(int i = 0; i < (int)vvi.size(); i++){
	  for(int j = 0; j < (int)vvi[i].size(); j++){
	    if(vvi[i][j] == I) pi = P(i, j);
	    if(vvi[i][j] == J) pj = P(i, j);
	  }
	}
	if(pi.first == pj.first) {
	  if(pi.second < pj.second){	

	    int c = vvi[pi.first].size() - pi.second - 1;
	    for(int i = 0; i < c; i++) {
	      vector<int> vi(1, vvi[pi.first][vvi[pi.first].size() - 1]);
	      vvi[pi.first].pop_back();
	      if(vi[0] == J) vi.push_back(I);
	      vvi.push_back(vi);
	    }
	    vvi[pi.first].pop_back();
	  }
	}else{
	  if(vvi[pi.first].size() - pi.second == 1){
	    vvi[pi.first].pop_back();
	    vvi[pj.first].push_back(I);
	  }else{
	    int c = vvi[pi.first].size() - pi.second;
	    for(int i = 0; i < c - 1; i++){
	      vector<int> vi(1, vvi[pi.first][vvi[pi.first].size() - 1]);
	      vvi.push_back(vi);
	      vvi[pi.first].pop_back();
	    }
	    vvi[pi.first].pop_back();
	    vvi[pj.first].push_back(I);
	  }
	  
	}
      }
    
      vvi.erase(remove_if(vvi.begin(), vvi.end(), empty), vvi.end());
    
    }
    vector<int> res;
    for(int i = 0; i < (int)vvi.size(); i++) res.push_back((int)vvi[i].size());
    sort(res.begin(),res.end());
    for(int i = 0; i < (int)res.size(); i++){
      cout << res[i]<< endl;
    }
    cout << "end" << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:89:17: error: 'remove_if' was not declared in this scope; did you mean 'remove'?
   89 |       vvi.erase(remove_if(vvi.begin(), vvi.end(), empty), vvi.end());
      |                 ^~~~~~~~~
      |                 remove
a.cc:94:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   94 |     sort(res.begin(),res.end());
      |     ^~~~
      |     short
Language: Java

package mastermind;

public class InfinityLoopTest {

	public static void main(String[] args) {
		//infinite loop test
		while(true) {}

	}

}



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

#include <iostream>
#include <string>
#include <cstdlib>
#include <bitset>
using namespace std;
typedef long long int lli;
const int MAX_H = 1000000;
int L, H;
lli nums[MAX_H];
int s_nums[MAX_H], hit[MAX_H], blow[MAX_H];
lli ans;
void print_bit(lli n){
  for(int i = 0; i < L; ++i){
    cout << static_cast<bitset<4> >(n&15) << ".";
    n >>= 4;
  }
  cout << endl;
}
lli conv_64(string s){
  lli ret = 0;
  for(int i = 0; i < L; ++i){
    ret <<= 4;
    ret += (lli)(s[i]-'0');
  }
  return ret;
}
string deco_64(lli n){
  string ret;
  for(int i = 0; i < L; ++i){
    ret += (char)((n&15)+'0');
    n >>= 4;
  }
  reverse(ret.begin(), ret.end());
  return ret;
}
int conv(string s){
  int ret = 0;
  for(int i = 0; i < L; ++i){
    ret += 1 << (s[i]-'0');
  }
  return ret;
}
int check_64(lli n, lli m){
  lli tmp = n ^ m;
  int ret = 0;
  for(int i = 0; i < L; ++i){
    if((15&tmp) == 0){
      ++ret;
    }
    tmp >>= 4;
  }
  return ret;
}
int check(int n, int m){
  int tmp = n & m;
  int ret = 0;
  while(tmp != 0){
    if((tmp & 1) == 1){
      ++ret;
    }
    tmp >>= 1;
  }
  return ret;
}
bool solve(lli n, int m){
  for(int i = 0; i < H; ++i){
    int h = check_64(n, nums[i]);
    int b = check(m, s_nums[i]) - h;
    if(hit[i] != h || blow[i] != b){
      return false;
    } 
  }
  return true;
}
int dfs(lli n, int used, int depth){
  if(depth == L){
    if(solve(n, used)){
      ans = n;
      return 1;
    }
    return 0;
  }
  int ret = 0;
  for(int i = 0; i < 10; ++i){
    if(((used >> i) & 1) == 1){
      continue;
    }
    ret += dfs((n<<4)+i, used|(1<<i), depth+1);
    if(ret >= 2){
      return ret;
    }
  }
  return ret;
}
int main(){
  while(true){
    cin >> L >> H;
    if(L == 0 && H == 0){
      break;
    }
    for(int i = 0; i < H; ++i){
      string tmp;
      cin >> tmp;
      nums[i] = conv_64(tmp);
      s_nums[i] = conv(tmp);      
      cin >> hit[i] >> blow[i];
    }
    int a = dfs(0L, 0, 0);
    if(a == 1){
      //print_bit(ans);
      cout << deco_64(ans) << endl;
    }
    else{
      cout << "NO" << endl;
    }
  }
  return 0;
}
//uncode

Compiler output:
a.cc: In function 'std::string deco_64(lli)':
a.cc:33:3: error: 'reverse' was not declared in this scope
   33 |   reverse(ret.begin(), ret.end());
      |   ^~~~~~~
Language: C++

#include<cstdio>
#include<algorithm>

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

using namespace std;

bool isvalid(int n,const char *s,const char *tr,int hit,int blow){
	rep(i,n) rep(j,n) if(s[i]==tr[j]) {
		if(i==j) hit--;
		else     blow--;
	}
	return hit==0 && blow==0;
}

int m,idx[3628800];
char s[3628800][11];
void gen(int i,int n,char *tmp,bool *used){
	if(i==n){
		strcpy(s[m],tmp);
		idx[m]=m++;
		return;
	}

	for(int c='0';c<='9';c++) if(!used[c]) {
		used[c]=true;
		tmp[i]=c;
		gen(i+1,n,tmp,used);
		used[c]=false;
	}
}

int main(){
	for(int n,nh;scanf("%d%d",&n,&nh),n;){
		m=0;
		char tmp[11]="";
		bool used[128]={};
		gen(0,n,tmp,used);

		// printf("m=%d\n",m);
		// rep(i,10) puts(s[i]);
		while(nh--){
			char tr[11];
			int hit,blow; scanf("%s%d%d",tr,&hit,&blow);

			rep(i,m) if(!isvalid(n,s[idx[i]],tr,hit,blow)) {
				swap(idx[i],idx[m-1]);
				i--;
				m--;
			}
		}

		printf("%s\n",m==1?s[idx[0]]:"NO");
	}

	return 0;
}

Compiler output:
a.cc: In function 'void gen(int, int, char*, bool*)':
a.cc:20:17: error: 'strcpy' was not declared in this scope
   20 |                 strcpy(s[m],tmp);
      |                 ^~~~~~
a.cc:3:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<algorithm>
  +++ |+#include <cstring>
    3 |