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

#include <iostream>
#include <set>
#include "procpn.hpp"

using namespace std;
using namespace procon;

int main(){
    int e;
    set<int> v;
    int d[MAX_V][MAX_V];
    while(cin >> e,e){
        fill((int*)d,(int*)d + MAX_V * MAX_V,INF);
        FOR(i,0,e){
            int f,t,p;
            cin >> f >> t >> p;
            d[f][t] = p;
            v.insert(f); v.insert(t);
        }
        FORI(i,v) d[*i][*i] = 0;

        warshall_floyed(MAX_V,d);
        int town = 0;
        int m = INF;
       FORI(i,v){
            int t = 0;
            FORI(j,v){
                t += d[*i][*j];
            }
            if(m < t) continue;
            m = t;
            town = *i;
        }
        cout << town << " " << m << endl;
    }
    return 0;
}

Compiler output:
a.cc:3:10: fatal error: procpn.hpp: No such file or directory
    3 | #include "procpn.hpp"
      |          ^~~~~~~~~~~~
compilation terminated.
Language: C++

#include <cstring>
#include <iostream>
#include <queue>
using namespace std;

int n, m; // 道の数，街の数
int edges[10][10];

int dijkstra(int from, int to) {
    bool visited[m];
    fill(visited, visited + m, false);
    priority_queue<pair<int, int>, vector<pair<int, int> >, greater<pair<int, int> > > que;
    que.push(make_pair(0, from));
    visited[0] = true;
    while (!que.empty()) {
        pair<int, int> current = que.top();
        que.pop();
        
        const int dist = current.first;
        const int pos = current.second;
        
        if (pos == to) {
            return dist;
        }
        
        for (int i = 0; i < m; i++) {
            if (!visited[i] && edges[pos][i] != 0x7f7f7f7f) {
                visited[i] = true;
                que.push(make_pair(dist + edges[pos][i], i));
            }
        }
    }
    return -1;
}

int main() {
    while (cin >> n, n) {
        memset(edges, 0x7f, sizeof(edges));
        
        for (int i = 0; i < n; i++) {
            int a, b, c;
            cin >> a >> b >> c;
            edges[a][b] = edges[b][a] = c;
            m = max(a, max(b, m));
        }
        m++;
        
        int res, res_time = 0x7fffffff;
        for (int i = 0; i < m; i++) {
            int total = 0;
            for (int j = 0; j < m; j++) {
                total += dijkstra(i, j);
            }
            if (total < res_time) {
                res_time = total;
                res = i;
            }
        }
        
        cout << res << ' ' << res_time << endl;
    }
    
    return 0;
}x

Compiler output:
a.cc:64:2: error: 'x' does not name a type
   64 | }x
      |  ^
Language: C++

#include <iostream>
#include <map>
using namespace std;
#define MAX(x,y) (x>y?x:y)
#define MIN(x,y) (x>y?y:x)
#define INF 1000000
typedef long long ll;
typedef map<ll,int> M;

ll cost[15][15];

int main()
{
	int n;
	ll sum;
	int max=0;
	M d;
	while(cin>>n,n){
		max=0;

		for(int i=0;i<15;i++){
			for(int j=0;j<15;j++){
				cost[i][j]=(i==j?0:INF);
			}
		}
		
		for(int i=0;i<n;++i){
			int a,b
			ll c;
			cin>>a>>b>>c;
			cost[a][b]=c;
			cost[b][a]=c;
			if(max<MAX(a,b))max=MAX(a,b);

		}
		
		for(int i=0;i<=max;i++){
			for(int j=0;j<=max;j++){
				for(int k=0;k<=max;k++){
					cost[i][j]=MIN(cost[i][j],cost[i][k]+cost[k][j]);
				}
			}
		}
		
		for(int i=0;i<=max;i++){
			sum=0;
			for(int j=0;j<=max;j++){
				sum+=cost[i][j];
			}
			d[sum]=i;
		}
		M::iterator it=d.begin();
		cout<<(*it).second<<" "<<(*it).first<<endl;
		d.clear();
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:25: error: expected initializer before 'll'
   29 |                         ll c;
      |                         ^~
a.cc:30:33: error: 'b' was not declared in this scope
   30 |                         cin>>a>>b>>c;
      |                                 ^
a.cc:30:36: error: 'c' was not declared in this scope
   30 |                         cin>>a>>b>>c;
      |                                    ^
Language: C++

#include<iostream>
#include<fstream>
#include<vector>
#include<algorithm>
#include<string>
#include<cstring>

using namespace std;

#define INF 100000000

int edges[20][20];
int dist[20][20];

int main(){

    cin.sync_with_stdio(false);

    while(1){

        int N;

        cin >> N;

        if(N == 0) break;

        memset(edges,0,sizeof(edges));

        int ids[20];
        int nids = 0;

        for(int i=0;i<N;++i){

            int x,y,c;

            cin >> x >> y >> c;

            int ix=-1;
            int iy=-1;

            for(int l=0;l<nids;++l){
                if(ids[l]==x) ix = l;
                if(ids[l]==y) iy = l;
            }

            if(ix<0){ ix = nids; ids[nids++]=x; }
            if(iy<0){ iy = nids; ids[nids++]=y; }

            edges[ix][iy] = edges[iy][ix] = c;

        }

        for(int i=0;i<nids;++i){
            for(int j=0;j<nids;++j){
                if(i==j)
                    dist[i][j] = 0;
                else if(edges[i][j]>0)
                    dist[i][j] = edges[i][j];
                else
                    dist[i][j] = INF;
            }
        }

        for(int k=0;k<nids;++k)
            for(int i=0;i<nids;++i)
                for(int j=0;j<nids;++j)
                    dist[i][j] = min(dist[i][j],dist[i][k]+dist[k][j]);

        int ans  = 0;
        int msum = INF;

        for(int i=0;i<nids;++i){

            int sum = 0;
            for(int j=0;j<nids;++j){
               if(dis[i][j]==INF)continue;
               sum += dist[i][j];
            }

            if(sum<=msum){

                if(sum==msum && ids[i]<ids[ans])
                    ans = i;
                else
                    ans = i;

                msum = sum;

            }

        }

        cout << ids[ans] << " " << msum << endl;

    }

    return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:76:19: error: 'dis' was not declared in this scope; did you mean 'ids'?
   76 |                if(dis[i][j]==INF)continue;
      |                   ^~~
      |                   ids
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 ALL(v) (v).begin(),(v).end()
#define fi first
#define se second

template<typename A, typename B> inline bool chmax(A &a, B b) { if (a<b) { a=b; return 1; } return 0; }
template<typename A, typename B> inline bool chmin(A &a, B b) { if (a>b) { a=b; return 1; } return 0; }

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<int, pll> pip;
const ll INF = 1ll<<29;
const ll MOD = 1000000007;
const double EPS  = 1e-9;

int dd[13][4] = {
	{2,-1,-1,-1},
	{2,5,-1,-1},
	{0,1,3,6},
	{2,7,-1,-1},
	{5,-1,-1,-1},
	{1,4,6,9},
	{2,5,7,10},
	{3,6,8,11},
	{7,-1,-1,-1},
	{5,10,-1,-1},
	{6,9,11,12},
	{7,10,-1,-1},
	{10,-1,-1,-1}
};

int main() {
	queue<string> que;
	map<string, int> d;
	
	que.push("abcdefghijkla");
	d[ans] = 0;
	
	while (!que.empty()) {
		string now = que.front(); que.pop();
		int cost = d[now];
		
		if (cost > 10) break;
		
		REP(i, 13) if (now[i] == 'a') {
			REP(j, 4) {
				if (dd[i][j] == -1) break;
				
				swap(now[i], now[dd[i][j]]);
				if (d.find(now) == d.end()) {
					d[now] = cost + 1;
					que.push(now);
			}
				swap(now[i], now[dd[i][j]]);
			}
		}
	}
	while (!que.empty()) que.pop();

	int p[13];
	while (cin >> p[0], ~p[0]) {
		FOR(i, 1, 13) cin >> p[i];
		string st = "";
		REP(i, 13) st += p[i] + 'a';
		
		map<string, int> d2;
		que.push(st);
		d2[st] = 0;
		
		int ans = INF;
		
		while (!que.empty()) {
			string now = que.front(); que.pop();
			int cost = d2[now];
			
			if (cost > 11) break;
			if (d.find(now) != d.end()) {
				ans = d[now] + d2[now];
				break;
			}
			
			REP(i, 13) if (now[i] == 'a') {
				REP(j, 4) {
					if (dd[i][j] == -1) break;
					
					swap(now[i], now[dd[i][j]]);
					if (d2.find(now) == d2.end()) {
						d2[now] = cost + 1;
						que.push(now);
				}
					swap(now[i], now[dd[i][j]]);
				}
			}
		}
		while (!que.empty()) que.pop();
		
		if (ans != INF) cout << ans << endl;
		else puts("NA");
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   43 |         d[ans] = 0;
      |           ^~~
      |           abs
Language: C++

#include<iostream>
#include<algorithm>

using namespace std;

#define N 5
#define REP(i, n) for ( int i = 0; i < (int)n; i++ )
#define LIMIT 20

static const int T[12][2] = {{-1, -1}, {1, 1}, {1, 2}, {1, 3}, {2, 0}, {2, 1},
			     {2, 2}, {2, 3}, {2, 4}, {3, 1}, {3, 2}, {3, 3}};
static const int g[N][N] = {{-1, -1, 0, -1, -1}, {-1, 1, 2, 3, -1},
			    {4, 5, 6, 7, 8}, {-1, 9, 10, 11, -1}, {-1, -1, 0, -1, -1}};

class Puzzle{
    public:
    int C[N][N], mdist; //manhatta distance
    Puzzle(){}

    bool swapAdj( int si, int sj, int ti, int tj ){
	if ( ti < 0 || tj < 0 || ti >= N || tj >= N ) return false;
	if ( C[ti][tj] <= 0 ) return false;
	swap(C[ti][tj], C[si][sj]);
	int tti = T[C[si][sj]][0];
	int ttj = T[C[si][sj]][1];
	mdist -= max(tti, ti)-min(tti, ti) + max(ttj, tj)-min(ttj, tj);
	mdist += max(tti, si)-min(tti, si) + max(ttj, sj)-min(ttj, sj);
	return true;
    }

    bool isGoal(){
	REP(i, N) REP(j, N) if ( g[i][j] != C[i][j] ) return false;
	return true;
    }

    int getMD(){ // get initial manhattan distance
	int sum = 0;
	int ti, tj;
	REP(i, 5) REP(j, 5){
	    if ( C[i][j] <= 0 ) continue;
	    ti = T[C[i][j]][0];
	    tj = T[C[i][j]][1];
	    sum += (max(ti, i)-min(ti, i) + max(tj, j) - min(tj, j));
	}
	return sum;
    }
};

int limit;

bool dfs( int depth, Puzzle P ){
    if ( P.isGoal() ) return true;
    if ( depth + P.getMD() > limit ) return false;

    static const int di[4] = {0, -1, 0, 1};
    static const int dj[4] = {1, 0, -1, 0};

    REP(i, N) REP(j, N){
	if ( P.C[i][j] != 0 ) continue;
	REP(r, 4){
	    Puzzle v = P;
	    if ( !v.swapAdj(i, j, i+di[r], j+dj[r]) ) continue;
	    if ( dfs( depth + 1, v ) ) return true;
	}
    }

    return false;
}

int idp(Puzzle source){
    for ( limit = 0; limit <= LIMIT; limit++ ){
	source.mdist = source.getMD();
	if ( dfs(0, source) ) return limit;
    }
    return INT_MAX;
}

int main(){
    Puzzle P;
    int top;

    while(1){
	cin >> top;
	if ( top == -1 ) break;
	REP(j, N) P.C[0][j] = -1;
	P.C[0][2] = top;
	for(int i = 1; i < N; i++) REP(j, N){
	    if ( (i == 1 || i == 3) && (j == 0 || j == 4 ) ) P.C[i][j] = -1;
	    else if ( i == 4 && j != 2 ) P.C[i][j] = -1;
	    else cin >> P.C[i][j];
	}

	int cost = idp(P);
	if ( cost == INT_MAX ) cout << "NA" << endl;
	else cout << cost << endl;	
    }

    return 0;
}

Compiler output:
a.cc: In function 'int idp(Puzzle)':
a.cc:75:12: error: 'INT_MAX' was not declared in this scope
   75 |     return INT_MAX;
      |            ^~~~~~~
a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    2 | #include<algorithm>
  +++ |+#include <climits>
    3 | 
a.cc: In function 'int main()':
a.cc:94:22: error: 'INT_MAX' was not declared in this scope
   94 |         if ( cost == INT_MAX ) cout << "NA" << endl;
      |                      ^~~~~~~
a.cc:94:22: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
Language: C++

#include <iostream>
#include <iomanip>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <cmath>
using namespace std;

#define NONE -1

#include <windows.h>
void print( const vector < vector <int> > &F )
{
	for ( int i = 0; i < 5; i++ )
	{
		for ( int j = 0; j < 5; j++ )
		{
			cout << setw(3) << F[i][j];
		}
		cout << endl;
	}
}

// »ÝÌóÔ
vector < vector <int> > F( 5, vector <int>(5,NONE) );
// S[
vector < vector <int> > GOAL( 5, vector <int>(5,NONE) );
// KâÏÝ
set < vector < vector <int> > > V;
// ó«Ìê
int empty_x[2];
int empty_y[2];
int now;

int getMD();
bool search( int );

bool search( int depth )
{
	if ( F == GOAL )
		return true;
	if ( now + getMD() > depth )
		return false;

	now++;
	for ( int e = 0; e < 2; e++ ) for ( int i = -1; i < 2; i++ ) for ( int j = -1; j < 2; j++ )
	{
		if ( i+j == 1 || i+j == -1 )
		{
			int ox = empty_x[e];
			int oy = empty_y[e];
			int tx = empty_x[e] + i;
			int ty = empty_y[e] + j;

			if ( ( tx >= 0 && tx <= 4 ) && ( ty >= 0 && ty <= 4 ) )
			{
				if ( F[ty][tx] != 0 && F[ty][tx] != NONE )
				{
					// ®©·
					swap( F[oy][ox], F[ty][tx] );

					// ¢JÌnÅ éÈçÎ
					if ( V.find( F ) == V.end() )
					{
						if ( search( depth ) )
							return true;
					}

					// ß·
					swap( F[oy][ox], F[ty][tx] );
				}
			}
		}
	}
	now--;

}

int getMD()
{
	int md = 0;
	for ( int i = 0; i < 5; i++ ) for ( int j = 0; j < 5; j++ )
	{
		if ( F[i][j] != GOAL[i][j] )
		{
			// T·
			bool found = false;
			for ( int k = 0; k < 5; k++ )
			{
				for ( int m = 0; m < 5; m++ )
				{
					//  Á½
					if ( F[i][j] == GOAL[k][m] )
					{
						md += abs(k-i) + abs(m-j);
						found = true;
						break;
					}
				}
				if ( found ) break;
			}
		}
	}
	return md;
}

int main( void )
{
	while ( 1 )
	{
		// S[ðìé
		GOAL[0][2] = 0;
		for ( int i = 0; i < 3; i++ )
			GOAL[1][1+i] = i+1;
		for ( int i = 0; i < 5; i++ )
			GOAL[2][i] = 4 + i;
		for ( int i = 0; i < 3; i++ )
			GOAL[3][1+i] = 9 + i;
		GOAL[4][2] = 0;

		// üÍ
		cin >> F[0][2];
		if ( F[0][2] == -1 )
			break;
		for ( int i = 0; i < 3; i++ )
			cin >> F[1][1+i];
		for ( int i = 0; i < 5; i++ )
			cin >> F[2][i];
		for ( int i = 0; i < 3; i++ )
			cin >> F[3][1+i];
		cin >> F[4][2];

		// óðT·
		int empty_count = 0;
		for ( int i = 0; i < 5; i++ )
		{
			for ( int j = 0; j < 5; j++ )
			{
				if ( F[i][j] == 0 )
				{
					empty_x[empty_count] = j;
					empty_y[empty_count] = i;
					empty_count++;
				}
			}
		}

		// ½[»[³DæTõ
		V.insert( F );
		now = 0;
		bool goal_flag = false;
		for ( int i = 0; i < 20; i++ )
		{
			if ( search( i ) )
			{
				goal_flag = true;
				break;
			}
		}

		if ( goal_flag )
			cout << now << endl;
		else
			cout << "NA" << endl;

	}
	return 0;
}

Compiler output:
a.cc:12:10: fatal error: windows.h: No such file or directory
   12 | #include <windows.h>
      |          ^~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream> 
#include<algorithm> 

using namespace std;

#define N 5
#define REP(i, n) for ( int i = 0; i < (int)n; i++ )
#define LIMIT 20

// S[ÌÇ±É éÌ©
static const int T[12][2] = {
	{-1, -1},
	{1, 1},
	{1, 2},
	{1, 3},
	{2, 0},
	{2, 1},
	{2, 2},
	{2, 3},
	{2, 4},
	{3, 1},
	{3, 2},
	{3, 3}
};

// S[Ìzu
static const int g[N][N] = {
	{-1, -1,  0, -1, -1},
	{-1,  1,  2,  3, -1},
	{ 4,  5,  6,  7,  8},
	{-1,  9, 10, 11, -1},
	{-1, -1,  0, -1, -1}
};

class Puzzle
{
public:
	int C[N][N], mdist; //manhatta distance
	Puzzle(){}
	
	bool swapAdj( int si, int sj, int ti, int tj )
	{
		if ( ti < 0 || tj < 0 || ti >= N || tj >= N )
			return false;
		if ( C[ti][tj] <= 0 )
			return false;

		swap( C[ti][tj], C[si][sj] );

		int tti = T[C[si][sj]][0];
		int ttj = T[C[si][sj]][1];
		mdist -= max(tti, ti)-min(tti, ti) + max(ttj, tj)-min(ttj, tj);
		mdist += max(tti, si)-min(tti, si) + max(ttj, sj)-min(ttj, sj);
		return true;
	}
	
	bool isGoal()
	{
		REP(i, N) REP(j, N)
			if ( g[i][j] != C[i][j] )
				return false;
		return true;
	}
	
	// get initial manhattan distance
	int getMD()
	{
		int sum = 0;
		int ti, tj;
		REP(i, 5) REP(j, 5)
		{
			if ( C[i][j] <= 0 )
				continue;
			ti = T[C[i][j]][0];
			tj = T[C[i][j]][1];
			sum += (max(ti, i)-min(ti, i) + max(tj, j) - min(tj, j));
		}
		return sum;
	}
};
 
int limit;
 
bool dfs( int depth, Puzzle P )
{
	if ( P.isGoal() )
		return true;
	if ( depth + P.getMD() > limit )
		return false;
	
	static const int di[4] = {0, -1, 0, 1};
	static const int dj[4] = {1, 0, -1, 0};
	
	REP(i, N) REP(j, N)
	{
		if ( P.C[i][j] != 0 )
			continue;

		REP(r, 4)
		{
			Puzzle v = P;
			if ( !v.swapAdj(i, j, i+di[r], j+dj[r]) )
				continue;
			if ( dfs( depth + 1, v ) )
				return true;
		}
	}
	
	return false;
}

int idp(Puzzle source)
{
	for ( limit = 0; limit <= LIMIT; limit++ )
	{
		source.mdist = source.getMD();
		if ( dfs(0, source) )
			return limit;
	}
	return INT_MAX;
}

int main()
{
	Puzzle P;
	int top;
	
	while(1)
	{
		cin >> top;
		if ( top == -1 ) break;
		REP(j, N) P.C[0][j] = -1;
		P.C[0][2] = top;
		for(int i = 1; i < N; i++) REP(j, N)
		{
			if ( (i == 1 || i == 3) && (j == 0 || j == 4 ) )
				P.C[i][j] = -1;
			else if ( i == 4 && j != 2 )
				P.C[i][j] = -1;
			else
				cin >> P.C[i][j];
		}
	
		int cost = idp(P);
		
		if ( cost == INT_MAX )
			cout << "NA" << endl;
		else
			cout << cost << endl;	
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int idp(Puzzle)':
a.cc:120:16: error: 'INT_MAX' was not declared in this scope
  120 |         return INT_MAX;
      |                ^~~~~~~
a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    2 | #include<algorithm>
  +++ |+#include <climits>
    3 | 
a.cc: In function 'int main()':
a.cc:146:30: error: 'INT_MAX' was not declared in this scope
  146 |                 if ( cost == INT_MAX )
      |                              ^~~~~~~
a.cc:146:30: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
Language: C++

#include<iostream>
#include<map>
#include<deque>
using namespace std;
struct board{
	char s[14];
	int z1,z2;
	bool operator<(const board& rhs)const{return strcmp(s,rhs.s)<0;}
};
int main(){
	int d[13][5]={
		{2,-1},			//0
		{2,5,-1},		//1
		{0,1,3,6,-1},	//2
		{2,7,-1},		//3
		{5,-1},			//4
		{1,4,6,9,-1},	//5
		{2,5,7,10,-1},	//6
		{3,6,8,11,-1},	//7
		{7,-1},			//8
		{5,10,-1},		//9
		{6,9,11,12,-1},	//10
		{7,10,-1},		//11
		{10,-1},		//12
	};
	board goal;
	strcpy(goal.s,"0123456789AB0");
	for(;;){
		typedef map<board,int>SM;
		SM stepmap;
		deque<board> que;
		board b0;
		b0.z1=b0.z2=-1;
		int dist=0;
		for(int i=0;i<13;i++){
			int v;
			cin>>v;
			if(v==-1)
				return 0;
			b0.s[i]="0123456789AB"[v];
			if(v==0){
				if(b0.z1==-1)
					b0.z1=i;
				else
					b0.z2=i;
			}else{
				static int x[]={2,1,2,3,0,1,2,3,4,1,2,3,2};
				static int y[]={0,1,1,1,2,2,2,2,2,3,3,3,4};
				dist+=abs(x[v]-x[i])+abs(y[v]-y[i]);
			}
		}
		b0.s[13]=0;
		que.push_back(b0);
		stepmap[b0]=1;
		if(dist<=20){
			while(!que.empty()){
				board b=que.front();
				if(strcmp(b.s,goal.s)==0){
					break;
				}
				que.pop_front();
				int step=stepmap[b];
				if(step<=20){
					for(int i=0;d[b.z1][i]!=-1;i++){
						board bn=b;
						bn.z1=d[b.z1][i];
						if(bn.z1!=bn.z2){
							swap(bn.s[b.z1],bn.s[bn.z1]);
							int&ns=stepmap[bn];
							if(!ns){
								ns=step+1;
								que.push_back(bn);
							}
						}
					}
					for(int i=0;d[b.z2][i]!=-1;i++){
						board bn=b;
						bn.z2=d[b.z2][i];
						if(bn.z2!=bn.z1){
							swap(bn.s[b.z2],bn.s[bn.z2]);
							int&ns=stepmap[bn];
							if(!ns){
								ns=step+1;
								que.push_back(bn);
							}
						}
					}
				}
			}
		}
		if(stepmap[goal]==0)
			cout<<"NA "<<endl;
		else
			cout<<stepmap[goal]-1<<endl;
	}
}

Compiler output:
a.cc: In member function 'bool board::operator<(const board&) const':
a.cc:8:54: error: 'strcmp' was not declared in this scope
    8 |         bool operator<(const board& rhs)const{return strcmp(s,rhs.s)<0;}
      |                                                      ^~~~~~
a.cc:4:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include<deque>
  +++ |+#include <cstring>
    4 | using namespace std;
a.cc: In function 'int main()':
a.cc:27:9: error: 'strcpy' was not declared in this scope
   27 |         strcpy(goal.s,"0123456789AB0");
      |         ^~~~~~
a.cc:27:9: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:58:36: error: 'strcmp' was not declared in this scope
   58 |                                 if(strcmp(b.s,goal.s)==0){
      |                                    ^~~~~~
a.cc:58:36: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include <stdlib.h>
using namespace std;

int p[5][5],x[11]={1,2,3,0,1,2,3,4,1,2,3},y[11]={1,1,1,2,2,2,2,2,3,3,3},s,sx[2],sy[2]
    ,mx[4]={1,0,-1,0},my[4]={0,-1,0,1},lt;
int search(int t,int mx2,int my2,int mc) {
	int a,i,j,x2,y2,s2;
	if (s==0) { if (lt>t) lt=t; return 1;}
	  for (i=0;i<2;i++) for (j=0;j<4;j++) {
	  x2=sx[i]+mx[j]; y2=sy[i]+my[j];
	  if (x2<0 || x2>4 || y2<0 || y2>4) continue;
	  if (p[y2][x2]<1 || ( mc==i  && mx2==-mx[j] && my2==-my[j])) continue;
	  s2=abs(x2-x[p[y2][x2]-1])+abs(y2-y[p[y2][x2]-1])-abs(sx[i]-x[p[y2][x2]-1])-abs(sy[i]-y[p[y2][x2]-1]);
	  if (s+s2>lt-t) continue;
	  p[sy[i]][sx[i]]=p[y2][x2]; p[y2][x2]=0;  s+=s2; 
	  sx[i]=x2; sy[i]=y2;
	  a=search(t+1,mx[j],my[j],i);
	  sx[i]=x2-mx[j]; sy[i]=y2-my[j];
	  p[y2][x2]=p[sy[i]][sx[i]]; p[sy[i]][sx[i]]=0; s-=s2;
	  if (a==1) return 0;
  }
  return 0;
}

int main() {
  int i,j,k;
  for (i=0;i<5;i++) for (j=0;j<5;j++) p[i][j]=-1;
  while (cin >> p[0][2] && p[0][2]!=-1) {
	  cin >> p[1][1] >> p[1][2] >> p[1][3];
	  cin >> p[2][0] >> p[2][1] >> p[2][2] >> p[2][3] >> p[2][4];
	  cin >> p[3][1] >> p[3][2] >> p[3][3];
	  cin >> p[4][2]; k=0; s=0;
	  for (i=0;i<5;i++) for (j=0;j<5;j++) {
		  if (p[i][j]==0) { sx[k++]=j; sy[k++]=i;}
		  if (p[i][j]>0) s+=abs(j-x[p[i][j]-1])+abs(i-y[p[i][j]-1]);
		   }
	  lt=21;	   
	  search(0,0,0,0);
	  if (lt==21) cout << "NA" << endl; else cout << lt << endl;
  } 
 return 0;
}	

Compiler output:
a.cc: In function 'int main()':
a.cc:28:10: error: 'cin' was not declared in this scope
   28 |   while (cin >> p[0][2] && p[0][2]!=-1) {
      |          ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <stdlib.h>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:39:23: error: 'cout' was not declared in this scope
   39 |           if (lt==21) cout << "NA" << endl; else cout << lt << endl;
      |                       ^~~~
a.cc:39:23: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:39:39: error: 'endl' was not declared in this scope
   39 |           if (lt==21) cout << "NA" << endl; else cout << lt << endl;
      |                                       ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <stdlib.h>
  +++ |+#include <ostream>
    2 | using namespace std;
a.cc:39:50: error: 'cout' was not declared in this scope
   39 |           if (lt==21) cout << "NA" << endl; else cout << lt << endl;
      |                                                  ^~~~
a.cc:39:50: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:39:64: error: 'endl' was not declared in this scope
   39 |           if (lt==21) cout << "NA" << endl; else cout << lt << endl;
      |                                                                ^~~~
a.cc:39:64: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: Java

import java.util.*;
import java.math.BigDecimal;

public class AOJ_0191{
    void run(){
        Scanner sc = new Scanner(System.in);
        while(true){
            int n = sc.nextInt();
            int m = sc.nextInt();
            if(n == 0 && m == 0){
                break;
            }
            double[][] g = new double[n][n];
            for(int i = 0; i < n; i++){
                for(int ii = 0; ii < n; ii++){
                    g[i][ii] = sc.nextDouble();
                }
            }

            double[][] dp = new double[m][n];
            Arrays.fill(dp[0], 1.);
            for(int i = 1; i < m; i++){
                for(int cur = 0; cur < n; cur++){
                    for(int pre = 0; pre < n; pre++){
                        dp[i][cur] = Math.max(dp[i][cur], dp[i-1][pre] * g[cur][pre]);
                    }
                }
            }
            /*
            for(double[] d: dp){
                System.out.println(Arrays.toString(d));
            }
            */
            double max = 0;
            for(double d: dp[m-1]){
                    max = Math.max(max, d);
            }
            System.out.println(new BigDecimal(max).setScale(2, BigDecimal.ROUND_HALF_UP));

        }
    }

    public static void main(String[] args){
        new AOJ_0191().run();
    }
}

Compiler output:
Main.java:4: error: class AOJ_0191 is public, should be declared in a file named AOJ_0191.java
public class AOJ_0191{
       ^
Note: Main.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
Language: C

#include<stdio.h>

double t[100][100];
double dp[100][100];

double ans(int num,int id,int n){
  int i;
  double tmp,t=0;

  if(num==0) return 1;
  if(dp[num][id]!=-1) return dp[num][id];

  for(i=0;i<n;i++){
    tmp=t[id][i] * ans(num-1,i,n);
    if(t<tmp) t=tmp;
  }

  return dp[num][id]=t;
} 

int main(){
  int m,n;
  int i,j;
  double tmp,max;

  while(scanf("%d%d",&n,&m),n!=0||m!=0){
    for(i=0;i<100;i++)
      for(j=0;j<100;j++)
	dp[i][j] = -1;

    for(i=0;i<n;i++)
      for(j=0;j<m;j++)
	scanf("%lf",&t[i][j]);

    max=0;
    for(i=0;i<n;i++){
      tmp=ans(m-1,i,n);
      if(max<tmp) max=tmp;
    }
    printf("%.2lf\n",max);
  }

  return 0;
}

Compiler output:
main.c: In function 'ans':
main.c:14:10: error: subscripted value is neither array nor pointer nor vector
   14 |     tmp=t[id][i] * ans(num-1,i,n);
      |          ^
Language: C

#include<stdio.h>
#define Double double
#define Int int
#define For for
#define Scanf scanf
#define If if
#define Printf printf
#define Roop(i,n) for(i=0;i<n;i++)
#define Roop2(i,n) for(i=1;i<=n;i++)
#define Roop3(i,n) for(i=2;i<=n;i++)

int main(){
 Int i,j,k,n,m;
 Double max=0.0;
 scanf("%d%d",&n,&m);
Roop(i,n)
 Roop(j,n)
  Scanf("%lf",&x[i][j]);

 Roop2(i,n)
  Roop(j,n)
   dp[i][j]=(double)(i==0);

 Roop3(i,m)
  Roop(j,n)
   Roop(k,n)
    If(dp[i][j]<dp[i-1][k]*x[k][j])
     dp[i][j]=dp[i-1][k]*x[k][j];

 Roop(i,n)if(max<dp[m][i])max=dp[m][i];

 Printf("%.2f\n",max);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:16: error: 'x' undeclared (first use in this function)
   18 |   Scanf("%lf",&x[i][j]);
      |                ^
main.c:18:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:22:4: error: 'dp' undeclared (first use in this function)
   22 |    dp[i][j]=(double)(i==0);
      |    ^~
Language: C

#include <cstdio>
#include <algorithm>
using namespace std;
int main()
{
	int n, m;
	while(scanf("%d %d\n", &n, &m), n || m){
		long double g[n][n];
		/* dp[a][b]??????a?????????b?????\?????????????????????a?????§????????????????????§??? */
		long double dp[m][n];
		for(int i = 0; i < n; i++){
			for(int j = 0; j < n; j++){
				scanf("%Lf", &g[i][j]);
			}
		}
		for(int i = 0; i < m; i++){
			for(int j = 0; j < n; j++){
				dp[i][j] = 0;
			}
		}
		for(int i = 0; i < n; i++) dp[0][i] = 1;
		
		for(int i = 1; i < m; i++){
			for(int j = 0; j < n; j++){
				for(int k = 0; k < n; k++){
					dp[i][j] = max(dp[i][j], dp[i - 1][k] * g[k][j]);
				}
			}
		}
		long double res = 0;
		for(int i = 0; i < n; i++){
			res = max(res, dp[m - 1][i]);
		}
		printf("%.2Lf\n", res);
	}
	
	return 0;
}

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

3 3          
1.3 3.0 0.5 
2.4 2.1 1.0
3.0 0.8 1.2
2 2
1.0 1.0
1.0 1.0
0 0

Compiler output:
main.c:1:1: error: expected identifier or '(' before numeric constant
    1 | 3 3
      | ^
Language: C++

import java.util.Scanner;
import java.math.BigDecimal;
public class Main {
	void doIt() {
		Scanner stdIn = new Scanner(System.in);
		while(true) {
			int n = stdIn.nextInt();//肥料の種類
			int m = stdIn.nextInt();//肥料を与える回数
			if(n + m == 0) break;

			double[][] table = new double[n][n];
			for(int r = 0; r < n; r++) {
				for(int c = 0; c < n; c++) {
					table[r][c] = stdIn.nextDouble();
				}
			}
			double[][] dp = new double[m][n];
			for(int r = 0; r < dp[0].length; r++) {
				dp[0][r] = 1;
			}
			for(int k = 1; k < m; k++) {
				for(int r = 0; r < n; r++) {
					for(int c = 0; c < m; c++) {
						dp[k][c] = Math.max(dp[k][c], dp[k - 1][r] * table[r][c]);
					}
				}
			}
			double ans = -1;
			for(int r = 0; r < dp[dp.length - 1].length; r++) {
				ans = Math.max(ans, dp[dp.length - 1][r]);
			}
			BigDecimal answer = new BigDecimal(String.valueOf(ans));
			ans = answer.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
			System.out.printf("%1.2f\n", ans);
		}

	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		new Main().doIt();
	}

}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.math.BigDecimal;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

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

double memo [101][102];
double mp[101][101];
double ans;
int n,m;
int cnt;

void saiki(double seki,double pseki,int mae,int kai) {
  //  cout <<"seki="<<seki<<" mae="<<mae<<" kai="<<kai<<endl;
  cnt++;
  
  if(kai == m && ans < seki) ans = seki;
  if(kai == m && mae != -1) memo[kai][mae] = 1;
  
  if(kai < m) {
    for(int i=1;i<=n;i++) {
      if(memo[kai+1][i] == -1) {
	saiki(seki*mp[mae][i],seki,i,kai+1);
	if(memo[kai][mae] < memo[kai+1][i]*mp[mae][i]) memo[kai][mae] = memo[kai+1][i]*mp[mae][i];
      }
      else {
	if(memo[kai][mae] < memo[kai+1][i]*mp[mae][i])memo[kai][mae] = memo[kai+1][i]*mp[mae][i];
	saiki(memo[kai][mae]*seki,-1,-1,m);
      }
    }
  }
}

int main(){
  
  while(1){
    cin >> n>> m;
    if(n == 0 && m == 0) break;
    
    for(int i=0;i<=n;i++)
      for(int j=0;j<=n;j++)
	if(i == 0 || j == 0) mp[i][j] = 1;
	else cin >> mp[i][j];

    
    for(int i=0;i<=m;i++)
      for(int j=0;j<=n;j++)
	memo[i][j] = -1;

    ans = 0;
    
    int ans2=0;
    for(int i=1;i<=n;i++) {
      saiki(1,1,i,1);
      for(int j=0;j<=n;j++){
	if(ans2 < memo[1][i]) ans2 = memo[1][i];
	memo[1][i] = memo[2][i]= -1;
      }
     ?\?\ for(int j=0;j<=m;j++)for(int k=0;k<=n;k++)memo[j][k] = -1;
    } 
    

    
    //    cout << ans2 << endl;
    printf("%.2f\n",ans);
    //cout << cnt << endl;
  }

  return 0;
}

Compiler output:
a.cc:57:7: error: stray '\' in program
   57 |      ?\?\ for(int j=0;j<=m;j++)for(int k=0;k<=n;k++)memo[j][k] = -1;
      |       ^
a.cc:57:9: error: stray '\' in program
   57 |      ?\?\ for(int j=0;j<=m;j++)for(int k=0;k<=n;k++)memo[j][k] = -1;
      |         ^
a.cc: In function 'int main()':
a.cc:57:6: error: expected primary-expression before '?' token
   57 |      ?\?\ for(int j=0;j<=m;j++)for(int k=0;k<=n;k++)memo[j][k] = -1;
      |      ^
a.cc:57:8: error: expected primary-expression before '?' token
   57 |      ?\?\ for(int j=0;j<=m;j++)for(int k=0;k<=n;k++)memo[j][k] = -1;
      |        ^
a.cc:57:11: error: expected primary-expression before 'for'
   57 |      ?\?\ for(int j=0;j<=m;j++)for(int k=0;k<=n;k++)memo[j][k] = -1;
      |           ^~~
a.cc:57:9: error: expected ':' before 'for'
   57 |      ?\?\ for(int j=0;j<=m;j++)for(int k=0;k<=n;k++)memo[j][k] = -1;
      |         ^ ~~~
      |         :
a.cc:57:11: error: expected primary-expression before 'for'
   57 |      ?\?\ for(int j=0;j<=m;j++)for(int k=0;k<=n;k++)memo[j][k] = -1;
      |           ^~~
a.cc:57:9: error: expected ':' before 'for'
   57 |      ?\?\ for(int j=0;j<=m;j++)for(int k=0;k<=n;k++)memo[j][k] = -1;
      |         ^ ~~~
      |         :
a.cc:57:11: error: expected primary-expression before 'for'
   57 |      ?\?\ for(int j=0;j<=m;j++)for(int k=0;k<=n;k++)memo[j][k] = -1;
      |           ^~~
a.cc:57:23: error: 'j' was not declared in this scope
   57 |      ?\?\ for(int j=0;j<=m;j++)for(int k=0;k<=n;k++)memo[j][k] = -1;
      |                       ^
a.cc:57:44: error: 'k' was not declared in this scope
   57 |      ?\?\ for(int j=0;j<=m;j++)for(int k=0;k<=n;k++)memo[j][k] = -1;
      |                                            ^
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define it ::iterator
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double ESP=1e-10;
using namespace std;
int main(){
  int n,m;
  while(cin>>n>>m,n+m){
    vector<vector<double> > d(n,vector<double>(n));
    vector<double> now(n,1),past(n,1);
  
    rep(i,n)rep(j,n)scanf("%lf",&d[i][j]);
    rep(times,m-1){
      rep(i,n){
	now[j] = 0;
	rep(j,n){
	  // i is past , j is now
	  now[j] = max(now[j],past[i] * d[i][j]);
	}
      }
      //      rep(i,now.size())cout<<now[i]<<" ";cout<<endl;
      past = now;
    }
    double ret = -1;
    rep(i,now.size())ret=max(ret,now[i]);
    printf("%.2lf\n",ret);
  }
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:13: error: 'j' was not declared in this scope
   28 |         now[j] = 0;
      |             ^
Language: C++

#include <iostream>
#include<iomanip>
#include<algorithm>
#define shosu(x) fixed<<setprecision(x)
using namespace std;

int n,m;
double ef[105][105];

double func(){
	double ans=0,dp[105][105]={0};
	for(int i=0;i<m;i++){
		dp[0][i]=1;
	}
	for(int i=1;i<n;i++){
		for(int j=0;j<m;j++){
			int tmp=0;
			for(int k=0;k<m;k++){
				tmp=max(tmp,dp[i-1][k]*ef[k][j]);
			}
			dp[i][j]=tmp;
		}
	}
	for(int i=0;i<m;i++){
		ans=max(ans,dp[n-1][i]);
	}
	return ans;
}

int main(){
	cout<<shosu(2);
	while(1){
		cin>>n>>m;
		if(n==0&&m==0) break;
		for(int i=0;i<n;i++){
			for(int j=0;j<n;j++){
				cin>>ef[i][j];
			}
		}
		cout<<func()<<endl;
	}
}

Compiler output:
a.cc: In function 'double func()':
a.cc:19:40: error: no matching function for call to 'max(int&, double)'
   19 |                                 tmp=max(tmp,dp[i-1][k]*ef[k][j]);
      |                                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:19:40: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'double')
   19 |                                 tmp=max(tmp,dp[i-1][k]*ef[k][j]);
      |                                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:19:40: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   19 |                                 tmp=max(tmp,dp[i-1][k]*ef[k][j]);
      |                                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

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

double c[100][100];
double dp[100][100];//i??\??????j???????????¬
signed main() {
	int a, b;
	while(scanf("%d%d", &a, &b),a|b) {
		for (int d = 0; d < a; d++) {
			for (int e = 0; e < a; e++) {
				scanf("%lf", &c[d][e]);
			}
		}
		memset(dp, 0, sizeof(dp));
		for (int d = 0; d < a; d++)dp[0][d] = 1;
		for (int d = 1; d < b; d++) {
			for (int e = 0; e < a; e++) {//????????\
				for (int f = 0; f < a; f++) {//????????\
					dp[d][e] = max(dp[d][e], dp[d - 1][f] * c[f][e]);
				}
			}
		}
		double MAX = 0;
		for (int d = 0; d < a; d++) {
			MAX = max(MAX, dp[b - 1][d]);
		}
		printf("%.10lf\n", MAX);
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: 'memset' was not declared in this scope
   16 |                 memset(dp, 0, sizeof(dp));
      |                 ^~~~~~
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 | using namespace std;
a.cc: At global scope:
a.cc:31:1: error: expected declaration before '}' token
   31 | }
      | ^
Language: C++

#include<iostream>
#include<cmath>
#include<vector>

using namespace std;

const double eps = 1.0e-10;
double eq(double a, double b){ //a==b
  return abs(b-a)<eps;
}
double gt(double a, double b){ //a>b
  return !eq(a,b) && a > b;
}

int main(){
  while(true){
    int n,m;
    double answer = -1;
    cin >> n >> m;
    if( n == 0 && m == 0 ) break;
    double table[n][n];
    for(int i = 0; i < n; ++i){
      for(int j = 0; j < n; ++j){
	cin >> table[i][j];
      }
    }
    double dp[n][m];
    for(int i = 0; i < n; ++i){
      dp[i][0] = 1.0;
    }
    for(int i = 1; i < m; ++i){
      double maximum = -1;
      for(int j = 0; j < n; ++j){
	for(int k = 0; k < n; ++k){
	  double t = table[k][j] * dp[k][i-1];
	  if( gt(t,maximum) ){
	    t=maximum;
	  }
	}
      }
      dp[j][i] = t;
    }
    
    for(int i = 0; i < n; ++i){
      if( gt( dp[i][m-1], answer ) )
	answer = greedy[i];
    }
    printf("%.2lf\n",answer);

  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:10: error: 'j' was not declared in this scope
   41 |       dp[j][i] = t;
      |          ^
a.cc:41:18: error: 't' was not declared in this scope
   41 |       dp[j][i] = t;
      |                  ^
a.cc:46:18: error: 'greedy' was not declared in this scope
   46 |         answer = greedy[i];
      |                  ^~~~~~
Language: C++

#include <iostream>

using namespace std;

int n, m;
double map[100][100], Max;

void search( int prev, double point, int count )
{
	if(count == m) {
		if(Max < point) {
			Max = point;
		}
		return;
	}
	for(int i=0; i < n; ++i)
		serch(i, point*map[prev][i], count + 1);
}

int main( void )
{
	while(cin >> n >> m, n | m) {
		Max = 0;
		for(int i=0; i < n; ++i)
			for(int j=0; j < n; ++j) {
				cin >> map[i][j];
			}
		for(int i=0; i < n; ++i)
			search(i, 1.0, 1);
		printf("%.2f\n", Max);
	}
	return 0;
}

Compiler output:
a.cc: In function 'void search(int, double, int)':
a.cc:17:17: error: 'serch' was not declared in this scope; did you mean 'search'?
   17 |                 serch(i, point*map[prev][i], count + 1);
      |                 ^~~~~
      |                 search
Language: C++

#include <iostream>

using namespace std;

int n, m;
double map[100][100], Max;

void search( int prev, double point, int count )
{
	if(count == m) {
		if(Max < point) {
			Max = point;
		}
		return;
	}
	for(int i=0; i < n; ++i)
		serach(i, point*map[prev][i], count + 1);
}

int main( void )
{
	while(cin >> n >> m, n | m) {
		Max = 0;
		for(int i=0; i < n; ++i)
			for(int j=0; j < n; ++j) {
				cin >> map[i][j];
			}
		for(int i=0; i < n; ++i)
			search(i, 1.0, 1);
		printf("%.2f\n", Max);
	}
	return 0;
}

Compiler output:
a.cc: In function 'void search(int, double, int)':
a.cc:17:17: error: 'serach' was not declared in this scope; did you mean 'search'?
   17 |                 serach(i, point*map[prev][i], count + 1);
      |                 ^~~~~~
      |                 search
Language: C++

#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <map>
#include <sstream>
#include <queue>
#include <cstdlib>
#include <algorithm>
#include <iterator>
#include <stack>
#include <list>
using namespace std;
#define INF 100000000
typedef long long int lli;
typedef pair<int,int> P;

double g[101][101];
double dp[101][101];

int main(){
	int n,m;
	while(cin>>n>>m){
		if(n==0&&m==0)  break;
		for(int i=0; i<=m; ++i){
			for(int j=0; j<n; ++j){
				dp[i][j]=0;
			}
		}
		for(int i=0; i<n; ++i){
			for(int j=0; j<n; ++j){
				cin >> g[i][j];
			}
		}
		for(int i=0; i<n; ++i){
			dp[1][i]=1.00;
		}
		for(int i=2; i<=m; ++i){
			for(int j=0; j<n; ++j){
				double tmp=dp[i][j];
				for(int k=0; k<n; ++k){
					tmp=max(tmp,dp[i-1][k]*g[k][j]);
				}
				dp[i][j]=tmp;
			}
		}
		double ans=0;
		for(int i=0; i<n; ++i){
			ans=max(ans,dp[m][i]);
		}
		ans*=100;
		ans+=0.5;
		ans=int(ans);
		a/=100;
		printf("%.2f\n",ans);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:54:17: error: 'a' was not declared in this scope
   54 |                 a/=100;
      |                 ^
Language: C++

#include <stdio.h>
using namespace std;

int main() {
	int i,j,k,m,n,f;
	double a,d[100][100],an[2][100];
	while(cin >> n >> m) {
		if (n==0 && m==0) break;
		for (i=0;i<n;i++) { an[0][i]=1; for (j=0;j<n;j++) cin >> d[i][j];}
		f=0;
		for (k=0;k<m-1;k++) {
			for (i=0;i<n;i++) { a=0; 
			  for (j=0;j<n;j++) a=a < an[f][j]*d[j][i] ? an[f][j]*d[j][i] : a;
			   an[1-f][i]=a; 
		  }
		  f=1-f;
		}
	  for (i=0,a=0;i<n;i++) a= a < an[f][i] ? an[f][i] : a;
	  printf("%.2f\n",a);
  }  			  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: 'cin' was not declared in this scope
    7 |         while(cin >> n >> m) {
      |               ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <stdio.h>
  +++ |+#include <iostream>
    2 | using namespace std;
Language: C++

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

#define rep(i,n) for(int i=0;i<n;i++)
#define rp(i,c) rep(i,(c).size())
#define fr(i,c) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++)
#define mp make_pair
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define dbg(x) cerr<<#x<<" = "<<(x)<<endl

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pi;
const int inf=1<<28;
const double INF=1e10,EPS=1e-9;

int n,m;
int ans[100],na;

struct S{
	int t[2],id[2];
	S()
	{
		rep(i,2)id[i]=0;
	}
	void next()
	{
		rep(i,2)if(id[i])t[i]--;
		rep(i,2)if(id[i])
		{
			if(t[i]<=0)ans[na++]=id[i],id[i]=0;
			return;
		}
	}
	void put(int cid,int time)
	{
		int p=id[1]?0:1;
		id[p]=cid; t[p]=time;
	}
	int diff(int time)
	{
		return abs(time-t[1]);
	}
};
S spc[10];

int pfind(queue<int> &Data)
{
	rep(i,m)if(!spc[i].id[1])return i;
	
	int mn=inf,nTime=Data.front(),ret=-1;
	rep(i,m)if(!spc[i].id[0]&&spc[i].t[1]>=nTime)
	if(mn>spc[i].diff(nTime))
	{
		mn=spc[i].diff(nTime); ret=i;
	}
	if(ret!=-1)return ret;
	
	rep(i,m)if(!spc[i].id[0]&&mn>spc[i].diff(nTime))
	mn=spc[i].diff(nTime),ret=i;
	
	return ret;
}
int main()
{
	while(scanf("%d%d",&m,&n),m)
	{
		rep(i,m)spc[i].id=0;
		
		int time=0,id=1; na=0;
		queue<int> ID,Data;
		while(na<n)
		{
			if(id<=n&&time==0)
			{
				int tmp; scanf("%d",&tmp);
				ID.push(id); Data.push(tmp); id++;
			}
			while(!ID.empty())
			{
				int next=pfind(Data);
				
				if(next==-1)break;
				
				spc[next].put(ID.front(),Data.front());
				ID.pop(); Data.pop();
			}
			time++;
			if(time==10)time=0;
			rep(i,m)spc[i].next();
		}
		rep(i,na)printf("%d%c",ans[i],i==n-1?'\n':' ');
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:83:34: error: incompatible types in assignment of 'int' to 'int [2]'
   83 |                 rep(i,m)spc[i].id=0;
      |                         ~~~~~~~~~^~
Language: Java

6 6
6  
1 1
6 1
3 2
3 5
1 6
5 6
2
1 3
5 3
6 6
6
3 2
3 5
6 1
1 1
1 6
5 6
2
2 3
5 3
0 0

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
6 6
^
1 error
Language: Java

import java.util.*;

public class DevenEleven {
	public static void main(String[] args) {
		Scanner s=new Scanner(System.in);
		for(int m,n,x,a[][];(n=s.nextInt())>0;){
			m=s.nextInt();
			x=s.nextInt();
			a=new int[n][m];
			Deque<int[]>q=new ArrayDeque<int[]>();
			for(int i=0;i<x;++i){
				int u=s.nextInt()-1,v=s.nextInt()-1;
				a[u][v]=1;
				q.add(new int[]{u,v,1});
			}
			int[][]dn={{-1,-1,-1,0,0,1},{-1,0,0,1,1,1}};
			int[][]dm={{-1,0,1,-1,1,0},{0,-1,1,-1,0,1}};
			
			while(!q.isEmpty()){
				int[]t=q.poll();
				for(int i=0;i<6;++i){
					int u=t[0]+dn[t[1]%2][i],v=t[1]+dm[t[1]%2][i];
					if(0<=u&&u<n&&0<=v&&v<m&&a[u][v]<1){
						q.add(new int[]{u,v,a[u][v]=t[2]+1});
					}
				}
			}
			int r=0;
			for(x=s.nextInt();x-->0;){
				int u=s.nextInt()-1,v=s.nextInt()-1;
				if(a[u][v]>1){
					int[][] tmp = new int[n][];
					for(int i=0;i<n;++i)
						tmp[i]=Arrays.copyOf(a[i],m);
					tmp[u][v]=1;
					q.add(new int[]{u,v,1});
					int c=1;
					while(!q.isEmpty()){
						int[]t=q.poll();
						for(int i=0;i<6;++i){
							int u1=t[0]+dn[t[1]%2][i],v1=t[1]+dm[t[1]%2][i];
							if(0<=u1&&u1<n&&0<=v1&&v1<m&&tmp[u1][v1]>t[2]+1){
								++c;
								q.add(new int[]{u1,v1,tmp[u1][v1]=t[2]+1});
							}
						}
					}
					r=r>c?r:c;
				}
			}
			System.out.println(r);
		}
	}
}

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

#include<cstdio>
#include<cstring>
#include<utility>
#include<algorithm>
#include<queue>
using namespace std;
typedef struct pos
{
	int x,y,cost;
	bool operator ()(pos const& a, pos const& b) const
	{
		return a.cost>b.cost;
	}

}pos;

int M,N,S,T,m[101][101],i,j,p,q,R,t;

int bfs(int x,int y,int abj)
{
	int i,c=1,mx[2][6]={{-1,0,1,0,-1,-1},{0,1,1,1,0,-1}},
			  my[2][6]={{-1,-1,0,1,1,0},{-1,-1,0,1,1,0}};
	priority_queue<pos,vector<pos>,pos>Q;
	m[y][x]=0;
	pos tmp={x,y,0};
	Q.push(tmp);
	while(!Q.empty())
	{
		tmp=Q.top();Q.pop();
		for(i=0;i<abj;i++)
		{
			if(0<=tmp.y+my[tmp.y%2][i]&&tmp.y+my[tmp.y%2][i]<M&&0<=tmp.x+mx[tmp.y%2][i]&&tmp.x+mx[tmp.y%2][i]<N)
				if(m[tmp.y+my[tmp.y%2][i]][tmp.x+mx[tmp.y%2][i]]>tmp.cost+1)
				{
					m[tmp.y+my[tmp.y%2][i]][tmp.x+mx[tmp.y%2][i]]=tmp.cost+1;
					pos tmp2={tmp.x+mx[tmp.y%2][i],tmp.y+my[tmp.y%2][i],tmp.cost+1};
					c++;
					Q.push(tmp2);
				}
		}
	}
	return c;
}

int main()
{
	for(i=0;i<100;i++)
		for(j=0;j<100;j++)
		{

		}
	for(;~scanf("%d%d%d",&M,&N,&S),M;)
	{
		memset(m,0x7,sizeof(m));
		for(i=0;i<S;i++)
		{
			scanf("%d%d",&p,&q);
			bfs(p-1,q-1,6);
		}
		for(R=0,scanf("%d",&T),j=0;j<T;j++)
		{
			scanf("%d%d",&p,&q);
			t=bfs(p-1,q-1,6);
			R=t<R?R:t;
		}
		printf("%d\n",R);
	}
	return 0;
}

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