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

#include <iostream>
#include <algorithm>
 
using namespace std;
 
const int inf = 999999;
 
int func(int n)
{
  
  int r = inf, w;
 
  for(int i = 0; i <= 25; i++){
    for(int j = 0; j <= 17; j++){
      for(int k = 0; k <= 10; k++){
    w = i*200+j*300+k*500;
    if(n == w){
      r = min(r, (i/5)*1520 + (i%5)*380 + 1870*(j/4) + (j%4)*550 + 2244*(k/3) + (k%3)*850);
    } else if(n < w){
      break;
    }
      }
    }
  }

Compiler output:
a.cc: In function 'int func(int)':
a.cc:24:4: error: expected '}' at end of input
   24 |   }
      |    ^
a.cc:9:1: note: to match this '{'
    9 | {
      | ^
a.cc:24:4: warning: no return statement in function returning non-void [-Wreturn-type]
   24 |   }
      |    ^
Language: C++

#include <iostream>
#include <algorithm>
 
using namespace std;
 
const int inf = 999999;
 
int func(int n;)
{
  
  int r = inf, w;
 
  for(int i = 0; i <= 25; i++){
    for(int j = 0; j <= 17; j++){
      for(int k = 0; k <= 10; k++){
    w = i*200+j*300+k*500;
    if(n == w){
      r = min(r, (i/5)*1520 + (i%5)*380 + 1870*(j/4) + (j%4)*550 + 2244*(k/3) + (k%3)*850);
    } else if(n < w){
      break;
    }
      }
    }
  }

Compiler output:
a.cc:8:15: error: expected ')' before ';' token
    8 | int func(int n;)
      |         ~     ^
      |               )
a.cc:8:16: error: expected unqualified-id before ')' token
    8 | int func(int n;)
      |                ^
Language: C++

#include<iostream>
#include<cmath>
using namespace std;
int grum[3]={200,300,500};
int val[3]={380,550,850};
double dis[3]={0.8,0.85,0.88};
int dis_c[3]={5,4,3};

int main()
{
	int ans[5001];
	for(int i = 500; i < 5100; i+=100)
	{
		ans[i]=INT_MAX;
		for(int j = 0; j <= 25; ++j)
		{
			for(int k = 0; k <= 17; ++k)
			{
				for(int l = 0; l <= 10 ; ++l)
				{
					if(j*200+k*300+l*500<i)
					{
						continue;
					}
					int tmp=0;
					tmp+=(j-j%5)*380*0.8+j%5*380;
					tmp+=(k-k%4)*550*0.85+k%4*550;
					tmp+=(l-l%3)*850*0.88+l%3*850;
					ans[i]=min(ans[i],tmp);
				}
			}
		}
	}
	int n;
	while(cin>>n,n) 
	{
		cout<<ans[n]<<endl;
	}
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:24: error: 'INT_MAX' was not declared in this scope
   14 |                 ans[i]=INT_MAX;
      |                        ^~~~~~~
a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    2 | #include<cmath>
  +++ |+#include <climits>
    3 | using namespace std;
Language: C++

#include<iostream>
using namespace std;

int w[]={2,3,5,10,12,15};
int v[]={380,550,850,1520,1870,2244};
 
int dp[50+1];
void solve(){
    for(int i=0;i<51;i++){
        dp[i]=INT_MAX/3;
    }
    dp[0]=0;
    for(int i=0;i<6;i++){
        for(int j=w[i];j<=50;j++){
            dp[j]=min(dp[j],dp[j-w[i]]+v[i]);
        }
    }
}
 
int main(){
    solve();
    int n;
    while(cin>>n){
        if(n==0)break;
        n/=100;
        cout<<dp[n]<<endl;
    }
  return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:10:15: error: 'INT_MAX' was not declared in this scope
   10 |         dp[i]=INT_MAX/3;
      |               ^~~~~~~
a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    1 | #include<iostream>
  +++ |+#include <climits>
    2 | using namespace std;
Language: C++

#include<iostream>
#include<algorithm>
#define INF 1<<28
using namespace std;

int solve(int n){
  int res = INF;
  if(!n) return 0;
  if(n < 0) return INF;
  return res = min(res, min(solve(n-1000)+1520, min(solve(n-1200)+1870, min(solve(n-1500)+2244, min(solve(n-200)+380, min(solve(n-300)+550, solve(n-500)+850))))));
}

int main(n){ while(cin >> n, n) cout << solve(n) << endl; }

Compiler output:
a.cc:13:5: error: cannot declare '::main' to be a global variable
   13 | int main(n){ while(cin >> n, n) cout << solve(n) << endl; }
      |     ^~~~
a.cc:13:10: error: 'n' was not declared in this scope
   13 | int main(n){ while(cin >> n, n) cout << solve(n) << endl; }
      |          ^
Language: C++

#include<iostream>
#include<cstring>
#include<algorithm>

#define Kinds 6
#define DP 50
const int cost[Kinds]={380,550,850,380*5*0.8,550*4*0.85,850*3*0.88};
const int Volume[Kinds]={200,300,500,1000,1200,1500};

unsigned int dp[DP];

int main(){
	int n;
	
	memset(dp,10000000,sizeof(dp));
	dp[0]=0;
	for(int i=0;i<DP;++i)
		for(int l=0;l<Kinds;++l)
			if(i-Volume[l]/100>=0)
				dp[i]=std::min(dp[i],dp[i-Volume[l]/100]+cost[l]);
	while( std::cin>>n, n )
		std::cout<<dp[n/100]<<std::endl;
	
	return 0;
}

Compiler output:
a.cc:7:41: error: narrowing conversion of '1.52e+3' from 'double' to 'int' [-Wnarrowing]
    7 | const int cost[Kinds]={380,550,850,380*5*0.8,550*4*0.85,850*3*0.88};
      |                                    ~~~~~^~~~
a.cc:7:51: error: narrowing conversion of '1.87e+3' from 'double' to 'int' [-Wnarrowing]
    7 | const int cost[Kinds]={380,550,850,380*5*0.8,550*4*0.85,850*3*0.88};
      |                                              ~~~~~^~~~~
a.cc:7:62: error: narrowing conversion of '2.244e+3' from 'double' to 'int' [-Wnarrowing]
    7 | const int cost[Kinds]={380,550,850,380*5*0.8,550*4*0.85,850*3*0.88};
      |                                                         ~~~~~^~~~~
Language: Java

import java.util.Arrays;
import java.util.Scanner;
public class Main {
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        while(true){
            int a = sc.nextInt();
            int b = sc.nextInt();
            int c = sc.nextInt();
            if(a==0&&ab==0&&c==0) break;
            int array[] = {a, b, c};
            Arrays.sort(array);
            double num = Math.hypot(array[0], array[1])/2;
            int n=sc.nextInt();
            for(int i = 0; i < n; i++){
                 System.out.println(sc.nextInt() > num? "OK" : "NA");
            }
        }
    }
}


Compiler output:
Main.java:10: error: cannot find symbol
            if(a==0&&ab==0&&c==0) break;
                     ^
  symbol:   variable ab
  location: class Main
1 error
Language: Java

import java.util.*;

public class Main
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		
		int[] x = new int[3];
		for(int i = 0; i < 3; i++){
			x[i] = stdIn.nextInt();
		}
		while( x[0] != 0 || x[1] != 0 || x[2] != 0 ){
			for(int i = 0; i < 3; i++){
				int max = i;
				for(int j = i+1; j < 3; j++){
					if( x[j] > x[max] ){
						max = j;
					}
				}
				int temp = x[max];
				x[max] = x[i];
				x[i] = temp;
			}
			double r = Math.hypot(x[1],x[2])/2;
			System.out.println(r);
			int n = stdIn.nextInt();
			for(int i = 0; i < n; i++){
				int m = stdIn.nextInt();
				if( m <= r ){
					System.out.println("NA");
				} else {
					System.out.println("OK");
				}
			}
			x[0] = stdIn.nextInt();
			x[1] = stdIn.nextInt();
			x[2] = stdIn.nextInt();
		}
	}
}

Compiler output:
Main.java:3: error: '{' expected
public class Main
                 ^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
	public static void main(String[] args){
	              ^
  (use --enable-preview to enable unnamed classes)
Main.java:39: error: class, interface, enum, or record expected
}
^
3 errors
Language: C

#include<stdio.h>
int main(void)
{
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
for(;;)
{
scanf("%d",&d);
if(d==0 0 0) break;
if(a*a+b*b<=2*d*d || b*b+c*c<=d*d || a*a+c*c<=d:d)
printf("OK");
else
("NA");
}
return 0;
} 

Compiler output:
main.c: In function 'main':
main.c:8:13: error: 'd' undeclared (first use in this function)
    8 | scanf("%d",&d);
      |             ^
main.c:8:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:8: error: expected ')' before numeric constant
    9 | if(d==0 0 0) break;
      |   ~    ^~
      |        )
main.c:10:48: error: expected ')' before ':' token
   10 | if(a*a+b*b<=2*d*d || b*b+c*c<=d*d || a*a+c*c<=d:d)
      |   ~                                            ^
      |                                                )
Language: C

#include<stdio.h>
int main(void)
{
int a,b,c,d;
scanf("%d %d %d",&a,&b,&c);
for(;;)
{
scanf("%d",&d);
if(d==0 0 0) break;
if(a*a+b*b<=2*d*d || b*b+c*c<=d*d || a*a+c*c<=d:d)
printf("OK");
else
("NA");
}
return 0;
} 

Compiler output:
main.c: In function 'main':
main.c:9:8: error: expected ')' before numeric constant
    9 | if(d==0 0 0) break;
      |   ~    ^~
      |        )
main.c:10:48: error: expected ')' before ':' token
   10 | if(a*a+b*b<=2*d*d || b*b+c*c<=d*d || a*a+c*c<=d:d)
      |   ~                                            ^
      |                                                )
Language: C

#include<stdio.h>
int main(void)
{
int a,b,c,d,e,f;
scanf("%d %d %d",&a,&b,&c);
for(;;)
{
scanf("%d",&d);
if(d==0) scanf("%d %d",&e,&f);
if(e==0 && f==0)break;
if(a*a+b*b<=2*d*d || b*b+c*c<=d*d || a*a+c*c<=d:d)
printf("OK");
else
("NA");
}
return 0;
} 

Compiler output:
main.c: In function 'main':
main.c:11:48: error: expected ')' before ':' token
   11 | if(a*a+b*b<=2*d*d || b*b+c*c<=d*d || a*a+c*c<=d:d)
      |   ~                                            ^
      |                                                )
Language: C

#include<stdio.h>
int main(void)
{
int a,b,c,d,e,f;
scanf("%d %d %d",&a,&b,&c);
for(;;)
{
scanf("%d",&d);
if(d==0) scanf("%d %d",&e,&f);
if(e==0 && f==0)break;
if(a*a+b*b<=2*d*d || b*b+c*c<=d*d || a*a+c*c<=d*d)
printf("OK");
else
(printf"NA");
}
return 0;
} 

Compiler output:
main.c: In function 'main':
main.c:14:8: error: expected ')' before string constant
   14 | (printf"NA");
      | ~      ^~~~
      |        )
Language: C

#include<stdio.h>
int main(void)
{
int a,b,c,d,e,f;
scanf("%d %d %d",&a,&b,&c);
for(;;)
{
scanf("%d",&d)
if(d==0 0 0) break;
if(a*a+b*b<=2*d*d || b*b+c*c<=d*d || a*a+c*c<=d*d)
printf("OK");
else
printf("NA");
}
return 0;
} 

Compiler output:
main.c: In function 'main':
main.c:8:15: error: expected ';' before 'if'
    8 | scanf("%d",&d)
      |               ^
      |               ;
    9 | if(d==0 0 0) break;
      | ~~
Language: C

#include<stdio.h>
int main(void)
{
    int a,b,c,d;
    int z,y,x,w,v,u,t,s;
    char kitune;
    scanf("%d %d %d",&a,&b,&c);
    z=a*a;
    y=b*b;
    x=c*c;
    scanf("%d",&d);
    for(i=0;i<=d;i++)
    {
        scanf("%d",&w);
        if(w==0)
        {
            scanf("%d",&t);
            if(t==0)
            {
                scanf("%d",&s);
                if(s==0) break;
                else {goto kitune;}
            }

            else
            {
                goto kitune;
            }
        }
        else
        {
            kitune:
            v=2*w;
            u=w*w;
            if(z+y<=u || z+x<=u || y+x<=u) printf("OK\n");
            else printf("NA\n");
        }

    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:9: error: 'i' undeclared (first use in this function)
   12 |     for(i=0;i<=d;i++)
      |         ^
main.c:12:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

include<stdio.h>
main(){
  int t,y,h,n,i,r,temp,a[10010];
  scanf("%d%d%d%d",&t,&y,&h,&n);
  for(i=0;i<n;i++){
    scanf("%d",&a[i]);
  }
  if(y<t){
    temp=t;
    t=y;
    y=temp;
  }
  if(h<y){
    temp=h;
    h=y;
    y=temp;
  }
  if(y<t){
    temp=t;
    t=y;
    y=temp;
  }
  printf("%d%d%d\n",t,y,h);
  for(i=0;i<n;i++){
    r=sqrt(t*t+y*y)/2;
    if(a[i]<=r){
      printf("NA\n");
    }
    else{
      printf("OK\n");
    }
  }
  return 0;
}

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


#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <memory>
#include <string>

#include <algorithm>
#include <complex>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <vector>
#include <bitset>

using namespace std;

#ifdef _MSC_VER
#define __typeof__ decltype
#define strtok_r strtok_s
#endif

#define ITER(c)             __typeof__((c).begin())
#define FOREACH(it, c)      for (ITER(c) it=(c).begin(); it != (c).end(); ++it)
#define RITER(c)            __typeof__((c).rbegin())
#define RFOREACH(it, c)     for (RITER(c) it=(c).rbegin(); it != (c).rend(); ++it)
#define REP(i, n)           REPEAT(i, 0, n)
#define RREP(i, n)          RREPEAT(i, 0, n)
#define REPEAT(i, k, n)     for(int i = (k); i < (k+n); ++i)
#define RREPEAT(i, k, n)    for(int i = (k)+(n)-1; i >= (k); --i)
#define FROMTO(i,f,t)       for(int i = f; i < t; i++)
#define ALL(c)              (c).begin(), (c).end()
#define LLPOW(p1,p2)        ((ll)pow((double)(p1), (int)p2))
#define ESIZEOF(A)          (sizeof(A)/sizeof((A)[0]))
#define CIN_NO_SYNC         do { cin.tie(0); ios_base::sync_with_stdio(false); } while(0)
#define GETSTR(p)           fgets((p), sizeof(p), stdin)
#define CHOMP(p)            do{ char *_q = (p) + strlen(p)-1; if(*_q == '\n' || *_q == '\r') *_q = 0; } while(0)
#define FILL(m,v)           memset(m, v, sizeof(m))
#define mp                  make_pair
#define pb                  push_back
template<class _T> _T MAX(_T p1,_T p2){return (p1>p2)?p1:p2;} 
template<class _T> _T MIN(_T p1,_T p2){return (p1<p2)?p1:p2;} 

typedef long long ll;
typedef unsigned long long ull;

#define X real()
#define Y imag()
typedef double D;
typedef complex<D> P;
#define EPS (1e-9)

#ifdef _DEBUG
template<class _T>
inline void _prfe(const char *_n, _T _c, bool _p = false){
    ITER(_c) _it=_c.begin();
    if(_p){ cout<<_n<<" = ["<<endl;for(;_it!=_c.end();++_it)cout<<"    "<<*_it<<endl;cout<<"]"<<endl; }
    else{ cout<<_n<<" = [ "<<*_it++;for(;_it!=_c.end();++_it)cout<<", "<<*_it;cout<<" ]"<<endl; }
}
#define pf printf
#define pr(n) do{cout<<#n" = "<<(n)<<endl;}while(0)
#define prfe(n) _prfe(#n, n)
#define prfep(n) _prfe(#n, n, true)
#define dbgchk(n) do{if(n)throw;}while(0)
#else
#define pf(...) /* */
#define pr(...) /* */
#define prfe(...) /* */
#define prfep(...) /* */
#define dbgchk(...) /* */
#endif

int main(){
    int a[3], n, m;
    while(1){
        cin >> a[0] >> a[1] >> a[2];
        if(a[0] == 0 && a[1] == 0 && a[2] == 0) break;
        sort(a,a+3);
        cin >> n;
        double l1 = a[0]/2.0, l2 = a[1]/2.0;
        double r = sqrt(l1*l1+l2*l2);
        REP(i,n){
            cin >> m;
            puts((m > r)?"OK":"NA");
        }
    }

    return 0;
}

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

#include<stdio.h>

int main(){

int x,y,z,N,r;
while(scanf("%d %d %d",&n[0],&n[1],&n[2])!=EOF){

for(int i=0;i<3;i++)
for(int j=2;j>i;j--)
if(n[j-1]>n[j]){int t=n[j];n[j]=n[j-1];n[j-1]=t;}

scanf("%d",&N);
for(int i=0;i<N;i++){

scanf("%d",&r);
if(n[1]>r*1.4141356)printf("NA\n");
else printf("OK\n");
}
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:25: error: 'n' was not declared in this scope
    6 | while(scanf("%d %d %d",&n[0],&n[1],&n[2])!=EOF){
      |                         ^
Language: C++


#include<iostream>

using namespace std;
int main(){
double w,h,d,r;
double pi=3.141592653,s;
int n;
while(1){
cin >> w >> h >> d;
if(w+h+d==0) break;
cin >> n;
while(n--){
cin >> r;
r*=2;
double dw.dh,dd;
dw=sqrt(w*w+h*h);
dh=sqrt(h*h+d*d);
dd=sqrt(d*d+w*w);
if(dw<r||dh<r||dd<r) cout<<"OK" << endl;
else cout << "NA" << endl;
}
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:10: error: expected initializer before '.' token
   16 | double dw.dh,dd;
      |          ^
a.cc:17:1: error: 'dw' was not declared in this scope; did you mean 'd'?
   17 | dw=sqrt(w*w+h*h);
      | ^~
      | d
a.cc:17:4: error: 'sqrt' was not declared in this scope
   17 | dw=sqrt(w*w+h*h);
      |    ^~~~
a.cc:18:1: error: 'dh' was not declared in this scope; did you mean 'd'?
   18 | dh=sqrt(h*h+d*d);
      | ^~
      | d
a.cc:19:1: error: 'dd' was not declared in this scope; did you mean 'd'?
   19 | dd=sqrt(d*d+w*w);
      | ^~
      | d
Language: C++

#include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <set>
#include <cmath>
#include <algorithm>
using namespace std;

int main(){
	int tate,yoko,takasa,mn,md;
	int n;
	while(cin>>tate>>yoko>>takasa, tate|| yoko || takasa){
		cin>>n;
		int* r = new int [n];
		mn=min(min(tate , yoko) , takasa);
		if(tate>=yoko){
			if(yoko>=takasa) {
			    md=yoko;
			} else if (yoko<takasa) {
				if(tate>=takasa)  md=takasa;
				else if (tate<takasa)  md=tate;
			}
			
		} else if (tate<yoko){
			if (tate>=takasa){
				md=tate;
			} else if(tate<takasa){
				if(yoko>=takasa) md=takasa;
				else if(yoko<takasa) md=yoko;
			}
		}
		for(int i=0;i<n;++i){
			cin>> r[i];
			cout << ((r[i]*r[i]*4>mn*mn+md*md) ? "OK" : "NA") << endl;
		}
	}
	delete [] r;
	return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:19: error: 'r' was not declared in this scope
   39 |         delete [] r;
      |                   ^
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
	int a,b,c;
	cin>>a>>b>>c;
int r[100];
int n=0;

while(true){
	int temp;
	cin>>temp;
	if(n>=2&&temp==0&&r[n-1]==0&&r[n-2]==0){
		break;
	}
	else{
		r[n]=temp;
		n=n++;
	}
}
	int rec1,rec2,rec3;
	rec1=sqrt(a*a+b*b);
	rec2=sqrt(a*a+c*c);
	rec3=sqrt(b*b+c*c);


	for (int i=0;i<n;i++){
	 if (2*r[i]>rec1||2*r[i]>rec2||2*r[i]>rec3){
		 cout<<"OK"<<endl;
	 }
	 else{
		 cout<<"NA"<<endl;
	 }
	}
return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:14: error: 'sqrt' was not declared in this scope
   22 |         rec1=sqrt(a*a+b*b);
      |              ^~~~
Language: C++

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

int main(){
  std::vector<int> size;
  int x, n, r;
  
  std::cin >> size[0];
  std::cin >> size[1];
  std::cin >> size[2];
  size.sort(size.begin(), size.end());
  
  while(d!=0 && w!=0 && h!=0){
    std::cin >> n;
    for(int i=0; i<n; i++){
      std;;cin >> r;
      if(r>size[1]){
        std::cout << "OK" << std::endl;
      }else{
        std::cout << "NA" << std::endl;
      }
    }
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:8: error: 'class std::vector<int>' has no member named 'sort'
   12 |   size.sort(size.begin(), size.end());
      |        ^~~~
a.cc:14:9: error: 'd' was not declared in this scope
   14 |   while(d!=0 && w!=0 && h!=0){
      |         ^
a.cc:14:17: error: 'w' was not declared in this scope
   14 |   while(d!=0 && w!=0 && h!=0){
      |                 ^
a.cc:14:25: error: 'h' was not declared in this scope
   14 |   while(d!=0 && w!=0 && h!=0){
      |                         ^
a.cc:17:10: error: expected primary-expression before ';' token
   17 |       std;;cin >> r;
      |          ^
a.cc:17:12: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   17 |       std;;cin >> r;
      |            ^~~
      |            std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

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

int main(){
  vector<int> size;
  int x, n, r;
  
  std::cin >> size[0];
  std::cin >> size[1];
  std::cin >> size[2];
  size.sort(size.begin(), size.end());
  
  while(d!=0 && w!=0 && h!=0){
    std::cin >> n;
    for(int i=0; i<n; i++){
      std;;cin >> r;
      if(r>size[1]){
        std::cout << "OK" << std::endl;
      }else{
        std::cout << "NA" << std::endl;
      }
    }
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'vector' was not declared in this scope
    6 |   vector<int> size;
      |   ^~~~~~
a.cc:6:3: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:6:10: error: expected primary-expression before 'int'
    6 |   vector<int> size;
      |          ^~~
a.cc:9:15: error: 'size' was not declared in this scope; did you mean 'std::size'?
    9 |   std::cin >> size[0];
      |               ^~~~
      |               std::size
In file included from /usr/include/c++/14/string:53,
                 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/range_access.h:272:5: note: 'std::size' declared here
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
a.cc:14:9: error: 'd' was not declared in this scope
   14 |   while(d!=0 && w!=0 && h!=0){
      |         ^
a.cc:14:17: error: 'w' was not declared in this scope
   14 |   while(d!=0 && w!=0 && h!=0){
      |                 ^
a.cc:14:25: error: 'h' was not declared in this scope
   14 |   while(d!=0 && w!=0 && h!=0){
      |                         ^
a.cc:17:10: error: expected primary-expression before ';' token
   17 |       std;;cin >> r;
      |          ^
a.cc:17:12: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   17 |       std;;cin >> r;
      |            ^~~
      |            std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

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

int main(){
  std::vector<int> size;
  int x, n, r;
  
  std::cin >> size[0];
  std::cin >> size[1];
  std::cin >> size[2];
  std::sort(size.begin(), size.end());
  
  while(d!=0 && w!=0 && h!=0){
    std::cin >> n;
    for(int i=0; i<n; i++){
      std;;cin >> r;
      if(r>size[1]){
        std::cout << "OK" << std::endl;
      }else{
        std::cout << "NA" << std::endl;
      }
    }
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'd' was not declared in this scope
   14 |   while(d!=0 && w!=0 && h!=0){
      |         ^
a.cc:14:17: error: 'w' was not declared in this scope
   14 |   while(d!=0 && w!=0 && h!=0){
      |                 ^
a.cc:14:25: error: 'h' was not declared in this scope
   14 |   while(d!=0 && w!=0 && h!=0){
      |                         ^
a.cc:17:10: error: expected primary-expression before ';' token
   17 |       std;;cin >> r;
      |          ^
a.cc:17:12: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   17 |       std;;cin >> r;
      |            ^~~
      |            std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

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

int main(){
  std::vector<int> size;
  int x, n, r;
  
  std::cin >> size[0];
  std::cin >> size[1];
  std::cin >> size[2];
  std::sort(size.begin(), size.end());
  
  while(size[0]=0 && size[1]=0 && size[2]=0){
    std::cin >> n;
    for(int i=0; i<n; i++){
      std;;cin >> r;
      if(r>size[1]){
        std::cout << "OK" << std::endl;
      }else{
        std::cout << "NA" << std::endl;
      }
    }
    std::cin >> size[0];
    std::cin >> size[1];
    std::cin >> size[2];
    std::sort(size.begin(), size.end());
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:32: error: lvalue required as left operand of assignment
   14 |   while(size[0]=0 && size[1]=0 && size[2]=0){
a.cc:17:10: error: expected primary-expression before ';' token
   17 |       std;;cin >> r;
      |          ^
a.cc:17:12: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   17 |       std;;cin >> r;
      |            ^~~
      |            std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

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

int main(){
  std::vector<int> size;
  int x, n, r;
  
  std::cin >> size[0];
  std::cin >> size[1];
  std::cin >> size[2];
  std::sort(size.begin(), size.end());
  
  while(size[0]==0 && size[1]==0 && size[2]==0){
    std::cin >> n;
    for(int i=0; i<n; i++){
      std;;cin >> r;
      if(r>size[1]){
        std::cout << "OK" << std::endl;
      }else{
        std::cout << "NA" << std::endl;
      }
    }
    std::cin >> size[0];
    std::cin >> size[1];
    std::cin >> size[2];
    std::sort(size.begin(), size.end());
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:10: error: expected primary-expression before ';' token
   17 |       std;;cin >> r;
      |          ^
a.cc:17:12: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   17 |       std;;cin >> r;
      |            ^~~
      |            std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

#include<iostream>
#include<math.h>
#include<vector>
#include<algorithm>
#include<cstdio>
using namespace std;
 
int main(){
 
    double d,w,h,r,min,dw,wh,hd;
    int n;
 
    while(true){
        scanf("%lf %lf %lf",&d,&w,&h);
        if(d == 0.0 && w == 0.0 && h == 0.0)break;
 
        scanf("%d",&n);
 
        for(int i=0; i < n; i++){
            scanf("%lf",&r);
            dw = (sqrt(d*d+w*w))/2.0;
            wh = (sqrt(w*w+h*h))/2.0;
            hd = (sqrt(d*d+h*h))/2.0;
            min = min(dw,min(wh,hd));
            if(r > min){
                printf("OK\n");
            }else{
                printf("NA\n");
            }
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:29: error: 'min' cannot be used as a function
   24 |             min = min(dw,min(wh,hd));
      |                          ~~~^~~~~~~
a.cc:24:36: error: 'min' cannot be used as a function
   24 |             min = min(dw,min(wh,hd));
      |                                    ^
Language: C++

int a,b,c,n,r;main(){while(std::cin>>a>>b>>c,a|b|c){a*=a;b*=b;c*=c;std::cin>>n;while(n--)std::cin>>r,r*=4*r,puts(a+b<r|b+c<r|c+a<r?"OK":"NA");}}

Compiler output:
a.cc:1:15: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    1 | int a,b,c,n,r;main(){while(std::cin>>a>>b>>c,a|b|c){a*=a;b*=b;c*=c;std::cin>>n;while(n--)std::cin>>r,r*=4*r,puts(a+b<r|b+c<r|c+a<r?"OK":"NA");}}
      |               ^~~~
a.cc: In function 'int main()':
a.cc:1:33: error: 'cin' is not a member of 'std'
    1 | int a,b,c,n,r;main(){while(std::cin>>a>>b>>c,a|b|c){a*=a;b*=b;c*=c;std::cin>>n;while(n--)std::cin>>r,r*=4*r,puts(a+b<r|b+c<r|c+a<r?"OK":"NA");}}
      |                                 ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int a,b,c,n,r;main(){while(std::cin>>a>>b>>c,a|b|c){a*=a;b*=b;c*=c;std::cin>>n;while(n--)std::cin>>r,r*=4*r,puts(a+b<r|b+c<r|c+a<r?"OK":"NA");}}
a.cc:1:73: error: 'cin' is not a member of 'std'
    1 | int a,b,c,n,r;main(){while(std::cin>>a>>b>>c,a|b|c){a*=a;b*=b;c*=c;std::cin>>n;while(n--)std::cin>>r,r*=4*r,puts(a+b<r|b+c<r|c+a<r?"OK":"NA");}}
      |                                                                         ^~~
a.cc:1:73: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:1:95: error: 'cin' is not a member of 'std'
    1 | int a,b,c,n,r;main(){while(std::cin>>a>>b>>c,a|b|c){a*=a;b*=b;c*=c;std::cin>>n;while(n--)std::cin>>r,r*=4*r,puts(a+b<r|b+c<r|c+a<r?"OK":"NA");}}
      |                                                                                               ^~~
a.cc:1:95: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:1:109: error: 'puts' was not declared in this scope
    1 | int a,b,c,n,r;main(){while(std::cin>>a>>b>>c,a|b|c){a*=a;b*=b;c*=c;std::cin>>n;while(n--)std::cin>>r,r*=4*r,puts(a+b<r|b+c<r|c+a<r?"OK":"NA");}}
      |                                                                                                             ^~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
	int a,b,c,n,r,R;
	while( cin >> a >> b >> c , a || b || c ){
		cin >> n;
		for(int i=0 ; i < n ; i++ ){
			bool ans = true;
			cin >> r;
			R = min( min( sqrt(a*a+b*b),sqrt(b*b+c*c) ),sqrt(c*c+a*a) );
			if( 2*r <= R ) ans = false;
			cout << (ans?"OK":"NA") << endl;
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:39: error: 'sqrt' was not declared in this scope
   11 |                         R = min( min( sqrt(a*a+b*b),sqrt(b*b+c*c) ),sqrt(c*c+a*a) );
      |                                       ^~~~
Language: C++

#include<stdio.h>
#include<math.h>
#include<algorithm>
int main(){int a,b,c,n,r;for(;scanf("%d%d%d",&a,&b,&c),a|b|c;)for(scanf("%d",&n);n--;puts( (2*r<=min(min(sqrt(a*a+b*b),sqrt(b*b+c*c)),sqrt(c*c+a*a)))?"OK":"NA"));scanf("%d",&r);}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:102: error: 'min' was not declared in this scope; did you mean 'std::min'?
    4 | int main(){int a,b,c,n,r;for(;scanf("%d%d%d",&a,&b,&c),a|b|c;)for(scanf("%d",&n);n--;puts( (2*r<=min(min(sqrt(a*a+b*b),sqrt(b*b+c*c)),sqrt(c*c+a*a)))?"OK":"NA"));scanf("%d",&r);}
      |                                                                                                      ^~~
      |                                                                                                      std::min
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:4:98: error: 'min' was not declared in this scope; did you mean 'std::min'?
    4 | int main(){int a,b,c,n,r;for(;scanf("%d%d%d",&a,&b,&c),a|b|c;)for(scanf("%d",&n);n--;puts( (2*r<=min(min(sqrt(a*a+b*b),sqrt(b*b+c*c)),sqrt(c*c+a*a)))?"OK":"NA"));scanf("%d",&r);}
      |                                                                                                  ^~~
      |                                                                                                  std::min
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
Language: C++

#include<stdio.h>
#include<math.h>
#include<algorith>
//#define M(a,b) a<b?a:b
int main(){
	int a,b,c,n,r;
	for(;scanf("%d%d%d",&a,&b,&c),a|b|c;){
		for(scanf("%d",&n);n--;){
			scanf("%d",&r);
			puts(
				(2.*r<=min(min(sqrt(a*a+b*b),sqrt(b*b+c*c)),sqrt(c*c+a*a)))?
				"OK":"NA"
			);
		}
	}
}

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

#include<stdio.h>
#include<math.h>
#include<algorithm>
//#define M(a,b) a<b?a:b
int main(){
	int a,b,c,n,r;
	for(;scanf("%d%d%d",&a,&b,&c),a|b|c;){
		for(scanf("%d",&n);n--;){
			scanf("%d",&r);
			puts(
				(2.*r<=min(min(sqrt(a*a+b*b),sqrt(b*b+c*c)),sqrt(c*c+a*a)))?
				"OK":"NA"
			);
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:44: error: 'min' was not declared in this scope; did you mean 'std::min'?
   11 |                                 (2.*r<=min(min(sqrt(a*a+b*b),sqrt(b*b+c*c)),sqrt(c*c+a*a)))?
      |                                            ^~~
      |                                            std::min
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:11:40: error: 'min' was not declared in this scope; did you mean 'std::min'?
   11 |                                 (2.*r<=min(min(sqrt(a*a+b*b),sqrt(b*b+c*c)),sqrt(c*c+a*a)))?
      |                                        ^~~
      |                                        std::min
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
Language: C++

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

int main(){
    double x, w, h, n, r, min_r;
    while (cin >> x >> w >> h, x || w || h){
	min_r = min(sqrt(x*x+w*w), min(sqrt(x*x+h*h), sqrt(w*w+h*h)));
	cin >> n;
	while (n--){
	    cin >> r;
	    r*=2;
	    min_r < r ? cout << "OK" << endl; : cout << "NA" << endl;
	}
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:45: error: expected ':' before ';' token
   14 |             min_r < r ? cout << "OK" << endl; : cout << "NA" << endl;
      |                                             ^
      |                                             :
a.cc:14:45: error: expected primary-expression before ';' token
a.cc:14:47: error: expected primary-expression before ':' token
   14 |             min_r < r ? cout << "OK" << endl; : cout << "NA" << endl;
      |                                               ^
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#define PI 3.14159265358979323846264

using namespace std; 



int main(void){

	int n;
	double v,box_area[5],height,width,depth,min_area;
	
	vector<double> hole;
	vector<double> hole_area;
	
	while(1){
	
		height=0;
		width=0;
		depth=0;
		n=0;
		min_area=0;
		
		hole.clear();
		
		hole_area.clear();

		for(int i=0;i<5;i++){
			box_area[i]=0;
		}
		
		scanf("%lf %lf %lf",&height,&width,&depth);
		
		if(height==0 && width==0 && depth==0){
			break;
		}
		
		scanf("%d",&n);

		for(int i=0;i<n;i++){
			cin>>v;
			hole.push_back(v);
		}

		for(int i=0;i<n;i++){
			hole_area.push_back(hole[i]*2.0);
			//printf("hole_area[%d]=%lf\n",i,hole_area[i]);
		}

		box_area[0]=sqrt(1.0*height*height+1.0*width*width);	//¼ûÌÌ3ÊÌ»ê¼êÌÎpü
		box_area[1]=sqrt(1.0*height*height+1.0*depth*depth);
		box_area[2]=sqrt(1.0*width*width+1.0*depth*depth);

		/*for(int i=0;i<3;i++){
			printf("box_area[%d]=%lf\n",i,box_area[i]);
		}
		printf("hei=%lf wid=%lf dep=%lf\n",height,width,depth);*/
		
		min_area=min(box_area[0],min(box_area[1],box_area[2]));
		
		//printf("¼ûÌÌÅ¬ÊÏÍ:%lf\n",min_area);

	
		for(int i=0;i<n;i++){
			
			if(hole_area[i]>min_area){
				printf("OK\n");			
			}
			else{
				printf("NA\n");	
			}
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:52:29: error: 'sqrt' was not declared in this scope
   52 |                 box_area[0]=sqrt(1.0*height*height+1.0*width*width);    //¼ûÌÌ3ÊÌ»ê¼êÌÎpü
      |                             ^~~~
Language: C++

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

int main(void)
{
	int a[3], n, b;
	while (scanf("%d %d %d", &a[0], &a[1], &a[2]), a[0]){
		sort(a, a + 3);
		int r = a[0]*a[0] + a[1]*a[1];
		cin >> n;
		for (int i = 0; i < n; i++){
			cin >> b;
			if (r < (b*2)*(b*2)) cout << "OK" << endl;
			else cout << "NA" << endl;
		}
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   10 |                 sort(a, a + 3);
      |                 ^~~~
      |                 sqrt
Language: C++

#include <iostream>
#include <math.h>
using namespace std;

int main(){
doIt();
}
void doIt(){
	int a,b,c,n,i;
	cin >> a >> b >> c;
	while(a + b + c > 0){
		cin >> n;
		int r[n];
		//cout << sqrt(a*a + b*b) / 2 << ", " << sqrt(b*b + c*c) / 2 << "," << sqrt(a*a + c*c) / 2;
		for(i = 0; i < n; i++){
			std::cin >> r[i];
			//斜辺を計算する
			bool bOK = false;
			if(sqrt(a*a + b*b) / 2 < r[i] || sqrt(b*b + c*c) / 2 < r[i] || sqrt(c*c + a*a) / 2 < r[i]){
				bOK = true;
			}
			if(bOK){
				cout << "OK" << endl;
			}
			else{
				cout << "NA" << endl;
			}
		}
		cin >> a >> b >> c;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:1: error: 'doIt' was not declared in this scope
    6 | doIt();
      | ^~~~
Language: C++

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

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

using namespace std;

int main() {
    int n;
    vector<int> s(3);

    while ( cin >> s[0] >> s[1] >> s[2] >> n, s[0] || s[1] || s[2] ) {
        sort(s.begin(), s.end());

        // REP(i, 3) cout << s[i] << " ";
        // cout << endl;

        double size = sqrt(s[0] * s[0] + s[1] * s[1]);

        // cout << size << " " << (s[0] * s[0]) << " " << (s[1] * s[1]) << endl;

        REP(i, n) {
            double r;
            cin >> r;
            // cout << "r:" << r*2 << " size:" << size << " r<size:" << (r*2<size) << endl;
            if ( r * 2 <= size )
                cout << "NA";
            else
                cout << "OK";
            cout << endl;

        }

    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   15 |         sort(s.begin(), s.end());
      |         ^~~~
      |         sqrt
Language: C++

#include <iostream>
#include <cmath>

using namespace std;

int main(void){

  int a[3];
  while( cin >> a[0] >> a[1] >> a[2] , ( a[0] || a[1] || a[2] ) ){
    
    int n;
    cin >> n;
    sort( a , a + 3 );
    int R = a[0]*a[0] + a[1]*a[1];

    while(n--){
      int r;
      cin >> r;
      if( 2 * r > sqrt(R) ) cout << "OK" << endl;
      else cout << "NA" << endl;
      
    }
  }
  return 0;
}

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

#include<iostream>
#include<algorithm>

int main(){
	int data[3];
	while(std::cin>>data[0]>>data[1]>>data[2],data[0],data[1],data[2]){
		int n;
		double min;
		std::sort(data,data+3);
		std::cin>>n;
		min=sqrt(data[0]*data[0]+data[1]*data[1])/2;
		for(int i=0,r;i<n;i++){
			std::cin>>r;
			if(r>min)std::cout<<"OK"<<std::endl;
			else std::cout<<"NA"<<std::endl;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: 'sqrt' was not declared in this scope
   11 |                 min=sqrt(data[0]*data[0]+data[1]*data[1])/2;
      |                     ^~~~
Language: Java

import java.util.Scanner;

class Main{

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int array[];
        while(truez){
            int n = sc.nextInt();
            if(n == 0)break;
            array = new int[n];
            for(int i = 0; i < n; i++)array[i] = sc.nextInt();
            int cnt = 0;
            while(true){
                int[] next = new int[n];
                int[] count = new int[13];
                for(int i : array)count[i]++;
                boolean judge = true;
                for(int i = 0; i < n; i++){
                    next[i] = count[array[i]];
                    if(next[i] != array[i])judge = false;
                }
                if(judge){
                	break;
                
                }
                cnt++;
                array = next;
            }
            System.out.println(cnt);
            for(int i = 0; i < array.length -1; i++){
            	System.out.print(array[i] + " ");
            }
            System.out.println(array[array.length - 1]);
        }
    }
}


Compiler output:
Main.java:8: error: cannot find symbol
        while(truez){
              ^
  symbol:   variable truez
  location: class Main
1 error
Language: Java

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;


public class Main0108 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N;
		while((N = scan.nextInt()) != 0) {
			int[] S = new int[N];
			for(int i = 0; i < N; i++) {
				S[i] = scan.nextInt();
			}
			int n = 0;
			int[] prev = S;
			int[] now = new int[N];
			for( ; !Arrays.equals(prev, now);) {
				n++;
				if(n >= 2){
					prev = now;
				}
				now = new int[N];
				Map<Integer,Integer> mset = new HashMap<Integer,Integer>();
				for(int i = 0; i < N; i++) {
					if(mset.containsKey(prev[i])) {
						mset.put(prev[i],mset.get(prev[i]).intValue()+1);
					} else {
						mset.put(prev[i], 1);
					}
				}
				for(int i = 0; i < N; i++) {
					now[i] = mset.get(prev[i]).intValue();
				}
			}
			System.out.println(n-1);
			for(int i = 0; i < N; i++) {
				if(i > 0){
					System.out.print(" ");
				}
				System.out.print(now[i]);
			}
			System.out.println();
		}
		scan.close();
	}

}

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

#include <stdio.h>

#define MAX 13

int main()
{
	int n = 0, i = 0, flag = 0, cnt = 0;
	int numline[MAX] = {};
	int tmpline[MAX] = {};
	int num[101] = {};

	while ( scanf( "%d", &n ) == 1 ) {
		if ( n == 0 ) { break; }
		for ( i = 0 ; i < n ; i++ ) {
			scanf( "%d", &numline[i] );
		}
		flag = 1;
		cnt = 0;
		while ( flag ) {
			// B=P8=J8;zNs$N=i4|2=$r9T$&
			for ( i = 0 ; i < 101 ; i++ ) {
				num[i] = 0;
			}

			// B=P8=J8;zNs$N%+%&%s%H
			for ( i = 0 ; i < n ; i++ ) {
				num[numline[i]]++;
			}

			// B=P8=IQEYJ8;zNs$N:n@.
			for ( i = 0 ; i < n ; i++ ) {
				tmpline[i] = num[numline[i]];
			}

			cnt++;
			// B=P8=IQEYJ8;zNs$rHf3S$9$k
			// memcmpB$OBh#30z?tJ,$NbyteB$N0z?t$r9T$&
			// B$b$7intB7?G[Ns$NHf3S$r9T$$$?$$>l9g$K$O, sizeof(int)*nB$H=q$/I,MW$,$"$k
			if ( memcmp( numline, tmpline, sizeof( int )*n ) == 0 ) {
				/*for ( i = 0 ; i < n ; i++ ) {
					printf( "%3d %3d\n", numline[i], tmpline[i] );
				}*/
				flag = 0;
			} else { 
				// B0c$&J8;zNs$N>l9g$O!"<!$NA`:n$KHw$($F?tNs$N%3%T!<$r9T$&
				for ( i = 0 ; i < n ; i++ ) {
					numline[i] = tmpline[i];
				} 
			}
		}

		printf( "%d\n", cnt-1 );
		for ( i = 0 ; i < n ; i++ ) {
			if ( i == n-1 ) { 
				printf( "%d\n", tmpline[i] );
			} else { 
				printf( "%d ", tmpline[i] );
			}
		}
	}
	return 0;
}
[taisa@owner-no-MacBook-Pro vol10


Compiler output:
main.c: In function 'main':
main.c:39:30: error: implicit declaration of function 'memcmp' [-Wimplicit-function-declaration]
   39 |                         if ( memcmp( numline, tmpline, sizeof( int )*n ) == 0 ) {
      |                              ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'memcmp'
    1 | #include <stdio.h>
  +++ |+#include <string.h>
    2 | 
main.c: At top level:
main.c:63:1: error: expected identifier or '(' before '[' token
   63 | [taisa@owner-no-MacBook-Pro vol10
      | ^
main.c:63:7: error: stray '@' in program
   63 | [taisa@owner-no-MacBook-Pro vol10
      |       ^
Language: C

#include <stdio.h>
#include <string.h>
#include <math.h>


int main()
{
	int  i,n;
	int data[12];
	int chk[12];
	int old_chk[12];
	int flg[12];
	int ans_cnt,wk,cnt,k;
	char inp[96];
	char *dmy_p;
	char *wk_p;

	while (1) {
		/**--init --**/
		/**--input--**/
		gets(inp);
		sscanf(inp,"%d",&n);
		if (n == 0) {
			break;
		}

		gets(inp);
		wk_p = strtok(inp," ");
		for(i=0 ;; i++) {
			if (wk_p == NULL) {
				break;
			}
			sscanf(wk_p,"%d",&(data[i]));
			wk_p = strtok_s(NULL," ");
		}

		/**-- CALC --**/
		memcpy(chk,data,sizeof(chk));
		memset(old_chk,'\0',sizeof(old_chk));
		ans_cnt=0;
		while (1) {
			ans_cnt++;
			memset(flg,'\0',sizeof(flg));
			for (i=0 ; i<n ; i++) {
				if (flg[i]!=0) {
					continue;
				}
				wk = chk[i];
				for (cnt=0,k=0 ; k<n ; k++) {
					if (flg[k]!=0) {
						continue;
					}
					if (chk[k] == wk) {
						cnt++;
					}
				}
				for (k=0 ; k<n ; k++) {
					if (flg[k]!=0) {
						continue;
					}
					if (chk[k] == wk) {
						chk[k] = cnt;
						flg[k] = 1;
					}
				}
			}

			if (memcmp(chk,old_chk,sizeof(chk)) == 0) {
				break;
			}
			memcpy(old_chk,chk,sizeof(old_chk));
		}

		/**-- PRINT --**/
		printf("%d\n",ans_cnt-1);
		for (i=0 ; i<n ; i++) {
			if (i== n-1)
				printf("%d",chk[i]);
			else 
				printf("%d ",chk[i]);

		}
		printf("\n");
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:21:17: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   21 |                 gets(inp);
      |                 ^~~~
      |                 fgets
main.c:34:32: error: implicit declaration of function 'strtok_s'; did you mean 'strtok_r'? [-Wimplicit-function-declaration]
   34 |                         wk_p = strtok_s(NULL," ");
      |                                ^~~~~~~~
      |                                strtok_r
main.c:34:30: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
   34 |                         wk_p = strtok_s(NULL," ");
      |                              ^
Language: C++

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

#define N 1000000

int main(){
	while(1){	
		int n, count=0;
		long before[13], after[13], c[N];
	
		scanf(" %d", &n);
		if(n==0) break;
		for(int i=0; i<n; ++i)scanf(" %ld", &before[i]);
				
		//loop
		bool flag=false;
		while(!flag){
			
			for(int i=0; i<=N; ++i) c[i]=0;
			
			for(int i=0; i<n; ++i){
				for(int j=0; j<n; ++j){
					if(before[i] == before[j]) c[i]++;
				}
			}
				
			for(int i=0; i<n; ++i) after[i]=c[i];	
			
			flag=true;
			for(int i=0; i<n; ++i){
				if(before[i]!=after[i]){
					flag=false;
					break;	
				}
			}
			/*
			for(int i=0; i<n; ++i){
				printf("%ld", after[i]);
				if(i<n-1) printf(" ");
			}
			printf("\n");
			*/0
			
			count++;
			for(int i=0; i<n; ++i) before[i]=after[i];
		}
		
		printf("%d\n", count-1);
		for(int i=0; i<n; ++i){
			printf("%ld", after[i]);
			if(i<n-1) printf(" ");
		}
		printf("\n");
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:28: error: expected ';' before 'count'
   43 |                         */0
      |                            ^
      |                            ;
   44 | 
   45 |                         count++;
      |                         ~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <algorithm>
#include <map>
#include <set>
#include <cstdio>
#include <cmath>
#define rep(i,l,n) for(lint i=l;i<n;i++)
#define rer(i,l,n) for(lint i=l;i<=n;i++)
#define all(a) a.begin(),a.end()
#define o(a) cout<<a<<endl
#define pb(a) push_back(a)
#define mk(a,b) make_pair(a,b)
#define fi first
#define se second
using namespace std;
typedef long long lint;
typedef vector<int> vi;
typedef vector<lint> vli;
typedef vector<vi> vvi;
typedef pair<int,int> pii;

int main(){
	int n;
	string s;
	while(cin>>n){
		if(n==0) break;
		int ct=0;
		int s[13]={};
		rep(i,0,n){
			cin>>s[i];
		}
		int ans[13]={};
		for(ct=0;;ct++){
			memset(ans,0,sizeof(ans));
			int d[13]={};
			rep(i,0,n){
				d[s[i]]++;
			}
			rep(i,0,n){
				ans[i]=d[s[i]];
			}
			int c=0;
			rep(i,0,n){
				if(ans[i]==s[i]) c++;
			}
			if(c==n) break;
			rep(i,0,n){
				s[i]=ans[i];
			}
		}
		o(ct);
		rep(i,0,n){
			if(i==0) cout<<ans[i];
			else cout<<" "<<ans[i];
		}
		cout<<endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:25: error: 'memset' was not declared in this scope
   37 |                         memset(ans,0,sizeof(ans));
      |                         ^~~~~~
a.cc:10:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    9 | #include <cmath>
  +++ |+#include <cstring>
   10 | #define rep(i,l,n) for(lint i=l;i<n;i++)