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

#include<iostream>
using namespace std;

bool ham[100001];
int m,n;

void solve(){
	for(int i=1; i<6; i++)
		ham[i] = true;
	for(int i=6; i<100001; i++)
		ham[i] = false;
	for(int i=2; i<100001; i++){
		if(ham[i]){
			for(int j=i*2; j<size; j*=2){
				if(j>100001)
					break;
				ham[j] = true;
			}for(int j=i*3; j<size; j*=3){
				if(j>100001)
					break;
				ham[j] = true;
			}for(int j=i*5; ; j*=5){
				if(j>100001)
					break;
				ham[j] = true;
			}
		}
	}
}

int main(){
	solve();
	while(true){
		cin >> m >> n;
		if(!m && !n)
			return 0;
		int ans = 0;
		for(int i=m; i<=n; i++)
			if(ham[i])
				ans++;
		cout << ans << endl;
	}
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:14:41: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<'
   14 |                         for(int j=i*2; j<size; j*=2){
      |                                        ~^~~~~
a.cc:18:42: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<'
   18 |                         }for(int j=i*3; j<size; j*=3){
      |                                         ~^~~~~
Language: C++

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

vector<int> hamming;

void ham() {
  int temp;
  for(int i=0;i<20;i++) {
    for(int j=0;j<20;j++) {
      for(int k=0;k<20;k++) {
        temp = pow(2.0,(double)i)*pow(3.0,(double)j)*pow(5.0,(double)k);
        if(temp <= 1000000 && temp >= 0) {
        hamming.push_back(temp);
        cout << temp << endl;
        }
        else {
          break;
        }
      }
    }
  }
}

int main() {
  int m,n,from,to;
  vector<int>::iterator low,up;
  ham();
  sort(hamming.begin(),hamming.end());
  while(cin >> m >> n) {
    low=lower_bound(hamming.begin(), hamming.end(), m);
    up=upper_bound(hamming.begin(),hamming.end(),n);
    from = int(low-hamming.begin());
    to = int(up-hamming.begin());
    cout << to-from << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:3: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   30 |   sort(hamming.begin(),hamming.end());
      |   ^~~~
      |   sqrt
a.cc:33:8: error: 'upper_bound' was not declared in this scope
   33 |     up=upper_bound(hamming.begin(),hamming.end(),n);
      |        ^~~~~~~~~~~
Language: C++

#include<iostream>
#include<algorithm>
#define MAXNUM 1e+6;

using namespace std;

int ham[4]={1,2,3,5};
bool memo[MAXNUM+1]={false};

void func(int n){
	if(n>MAXNUM || memo[n]==true){
		return ;
	}
	func(n*2);
	func(n*3);
	func(n*5);
}

int main(){
	int m,n,ans;
	func(1);
	
	while(cin>>m>>n,m){
		ans=0;
		for(int i=m;i<=n;i++){
			if(p[i]){
				ans++;
			}
		}
		cout<<ans<<endl;
	}
}

Compiler output:
a.cc:3:20: error: expected ']' before ';' token
    3 | #define MAXNUM 1e+6;
      |                    ^
a.cc:8:11: note: in expansion of macro 'MAXNUM'
    8 | bool memo[MAXNUM+1]={false};
      |           ^~~~~~
a.cc:8:17: error: expected unqualified-id before '+' token
    8 | bool memo[MAXNUM+1]={false};
      |                 ^
a.cc: In function 'void func(int)':
a.cc:11:21: error: expected primary-expression before '||' token
   11 |         if(n>MAXNUM || memo[n]==true){
      |                     ^~
a.cc:11:24: error: 'memo' was not declared in this scope
   11 |         if(n>MAXNUM || memo[n]==true){
      |                        ^~~~
a.cc: In function 'int main()':
a.cc:26:28: error: 'p' was not declared in this scope
   26 |                         if(p[i]){
      |                            ^
Language: C++

#include<iostream>
#include<vector>
using namespace std;
#define MAX 1000010

int main(){
	int hamming[MAX];
	memset(hamming,0,sizeof(int)*MAX);
	hamming[0]=0;
	hamming[1]=1;
	long int tmp =0;
	for(int i=0;tmp<MAX;i++){
		for(int j=0;tmp<MAX;j++){
			for(int k=0;tmp<MAX;k++){
				tmp =pow(2,i)*pow(3,j)*pow(5,k);
				if(tmp<MAX){
					hamming[tmp]=1;
				}
			}
			tmp =pow(2,i)*pow(3,j+1)*pow(5,0);
		}
		tmp =pow(2,i+1)*pow(3,0)*pow(5,0);
	}
	
	
	int a,b;
	while(cin>>a,a!=0){
		cin>>b;
		int ans=0;
		for(int i=a;i<b+1;i++){
			ans+=hamming[i];
		}
		cout<<ans<<endl;
	}
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'memset' was not declared in this scope
    8 |         memset(hamming,0,sizeof(int)*MAX);
      |         ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<vector>
  +++ |+#include <cstring>
    3 | using namespace std;
a.cc:15:38: error: 'pow' was not declared in this scope
   15 |                                 tmp =pow(2,i)*pow(3,j)*pow(5,k);
      |                                      ^~~
a.cc:20:30: error: 'pow' was not declared in this scope
   20 |                         tmp =pow(2,i)*pow(3,j+1)*pow(5,0);
      |                              ^~~
a.cc:22:22: error: 'pow' was not declared in this scope
   22 |                 tmp =pow(2,i+1)*pow(3,0)*pow(5,0);
      |                      ^~~
Language: C++

#include<stdio.h>
int cnt,flg;
int solve(int);
main(){
  int a,b,i;
  cnt=0;
  scanf("%d %d",&a,&b);
  for(i=a;i<=b;i++){
    flg=0;
    solve(i);
  }
  printf("%d\n",cnt);
  return 0;
}
int  solve(int a){
  if(flg==0){
  if(a==1||a==2||a==3||a==5){
    cnt++;
    flg=1;
    return;
  }
  if(a%2==0) solve(a/2);
  if(a%3==0) solve(a/3);
  if(a%5==0) solve(a/5);
  }
  return ;
}

Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      | ^~~~
a.cc: In function 'int solve(int)':
a.cc:20:5: error: return-statement with no value, in function returning 'int' [-fpermissive]
   20 |     return;
      |     ^~~~~~
a.cc:26:3: error: return-statement with no value, in function returning 'int' [-fpermissive]
   26 |   return ;
      |   ^~~~~~
Language: C++

#include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <cstring>
#include <string>
#include <sstream>
#include <algorithm>
#include <iomanip>
#include <iostream>

#define VARIABLE(x) cerr << #x << "=" << x << endl
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define REP(i,m,n) for (int i=m;i<(int)(n);i++)

const int INF = 10000000;
using namespace std;
typedef long long  ll;
/** Problem0162 : Hamming Numbers **/
int main()
{
	set<int> h;

	rep(i, 20) {
		rep(j, 20) {
			rep(k, 20) {
				h.insert(pow(2.0, i)*pow(3.0, j)*pow(5.0,k));
			}
		}
	}
	
	int m, n, ans;
	while (cin>>m>>n, m) {
		ans=0;
		set<int>::iterator it = h.begin();
		for (; it!=h.end(); it++) {
			if (m<=*it && *it<=n) {
				ans++;
			}
		}
		cout << ans << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:42: error: 'pow' was not declared in this scope
   28 |                                 h.insert(pow(2.0, i)*pow(3.0, j)*pow(5.0,k));
      |                                          ^~~
Language: C++

#include<stdio.h>

int main(){

int st1,st2;

int h1,h2,m1,m2;


int n[8][8]={
{0,300,500,600,700,1350,1650}
{6,0,350,450,600,1150,1500}
{13,7,0,250,400,1000,1350}
{18,12,5,0,250,850,1300}
{23,17,10,5,0,600,1150}
{43,37,30,25,20,0,500}
{58,052,45,40,35,15,0}
};

while(1){
scanf("%d",&st1);if(st1==0)break;

scanf("%d %d",&h1,&m1);

scanf("%d",&st2);
scanf("%d %d",&h2,&m2);

int t1=100*h1+m1;int t2=100*h2+m2;

int T1=st1,T2=st2,S=0;
if(st1>=st2){T1=st2;T2=st1;}

if((t1>=1730&&t2<=1930)&&n[T2-1][T1-1]<=40)
{S=(n[T1-1][T2-1])/2;}
else S=(n[T1-1][T2-1]);

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:1: error: expected '}' before '{' token
   12 | {6,0,350,450,600,1150,1500}
      | ^
a.cc:10:13: note: to match this '{'
   10 | int n[8][8]={
      |             ^
a.cc:12:1: error: expected ',' or ';' before '{' token
   12 | {6,0,350,450,600,1150,1500}
      | ^
a.cc:13:26: error: expected ';' before '}' token
   13 | {13,7,0,250,400,1000,1350}
      |                          ^
      |                          ;
a.cc:14:24: error: expected ';' before '}' token
   14 | {18,12,5,0,250,850,1300}
      |                        ^
      |                        ;
a.cc:15:23: error: expected ';' before '}' token
   15 | {23,17,10,5,0,600,1150}
      |                       ^
      |                       ;
a.cc:16:22: error: expected ';' before '}' token
   16 | {43,37,30,25,20,0,500}
      |                      ^
      |                      ;
a.cc:17:22: error: expected ';' before '}' token
   17 | {58,052,45,40,35,15,0}
      |                      ^
      |                      ;
a.cc: At global scope:
a.cc:20:1: error: expected unqualified-id before 'while'
   20 | while(1){
      | ^~~~~
a.cc:39:1: error: expected unqualified-id before 'return'
   39 | return 0;
      | ^~~~~~
a.cc:40:1: error: expected declaration before '}' token
   40 | }
      | ^
Language: C++

#include <bits/stdc++.h>

using namespace std;
 
const int price[7][7] = {
    {-1, 300, 500, 600, 700, 1350, 1650},
    {-1, -1, 350, 450, 600, 1150, 1500},
    {-1, -1, -1, 250, 400, 1000, 1350},
    {-1, -1, -1, -1, 250, 850, 1300},
    {-1, -1, -1, -1, -1, 600, 1150},
    {-1, -1, -1, -1, -1, -1, 500}
};
 
const int dist[7][7] = {
    {-1, 6, 13, 18, 23, 43, 58},
    {-1, -1, 7, 12, 17, 37, 52},
    {-1, -1, -1, 5, 10, 30, 45},
    {-1, -1, -1, -1, 5, 25, 40},
    {-1, -1, -1, -1, -1, 20, 35},
    {-1, -1, -1, -1, -1, -1, 15}
};
 
int _start = 17*60 + 30, _end = 19*60 + 30;
 
int main()
{
    int sIC, sh, sm, tIC, th, tm;
 
    while (scanf("%d", &sIC) ,sIC) {
	scanf("%d%d", &sh ,&sm);
	scanf("%d%d%d", &tIC ,&th ,&tm);
 
	sIC--; tIC--;
	bool ok1 = 0, ok2 = 0;
	int ssum = sh*60 + sm, tsum = th*60 + tm;
 
	if ((_start <= ssum && ssum <= _end) ||
	   (_start <= tsum && tsum <= _end)) ok1 = 1;
 
	if (dist[sIC][tIC] <= 40) ok2 = 1;
  
	int ans = price[sIC][tIC];
	if (ok1 && ok2) {
	    ans = (ans / 50 + 1) / 2;
	    ans *= 50;
	}
	printf("%d\n" ,ans);
    }
    return 0;
}

Compiler output:
/usr/bin/ld: /tmp/cc0TBhhm.o:(.data+0x0): multiple definition of `_start'; /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o:(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>

using namespace std;
 
const int price[7][7] = {
    {-1, 300, 500, 600, 700, 1350, 1650},
    {-1, -1, 350, 450, 600, 1150, 1500},
    {-1, -1, -1, 250, 400, 1000, 1350},
    {-1, -1, -1, -1, 250, 850, 1300},
    {-1, -1, -1, -1, -1, 600, 1150},
    {-1, -1, -1, -1, -1, -1, 500}
};
 
const int dist[7][7] = {
    {-1, 6, 13, 18, 23, 43, 58},
    {-1, -1, 7, 12, 17, 37, 52},
    {-1, -1, -1, 5, 10, 30, 45},
    {-1, -1, -1, -1, 5, 25, 40},
    {-1, -1, -1, -1, -1, 20, 35},
    {-1, -1, -1, -1, -1, -1, 15}
};
 
int _start = 17*60 + 30, _end = 19*60 + 30;
 
int main()
{
    int sIC, sh, sm, tIC, th, tm;
 
    while (scanf("%d", &sIC) ,sIC) {
	scanf("%d%d", &sh ,&sm);
	scanf("%d%d%d", &tIC ,&th ,&tm);
 
	sIC--; tIC--;
	bool ok1 = 0, ok2 = 0;
	int ssum = sh*60 + sm, tsum = th*60 + tm;
 
	if ((_start <= ssum && ssum <= _end) ||
	   (_start <= tsum && tsum <= _end)) ok1 = 1;
 
	if (dist[sIC][tIC] <= 40) ok2 = 1;
  
	int ans = price[sIC][tIC];
	if (ok1 && ok2) {
	    ans = (ans / 50 + 1) / 2;
	    ans *= 50;
	}
	printf("%d\n" ,ans);
    }
    return 0;
}

Compiler output:
/usr/bin/ld: /tmp/ccv0gDrq.o:(.data+0x0): multiple definition of `_start'; /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o:(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int start,finish;
	while(cin>>start,start){
		int time[2][2];
		for(int i=0;i<2;i++)cin>>time[0][i];
		cin>>finish;
		for(int i=0;i<2;i++)cin>>time[1][i];
		int num=0,distance[]={6,7,5,5,20,15},money[6][6]={{300,500,600,700,1350,1650},{350,450,600,1150,1500},{250,400,1000,1350},{250,850,1300},{600,1150},{500}};
		for(int i=start-1;i<finish;i++)num+=distance[i];
		bool kawa=0;
		for(int i=0;i<2&&!kawa&&num<41;i++)if(time[i][0]==18||time[i][0]==17&&time[i][1]>29||time[i][0]==19&&time[i][1]<31)kawa=1;
		num=money[start-1][finish-start-1];
		if(kawa){
			num/=2;
			if(num%100==25)num+=25;
		}
		cout<<num<<endl;
	}

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


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int start,finish;
    while(cin>>start,start){
        int time[2][2];
        for(int i=0;i<2;i++)cin>>time[0][i];
        cin>>finish;
        for(int i=0;i<2;i++)cin>>time[1][i];
        int num=0,distance[]={6,7,5,5,20,15},money[6][6]={{300,500,600,700,1350,1650},{350,450,600,1150,1500},{250,400,1000,1350},{250,850,1300},{600,1150},{500}};
        for(int i=start-1;i<finish;i++)num+=distance[i];
        bool kawa=0;
        for(int i=0;i<2&&!kawa&&num<41;i++)if(time[i][0]==18||time[i][0]==17&&time[i][1]>29||time[i][0]==19&&time[i][1]<31)kawa=1;
        num=money[start-1][finish-start-1];
        if(kawa){
            num/=2;
            if(num%100==25)num+=25;

Compiler output:
a.cc: In function 'int main()':
a.cc:19:36: error: expected '}' at end of input
   19 |             if(num%100==25)num+=25;
      |                                    ^
a.cc:17:17: note: to match this '{'
   17 |         if(kawa){
      |                 ^
a.cc:19:36: error: expected '}' at end of input
   19 |             if(num%100==25)num+=25;
      |                                    ^
a.cc:7:28: note: to match this '{'
    7 |     while(cin>>start,start){
      |                            ^
a.cc:19:36: error: expected '}' at end of input
   19 |             if(num%100==25)num+=25;
      |                                    ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

# define _CRT_SECURE_NO_WARNINGS 1
# define _USE_MATH_DEFINES
# include <iostream>
# include <numeric>
# include <string>
# include <bitset>
# include <vector>
# include <algorithm>
# include <cstdlib>
# include <cstdio>
# include <cstring>
# include <cstdlib>
# include <iomanip>
# include <queue>
# include <sstream>
# include <climits>
# include <cmath>
# include <list>
# include <functional>
# include <string>
# include <ctime>
# include <set>
# include <forward_list>
# include <map>
# include <stack>
using namespace std;
# define INF ((int)(1<<25))
# define REP(i,n) for(int i=0;i<(int)n;i++)
# define FOR(i,n) REP(i,n)
# define TORAD 2.0*M_PI/360.0
# define INT(x) int x;cin>>x;
# define ALL(x) (x).begin(),(x).end()
# define RALL(x) (x).rbegin(),(x).rend()
# define DEBUG(x) cout<<#x<<" :"<<x<<endl;
# define EPS 1e-12
template<class T> void debug(T a) { for (auto iiiiiiiiii : a)cout << iiiiiiiii << endl; }
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef pair<int, pii> piii;
int dx[4] = { 0,1,0,-1 }, dy[4] = { -1,0,1,0 };

int main()
{
	int n[2];
	while (cin >> n[0]&&n[0])
	{
		int t[2];
		int h, m;
		cin >> h >> m;
		t[0] = h * 60 + m;
		cin >> n[1];
		cin >> h >> m;
		t[1] = h * 60 + m;
		int x[][8] = { {0,0,0,0,0,0,0,0},{0,0,300,500,600,700,1350,1650},{0,0,0,350,450,600,1150,1500},{0,0,0,0,250,400,1000,1350},{0,0,0,0,0,250,850,1300},{0,0,0,0,0,0,600,1150},{0,0,0,0,0,0,0,500} };
		int ans = x[min(n[0], n[1])][max(n[0], n[1])];
		int p = 0;
		if (t[0] <= 17 * 60 + 30 && 17 * 60 + 30 <= t[1])p++;
		if (t[0] <= 19 * 60 + 30 && 19 * 60 + 30 <= t[1])p++;

		int d[] = { 6,7,5,5,20,15 };
		int D = 0;
		if (n[0] > n[1])swap(n[0], n[1]);
		while (n[0] < n[1])
		{
			D += d[n[0]-1];
			n[0]++;
		}
		if (p && D <= 40)
		{
			ans /= 2;
			while (ans % 50)ans++;
		}
		cout << ans << endl;


	}

}

Compiler output:
a.cc: In function 'void debug(T)':
a.cc:36:70: error: 'iiiiiiiii' was not declared in this scope; did you mean 'iiiiiiiiii'?
   36 | template<class T> void debug(T a) { for (auto iiiiiiiiii : a)cout << iiiiiiiii << endl; }
      |                                                                      ^~~~~~~~~
      |                                                                      iiiiiiiiii
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
signed main{
int a[7][7]={
    {0,300,500,600,700,1350,1650},
    {6,0,350,450,600,1150,1500},
    {13,7,0,250,400,1000,1350},
    {18,12,5,0,250,850,1300},
    {23,17,10,5,0,600,1150},
    {43,37,30,25,20,0,500},
    {58,52,45,40,35,15,0}
};
    int b;
    while(cin>>b,b){
	int c,d,e,f,g;
	scanf("%d%d%d%d%d",&c,&d,&e,&f,&g);
	c=c*60+d;
	f=f*60+g;
	if(c>=1050&&c<=1170&&f>=1050&&f<=1170){
	    if(a[max(b,e)-1][min(b,e)-1]<=40)printf("%d\n",a[min(b,e)-1][max(b,e)-1]/2);
	    else printf("%d\n",a[min(b,e)-1][max(b,e)-1]);
	    }
	    else printf("%d\n",a[min(b,e)-1][max(b,e)-1]);
	}
}

Compiler output:
a.cc:4:8: error: cannot declare '::main' to be a global variable
    4 | signed main{
      |        ^~~~
a.cc:5:1: error: expected primary-expression before 'int'
    5 | int a[7][7]={
      | ^~~
a.cc:5:1: error: expected '}' before 'int'
a.cc:4:12: note: to match this '{'
    4 | signed main{
      |            ^
a.cc:15:5: error: expected unqualified-id before 'while'
   15 |     while(cin>>b,b){
      |     ^~~~~
a.cc:26:1: error: expected declaration before '}' token
   26 | }
      | ^
Language: C++

#include<cmath>
#include<algorithm>
using namespace std;
int hyo[7][7]={
	{0,300,500,600,700,1350,1650},
	{6,0,350,450,600,1150,1500},
	{13,7,0,250,400,1000,1350},
	{18,12,5,0,250,850,1300},
	{23,17,10,5,0,600,1150},
	{43,37,30,25,20,0,500},
	{58,52,45,40,35,15,0}
};
int main(){
	int s,g, h,m,H,M, c;
	while(cin>>s,s){
		cin>>h>>m>>g>>H>>M;
		if(s>g)swap(s,g);
		c=hyo[s-1][g-1];
		if(hyo[g-1][s-1]<=40 &&( (1050<=h*60+m&&h*60+m<=1170)||(1050<=H*60+M&&H*60+M<=1170) ) )
		c=((int)ceil((c/2/50.0))*50;
		cout<<c<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:15: error: 'cin' was not declared in this scope
   15 |         while(cin>>s,s){
      |               ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<algorithm>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:20:44: error: expected ')' before ';' token
   20 |                 c=((int)ceil((c/2/50.0))*50;
      |                   ~                        ^
      |                                            )
a.cc:21:17: error: 'cout' was not declared in this scope
   21 |                 cout<<c<<endl;
      |                 ^~~~
a.cc:21:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:21:26: error: 'endl' was not declared in this scope
   21 |                 cout<<c<<endl;
      |                          ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include<algorithm>
  +++ |+#include <ostream>
    3 | using namespace std;
Language: C

include <stdio.h>
int main (void)
{
int a;
int s[5]={};

while(1){
scanf("%d",&a);
if(a==0);
break;

int i;
for(i=0;i<a;i++)
scanf("%d",&s[i]);

int ss[5]={};
int h=0; 

while(s[h]!=0){
ss[h]=s[h];
h++;
}

int oha=32;
int j;
int aaa[32]={};
int k=0;

while(1){
oha=oha-(oha-1)%5;
aaa[j]=oha;
j++;

oha=oha-ss[k%h];
aaa[j]=oha;
k++;
j++;

if(oha<=0)
break;
}
for(i=0;i<j-2;i++)
printf("%d\n",aaa[i]);
printf("0\n");

}
return 0;
}

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

include <stdio.h>
int main (void)
{
int a;
int s[5]={};

while(1){
scanf("%d",&a);
if(a==0)
break;

int i;
for(i=0;i<a;i++)
scanf("%d",&s[i]);

int ss[5]={};
int h=0; 

while(s[h]!=0){
ss[h]=s[h];
h++;
}

int oha=32;
int j;
int aaa[32]={};
int k=0;

while(1){
oha=oha-(oha-1)%5;
aaa[j]=oha;
j++;

oha=oha-ss[k%h];
aaa[j]=oha;
k++;
j++;

if(oha<=0)
break;
}
for(i=0;i<j-2;i++)
printf("%d\n",aaa[i]);
printf("0\n");

}
return 0;
}

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

{
  int n,i,j,a[32],b,ohajiki;

  while(scanf("%d",&n)!=EOF)
    {

      if(n==0)break;
      ohajiki=32;

      for(i=0;i<n;i++)
	{
	  scanf("%d",&a[i]);
}
      i=0;
      j=0;
      while(ohajiki>1)
	{
	  if(i%2==0)
	    {
	      b=(ohajiki-1)%5;
	      printf("%d\n",ohajiki-b);
	      ohajiki=ohajiki-b;
	    }
	  else
	    {
	      printf("%d\n",ohajiki-a[j]);
	      ohajiki=ohajiki-a[j];
	      j++;
	    }
	  if(j==n)j=0;
	  i++;
	}
      printf("0\n");
    }
  return 0;
}

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

#include<iostream>
using namespace std;
int n,a[100];
main()
{
    whiel(cin>>n,n)
    {
        for(int i=0;i<n;i++)cin>>a[i];
        int c=32,i=0;
        while(c)
        {
            c-=(c-1)%5;
            cout<<c<<endl;
            c-=(a[i]>c?c:a[i]);
            cout<<c<<endl;
            i=(i+1)%n;
        }
    }
}


Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:6:5: error: 'whiel' was not declared in this scope
    6 |     whiel(cin>>n,n)
      |     ^~~~~
Language: C++


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <stdio.h>
 
int main(){
 
  int i,j,a[26];
  int n,h = 32;
 
 
  while(1) {
    h = 32;
  scanf("%d",&n);
  if(n == 0) break;
 
 
  for(i=0;i<n;i++) scanf("%d",&a[i]);
 
  i = 0;
  while(1) {
 
    h = h -(h-1)%5;
    printf("%d\n",h);
 
 
    h -= a[i%n];
    if(h>0) printf("%d\n",h);
    else {
      printf("0\n");
      break;
    }
 
    i++;
 
  }
   
  }
 
  return 0;
 
}

Compiler output:
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 1
      | ^
a.cc: In function 'int main()':
a.cc:51:3: error: 'scanf' was not declared in this scope
   51 |   scanf("%d",&n);
      |   ^~~~~
a.cc:61:5: error: 'printf' was not declared in this scope
   61 |     printf("%d\n",h);
      |     ^~~~~~
a.cc:42:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
   41 | #include <stdio.h>
  +++ |+#include <cstdio>
   42 |
Language: C++

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

int main()
{
	while (1) {
		int a;
		cin >> a;
		if (a == 0)break;
		vector<int>b(a);
		for (int c = 0; c < a; c++) {
			cin >> b[c];
		}
		int e = 31;
		for (uint16_t f = 0; f < 6; f++){
			cout <<e<<endl;
			cout << e - b[f%size(b)] << endl;
			e -= 5;
		}
		cout << 1 << endl << 0 << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:22: error: 'uint16_t' was not declared in this scope
   17 |                 for (uint16_t f = 0; f < 6; f++){
      |                      ^~~~~~~~
a.cc:4:1: note: 'uint16_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    3 | #include<vector>
  +++ |+#include <cstdint>
    4 | using namespace std;
a.cc:17:38: error: 'f' was not declared in this scope
   17 |                 for (uint16_t f = 0; f < 6; f++){
      |                                      ^
Language: C++

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

int main()
{
	while (1) {
		int a;
		cin >> a;
		if (a == 0)break;
		vector<int>b(a);
		for (int c = 0; c < a; c++) {
			cin >> b[c];
		}
		int e = 31;
		for (uint16_t f = 0; f < 6; f++){
			cout <<e<<endl;
			cout << e -( b[f%size(b)]) << endl;
			e -= 5;
		}
		cout << 1 << endl << 0 << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:22: error: 'uint16_t' was not declared in this scope
   17 |                 for (uint16_t f = 0; f < 6; f++){
      |                      ^~~~~~~~
a.cc:4:1: note: 'uint16_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    3 | #include<vector>
  +++ |+#include <cstdint>
    4 | using namespace std;
a.cc:17:38: error: 'f' was not declared in this scope
   17 |                 for (uint16_t f = 0; f < 6; f++){
      |                                      ^
Language: C++

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

int main()
{
	while (1) {
		int a;
		cin >> a;
		if (a == 0)break;
		vector<int>b(a);
		for (int c = 0; c < a; c++) {
			cin >> b[c];
		}
		uint16_t e = 31;
		for (uint16_t f = 0; f < 6; f++){
			cout <<e<<endl;
			cout << e -( b[f%size(b)]) << endl;
			e -= 5;
		}
		cout << 1 << endl << 0 << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: 'uint16_t' was not declared in this scope
   16 |                 uint16_t e = 31;
      |                 ^~~~~~~~
a.cc:4:1: note: 'uint16_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    3 | #include<vector>
  +++ |+#include <cstdint>
    4 | using namespace std;
a.cc:17:30: error: expected ';' before 'f'
   17 |                 for (uint16_t f = 0; f < 6; f++){
      |                              ^~
      |                              ;
a.cc:17:38: error: 'f' was not declared in this scope
   17 |                 for (uint16_t f = 0; f < 6; f++){
      |                                      ^
a.cc:18:32: error: 'e' was not declared in this scope
   18 |                         cout <<e<<endl;
      |                                ^
Language: C++

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

int main()
{
	while (1) {
		int a;
		cin >> a;
		if (a == 0)break;
		vector<int>b(a);
		for (int c = 0; c < a; c++) {
			cin >> b[c];
		}
		uint16_t e = 31;
		for (uint16_t f = 0; f < 6; f++){
			cout <<e<<endl;
			cout << e -( b[f%(size(b))]) << endl;
			e -= 5;
		}
		cout << 1 << endl << 0 << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: 'uint16_t' was not declared in this scope
   16 |                 uint16_t e = 31;
      |                 ^~~~~~~~
a.cc:4:1: note: 'uint16_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    3 | #include<vector>
  +++ |+#include <cstdint>
    4 | using namespace std;
a.cc:17:30: error: expected ';' before 'f'
   17 |                 for (uint16_t f = 0; f < 6; f++){
      |                              ^~
      |                              ;
a.cc:17:38: error: 'f' was not declared in this scope
   17 |                 for (uint16_t f = 0; f < 6; f++){
      |                                      ^
a.cc:18:32: error: 'e' was not declared in this scope
   18 |                         cout <<e<<endl;
      |                                ^
Language: C++

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

int main()
{
	while (1) {
		int a;
		cin >> a;
		if (a == 0)break;
		vector<int>b(a);
		for (int c = 0; c < a; c++) {
			cin >> b[c];
		}
		uint16_t e = 31;
		for (uint16_t f = 0; f < 6; f++){
			cout <<e<<endl;
			cout << e -(b[f%(size(b))]) << endl;
			e -= 5;
		}
		cout << 1 << endl << 0 << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: 'uint16_t' was not declared in this scope
   15 |                 uint16_t e = 31;
      |                 ^~~~~~~~
a.cc:3:1: note: 'uint16_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    2 | #include<vector>
  +++ |+#include <cstdint>
    3 | using namespace std;
a.cc:16:30: error: expected ';' before 'f'
   16 |                 for (uint16_t f = 0; f < 6; f++){
      |                              ^~
      |                              ;
a.cc:16:38: error: 'f' was not declared in this scope
   16 |                 for (uint16_t f = 0; f < 6; f++){
      |                                      ^
a.cc:17:32: error: 'e' was not declared in this scope
   17 |                         cout <<e<<endl;
      |                                ^
Language: C++

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

int main()
{
	while (1) {
		int a;
		cin >> a;
		if (a == 0)break;
		vector<int>b(a);
		for (int c = 0; c < a; c++) {
			cin >> b[c];
		}
		uint16_t e = 31;
		for (uint16_t f = 0; f < 6; f++){
			cout <<e<<endl;
			cout << (e - b[f % (size(b))]) << endl;
			e -= 5;
		}
		cout << 1 << endl << 0 << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: 'uint16_t' was not declared in this scope
   15 |                 uint16_t e = 31;
      |                 ^~~~~~~~
a.cc:3:1: note: 'uint16_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    2 | #include<vector>
  +++ |+#include <cstdint>
    3 | using namespace std;
a.cc:16:30: error: expected ';' before 'f'
   16 |                 for (uint16_t f = 0; f < 6; f++){
      |                              ^~
      |                              ;
a.cc:16:38: error: 'f' was not declared in this scope
   16 |                 for (uint16_t f = 0; f < 6; f++){
      |                                      ^
a.cc:17:32: error: 'e' was not declared in this scope
   17 |                         cout <<e<<endl;
      |                                ^
Language: C++

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

int main()
{
	while (1) {
		int a;
		cin >> a;
		if (a == 0)break;
		vector<int>b(a);
		for (int c = 0; c < a; c++) {
			cin >> b[c];
		}
		uint16_t e = 31;
		for (uint16_t f = 0; f < 6; f++){
			cout <<e<<endl;
			cout << size(b);
			e -= 5;
		}
		cout << 1 << endl << 0 << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: 'uint16_t' was not declared in this scope
   15 |                 uint16_t e = 31;
      |                 ^~~~~~~~
a.cc:3:1: note: 'uint16_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    2 | #include<vector>
  +++ |+#include <cstdint>
    3 | using namespace std;
a.cc:16:30: error: expected ';' before 'f'
   16 |                 for (uint16_t f = 0; f < 6; f++){
      |                              ^~
      |                              ;
a.cc:16:38: error: 'f' was not declared in this scope
   16 |                 for (uint16_t f = 0; f < 6; f++){
      |                                      ^
a.cc:17:32: error: 'e' was not declared in this scope
   17 |                         cout <<e<<endl;
      |                                ^
Language: C++

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

int main()
{
	while (1) {
		int a;
		cin >> a;
		if (a == 0)break;
		vector<int>b(a);
		for (int c = 0; c < a; c++) {
			cin >> b[c];
		}
		uint16_t e = 31;
		for (uint16_t f = 0; f < 6; f++){
			cout <<e<<endl;
			int k = size(b);
			cout << k;
			e -= 5;
		}
		cout << 1 << endl << 0 << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: 'uint16_t' was not declared in this scope
   15 |                 uint16_t e = 31;
      |                 ^~~~~~~~
a.cc:3:1: note: 'uint16_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    2 | #include<vector>
  +++ |+#include <cstdint>
    3 | using namespace std;
a.cc:16:30: error: expected ';' before 'f'
   16 |                 for (uint16_t f = 0; f < 6; f++){
      |                              ^~
      |                              ;
a.cc:16:38: error: 'f' was not declared in this scope
   16 |                 for (uint16_t f = 0; f < 6; f++){
      |                                      ^
a.cc:17:32: error: 'e' was not declared in this scope
   17 |                         cout <<e<<endl;
      |                                ^
Language: C++

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


#define MAX_N 1000000
int prime[MAX_N];//i番目の素数
bool is_prime[MAX_N+1];
int sieve(int n){
	int p=0;
	memset(is_prime,true,sizeof(is_prime));
	is_prime[0]=is_prime[1]=false;
	for(int i=2;i<=n;i++){
		if(is_prime[i]){
			prime[p++]=i;
			for(int j=2*i;j<=n;j+=i)is_prime[j]=false;
		}
	}
	return p;
}


int main(){
	int num=sieve(MAX_N),n;
	while(cin>>n&&n){
		int ans=0,x;
		int p,m;
		for(int i=0;i<n;i++){
			cin>>p>>m;
			x=upper_bound(prime,prime+num,p+m)-lower_bound(prime,prime+num,p-m);
			if(x==0)ans--;
			else ans+=x-1;
		}
		cout<<ans<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int sieve(int)':
a.cc:11:9: error: 'memset' was not declared in this scope
   11 |         memset(is_prime,true,sizeof(is_prime));
      |         ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<algorithm>
  +++ |+#include <cstring>
    3 | using namespace std;
Language: C++

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

vector<int>primes(1e8);
vector<int>sums(1e8 + 1);
void hurui(const int amax) {
	static bool flag = false;
	if (flag)return;
	vector<int>sos;
	sos = vector<int>(amax + 1, true);
	sos[0] = false; sos[1] = false;
	for (int i = 2; i <= amax; ++i) {
		if (sos[i]) {
			for (int j = 2 * i; j <= amax; j += i)sos[j] = false;
		}
	}
	for (int i = 0; i <= amax; ++i) {
		if (sos[i]) {
			primes[i] = true;
		}
	}
	flag = true;
}


int main() {
	hurui(999983);
	for (int i = 0; i < 1e7; ++i) {
		sums[i + 1] = sums[i] + primes[i + 1];
	}
	while (1) {
		int N; cin >> N;
		if (!N)break;
		long long int prize = 0;
		while (N--) {
			long long int p, m; cin >> p >> m;
			int amax = min(999983ll, p + m);
			int amin = max(0ll, p - m-1);
			const int aprize = sums[amax] - sums[amin];
			prize += aprize - 1;
		}
		cout << max(0,prize )<< endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:28: error: no matching function for call to 'max(int, long long int&)'
   42 |                 cout << max(0,prize )<< endl;
      |                         ~~~^~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 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:42:28: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   42 |                 cout << max(0,prize )<< endl;
      |                         ~~~^~~~~~~~~~
/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:
/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:42:28: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   42 |                 cout << max(0,prize )<< endl;
      |                         ~~~^~~~~~~~~~
Language: C++

using namespace std;
int M=1000001,n,p,m,c,S,i,j;
bool P[1000001];
int main(){
	for(i=2;i<M;i++)if(!P[i])for(j=i+i;j<M;j+=i)P[j]=1;
	P[0]=P[1]=1;
	while(cin>>n,n){
		for(S=0;n--;){
			cin>>p>>m;
			c=0; for(i=p-m>?0;i<=p+m&&i<M;)if(!P[i++])c++;
			S+=c>0?c-1:-1;
		}
		cout<<S<<endl;
	}
	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,n){
      |               ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:10:40: error: expected primary-expression before '?' token
   10 |                         c=0; for(i=p-m>?0;i<=p+m&&i<M;)if(!P[i++])c++;
      |                                        ^
a.cc:10:42: error: expected ':' before ';' token
   10 |                         c=0; for(i=p-m>?0;i<=p+m&&i<M;)if(!P[i++])c++;
      |                                          ^
      |                                          :
a.cc:10:42: error: expected primary-expression before ';' token
a.cc:13:17: error: 'cout' was not declared in this scope
   13 |                 cout<<S<<endl;
      |                 ^~~~
a.cc:13:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:26: error: 'endl' was not declared in this scope
   13 |                 cout<<S<<endl;
      |                          ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

#include<stdio.h>
#include<algorithm>
using namespace std;
int p[1000001];
int main(){
for(int i=0;i<1000001;i++)p[i]=1;
p[0]=p[1]=0;
for(int i=2;i<1000001;i++)
if(p[i])
for(int j=i+i;j<1000001;j+=i)
p[j]=0;
for(int i=1;i<1000001;i++)p[i]+=p[i-1];
int a;while(scanf("%d",&a),a){
long long r=0;
while(a--){
int b,c;
scanf("%d%d",&b,&c);
r+=p[min(b+c,1000000)]-p[max(0,b-c-1)]-1;
}printf("%lld\n",r);}}
}
}

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

#include<iostream>
#include<algorithm>
#define INF (long long)1000001
using namespace std;
int main(){
	int SOSU[INF];
	fill(SOSU,SOSU+INF,1);
	for(int i=2;i<INF;i++){
		if(SOSU[INF]==1){
			for(int j=i+i;j<INF;j+=i) SOSU[j] = 0;
		}
	}
	for(int i=2;i<INF;i++) SOSU[i] += SOSU[i-1];

	long long a,sum,b,c;
	while(cin >> a && a){
		sum = 0;
		while(a--){
			cin >> b >> c;
			sum += p[min(b+c,INF-1)]-p[max(0,b-c-1)]+1;
		}
		cout << sum << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:32: error: 'p' was not declared in this scope
   20 |                         sum += p[min(b+c,INF-1)]-p[max(0,b-c-1)]+1;
      |                                ^
a.cc:20:55: error: no matching function for call to 'max(int, long long int)'
   20 |                         sum += p[min(b+c,INF-1)]-p[max(0,b-c-1)]+1;
      |                                                    ~~~^~~~~~~~~
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:20:55: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   20 |                         sum += p[min(b+c,INF-1)]-p[max(0,b-c-1)]+1;
      |                                                    ~~~^~~~~~~~~
/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:2:
/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:20:55: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   20 |                         sum += p[min(b+c,INF-1)]-p[max(0,b-c-1)]+1;
      |                                                    ~~~^~~~~~~~~
Language: C

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

#define MAX 50
#define EPS 10e-5


int main(void)
{
	int n1,n2;
	int i;
	int angle;
	float s1,s2;

	while(1){
		scanf("%d",&n1);
		if(n1 == 0){ break; }
		for(i=0;i<n1-1;i++){
			scanf("%d",&angle);
			s1 += sin((float)angle/180.0*3.141592*2.0);
		}
		scanf("%d",&n2);
		if(n2 == 0){ break; }
		for(i=0;i<n2-1;i++){
			scanf("%d",&angle);
			s1 += sin((float)angle/180.0*3.141592*2.0);
		}
		
		if(s1 > s2-EPS && si < s2+EPS ){
			printf("0\n");
		}
		else if(s1 > s2){
			printf("1\n");		
		}
		else{
			printf("2\n");		
		}
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:29:35: error: 'si' undeclared (first use in this function); did you mean 's2'?
   29 |                 if(s1 > s2-EPS && si < s2+EPS ){
      |                                   ^~
      |                                   s2
main.c:29:35: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <iostream>

using namespace std;

#define PI 3.1415926535

int main() {
	int n, m;
	while(cin >> n) {
		if (n == 0) {
			break;
		}
		int counter = 360;
		int a;
		double men1 = 0.0;
		for (int i = 0; i < n-1; i++) {
			cin >> a;
			men1 += 0.5*1.0*1.0*sin(((double)a/360.0)*PI*2.0);
			counter -= a;
		}
		men1 += 0.5*1.0*1.0*sin(((double)a/360.0)*PI*2.0);
		cin >> m;
		counter = 360;
		double men2 = 0.0;
		for (int i = 0; i < m-1; i++) {
			cin >> a;
			men2 += 0.5*1.0*1.0*sin(((double)a/360.0)*PI*2.0);
			counter -= a;
		}
		men2 += 0.5*1.0*1.0*sin(((double)a/360.0)*PI*2.0);
		if (men1 == men2) {
			cout << 0 << endl;
		} else if (men1 > men2){
			cout << 1 << endl;
		} else {
			cout << 2 << endl;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:45: error: 'sin' was not declared in this scope
   18 |                         men1 += 0.5*1.0*1.0*sin(((double)a/360.0)*PI*2.0);
      |                                             ^~~
a.cc:21:37: error: 'sin' was not declared in this scope
   21 |                 men1 += 0.5*1.0*1.0*sin(((double)a/360.0)*PI*2.0);
      |                                     ^~~
Language: C++

#define Z(V) for(v=360,m=g();--m;V+=sin(x*z))v-=x=g();V+=sin(v*z)
a;g(){scanf("%d",&a);a?a:exit();}main(m,v,x){for(;;){float s=0,t=0,z=.02,e=.000001;Z(s);Z(t);puts(s>t+e?"1":s+e<t?"2":"0");}}

Compiler output:
a.cc:2:1: error: 'a' does not name a type
    2 | a;g(){scanf("%d",&a);a?a:exit();}main(m,v,x){for(;;){float s=0,t=0,z=.02,e=.000001;Z(s);Z(t);puts(s>t+e?"1":s+e<t?"2":"0");}}
      | ^
a.cc:2:3: error: ISO C++ forbids declaration of 'g' with no type [-fpermissive]
    2 | a;g(){scanf("%d",&a);a?a:exit();}main(m,v,x){for(;;){float s=0,t=0,z=.02,e=.000001;Z(s);Z(t);puts(s>t+e?"1":s+e<t?"2":"0");}}
      |   ^
a.cc: In function 'int g()':
a.cc:2:19: error: 'a' was not declared in this scope
    2 | a;g(){scanf("%d",&a);a?a:exit();}main(m,v,x){for(;;){float s=0,t=0,z=.02,e=.000001;Z(s);Z(t);puts(s>t+e?"1":s+e<t?"2":"0");}}
      |                   ^
a.cc:2:7: error: 'scanf' was not declared in this scope
    2 | a;g(){scanf("%d",&a);a?a:exit();}main(m,v,x){for(;;){float s=0,t=0,z=.02,e=.000001;Z(s);Z(t);puts(s>t+e?"1":s+e<t?"2":"0");}}
      |       ^~~~~
a.cc:2:26: error: 'exit' was not declared in this scope
    2 | a;g(){scanf("%d",&a);a?a:exit();}main(m,v,x){for(;;){float s=0,t=0,z=.02,e=.000001;Z(s);Z(t);puts(s>t+e?"1":s+e<t?"2":"0");}}
      |                          ^~~~
a.cc:1:1: note: 'exit' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
  +++ |+#include <cstdlib>
    1 | #define Z(V) for(v=360,m=g();--m;V+=sin(x*z))v-=x=g();V+=sin(v*z)
a.cc:2:33: warning: no return statement in function returning non-void [-Wreturn-type]
    2 | a;g(){scanf("%d",&a);a?a:exit();}main(m,v,x){for(;;){float s=0,t=0,z=.02,e=.000001;Z(s);Z(t);puts(s>t+e?"1":s+e<t?"2":"0");}}
      |                                 ^
a.cc: At global scope:
a.cc:2:38: error: expected constructor, destructor, or type conversion before '(' token
    2 | a;g(){scanf("%d",&a);a?a:exit();}main(m,v,x){for(;;){float s=0,t=0,z=.02,e=.000001;Z(s);Z(t);puts(s>t+e?"1":s+e<t?"2":"0");}}
      |                                      ^
Language: C++

#include<math.h>
n,t,r;
float S;
main(i){
	for(;scanf("%d",&n),n;i=-i){
		r=360;
		for(;--n;){
			scanf("%d",&t);
			r-=t;
			S+=sin(t*M_PI/180)*i;
		}
		S+=sin(r*M_PI/180)*i;
		if(i<0){
			puts(fabs(S)>1e-6?S>0?"1":"2":"0");
			S=0;
		}
	}
	exit(0);
}

Compiler output:
a.cc:2:1: error: 'n' does not name a type
    2 | n,t,r;
      | ^
a.cc:4:5: error: expected constructor, destructor, or type conversion before '(' token
    4 | main(i){
      |     ^
Language: C++

#include <iostream>
#include<cmath>
 
using namespace std;
 
double EPS = 1e-10;
double pi = 3.1415926535;
 
double calc(int x) {
  return sin((double)x*pi/180.0);
}
  
 
int main(void){

  int n,m;
   
  while( cin >> n , n ){

    doubles1 = 0, s2 = 0, angle, c = 360;
    
    for( int i = 0 ; i < n - 1 ; i++ ){
      cin >> angle;
      c -= angle;
      s1 += calc(angle);
    }
    s1 += calc(c);

    cin >> m;
    s = 360;

    for( int j = 0 ; j < m - 1 ; j++ ){
      cin >> angle;
      c -= angle;
      s2 += calc(angle);
    }
    s2 += calc(c);

    if( s1 > s2 + EPS ) cout << 1 << endl;
    else if( s1 + EPS < s2 ) cout << 2 << endl;
    else cout << 0 << endl;
  }
 
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:5: error: 'doubles1' was not declared in this scope; did you mean 'double_t'?
   20 |     doubles1 = 0, s2 = 0, angle, c = 360;
      |     ^~~~~~~~
      |     double_t
a.cc:20:19: error: 's2' was not declared in this scope
   20 |     doubles1 = 0, s2 = 0, angle, c = 360;
      |                   ^~
a.cc:20:27: error: 'angle' was not declared in this scope
   20 |     doubles1 = 0, s2 = 0, angle, c = 360;
      |                           ^~~~~
a.cc:20:34: error: 'c' was not declared in this scope
   20 |     doubles1 = 0, s2 = 0, angle, c = 360;
      |                                  ^
a.cc:25:7: error: 's1' was not declared in this scope; did you mean 'y1'?
   25 |       s1 += calc(angle);
      |       ^~
      |       y1
a.cc:27:5: error: 's1' was not declared in this scope; did you mean 'y1'?
   27 |     s1 += calc(c);
      |     ^~
      |     y1
a.cc:30:5: error: 's' was not declared in this scope
   30 |     s = 360;
      |     ^
Language: Java

import java.util.Scanner;

public class AOJ0167 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while(true){
			int n = sc.nextInt();
			if(n==0)break;
			int[] a = new int[n];
			for(int i=0;i<n;i++)a[i]=sc.nextInt();
			int s = 0;
			for(int j=n-1;j>=1;j--){
				for(int i=0;i<j;i++){
					if(a[i+1]<a[i]){
						int t = a[i];
						a[i]=a[i+1];
						a[i+1]=t;
						s++;
					}
				}
			}
			System.out.println(s);
		}
	}
}

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