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


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

int check(vector<int> v) {
	sort(v.begin(), v.end());
	//for (int i = 0; i < v.size(); i++)cout << v[i] << "  ";
	if ((v[0] == v[1] && v[1] == v[2] && v[2]== v[3]) || (v[1] == v[2] && v[2]== v[3] && v[3] == v[4])) {//four cards
		return 1;
	}
	else if (((v[0] == v[1] && v[1] == v[2]) && (v[3] == v[4])) || ((v[0] == v[1]) && (v[2] == v[3] && v[3] == v[4]))) {//full house
		return 2;
	}
	else if (v[0] == v[1] - 1 && v[0] == v[2] - 2 && v[0] == v[3] - 3 && v[0] == v[4] - 4) {//straight
		return 3;
	}
	else if (v[0]==1 && v[1]==10 && v[2]==11 && v[3] == 12 && v[4] == 13) {//straight
		return 3;
	}
	else if (((v[0] == v[1] && v[1] == v[2]) || (v[1] == v[2] && v[2] == v[3])) || ((v[2] == v[3] && v[3] == v[4]))) {//three cards
		return 4;
	}
	else if ((v[0] == v[1] && v[2] == v[3]) || (v[0] == v[1] && v[3] == v[4]) || (v[1] == v[2] && v[3] == v[4])) {//two pair
		return 5;
	}
	else if ((v[0] == v[1]) || (v[1] == v[2]) || (v[2] == v[3]) || (v[3] == v[4])) {//one pair
		return 6;
	}
	else {
		return 7;
	}
}


int main()
{
	vector<int> v;
	int a, b, c, d, e;
	while (scanf_s("%d,%d,%d,%d,%d", &a, &b, &c, &d, &e) != EOF) {
		v.clear();
		v.push_back(a);
		v.push_back(b);
		v.push_back(c);
		v.push_back(d);
		v.push_back(e);
		switch (check(v)) {
			case 1:cout << "four cards" << endl; break;
			case 2:cout << "full house" << endl; break;
			case 3:cout << "straight" << endl; break;
			case 4:cout << "three card" << endl; break;
			case 5:cout << "two pair" << endl; break;
			case 6:cout << "one pair" << endl; break;
			case 7:cout << "null" << endl; break;
			default:cout << "Error" << endl; break;
		}
	}
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   42 |         while (scanf_s("%d,%d,%d,%d,%d", &a, &b, &c, &d, &e) != EOF) {
      |                ^~~~~~~
      |                scanf
Language: C++

while 1:
	try: p=sorted(list(map(int,input().split(','))))
	except: break
	if (p[0] == p[3]) or (p[1] == p[4]): 
		print('four card')
	elif p[0] == p[2] or p[1] == p[3] or p[2] == p[4]:
		print('three card')
	elif (p[0] == p[1] == p[2] and p[3] == p[4]) or (p[0] == [1] and p[2] == p[3] == p[4]):
		print('full house')
	elif (p[0] == p[1] and p[2] == p[3]) or (p[1] == p[2] and p[3] == p[4]):
		print('two pair')
	elif p[0] == p[1] or p[1] == p[2] or p[3] == p[4]:
		print('one pair')
	elif p[0] == p[1]-1 and p[1] == p[2]-1 and p[2] == p[3]-1 and p[3] == p[4]-1 and p[4] == p[3]+1:
		print('straight')
	elif p[0] == 1 and p[1] == 10 and p[2] == 11 and p[3] == 12 and p[4] == 13:
		print('straight')
	else:
		print('null')


Compiler output:
a.cc:5:23: warning: multi-character literal with 9 characters exceeds 'int' size of 4 bytes
    5 |                 print('four card')
      |                       ^~~~~~~~~~~
a.cc:7:23: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes
    7 |                 print('three card')
      |                       ^~~~~~~~~~~~
a.cc:9:23: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes
    9 |                 print('full house')
      |                       ^~~~~~~~~~~~
a.cc:11:23: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   11 |                 print('two pair')
      |                       ^~~~~~~~~~
a.cc:13:23: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   13 |                 print('one pair')
      |                       ^~~~~~~~~~
a.cc:15:23: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   15 |                 print('straight')
      |                       ^~~~~~~~~~
a.cc:17:23: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   17 |                 print('straight')
      |                       ^~~~~~~~~~
a.cc:19:23: warning: multi-character character constant [-Wmultichar]
   19 |                 print('null')
      |                       ^~~~~~
a.cc:1:1: error: expected unqualified-id before 'while'
    1 | while 1:
      | ^~~~~
Language: C++

#include<iostream>
#include<array>
int main()
{
	while (true)
	{
		int a, b, c, d, e;
		char foo;
		std::cin >> a >> foo >> b >> foo >> c >> foo >> d >> foo >> e;
		if (std::cin.eof())
		{
			break;
		}
		std::array<int, 5>num = { a,b,c,d,e };
		std::sort(num.begin(), num.end());
		if (num[0] == num[3] || num[1] == num[4])
		{
			std::cout << "four card" << std::endl;
		}
		else if (num[0] == num[1] && num[2] == num[4] || num[0] == num[2] && num[3] == num[4])
		{
			std::cout << "full house" << std::endl;
		}
		else if (num[2] == num[1] + 1 && num[3] == num[1] + 2 && num[4] == num[1] + 3 && (num[0] == num[1] - 1 || num[0] == 1 && num[1] == 10))
		{
			std::cout << "straight" << std::endl;
		}
		else if (num[0]==num[2]||num[1]==num[3]||num[2]==num[4])
		{
			std::cout << "three card" << std::endl;
		}
		else
		{
			int pair = 0;
			for (int i = 0; i < 4; i++)
			{
				if (num[i] == num[i + 1])
				{
					pair++;
				}
			}
			switch (pair)
			{
			case 2:
				std::cout << "two pair" << std::endl;
				break;
			case 1:
				std::cout << "one pair" << std::endl;
				break;
			case 0:
				std::cout << "null" << std::endl;
				break;
			}
		}
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:22: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
   15 |                 std::sort(num.begin(), num.end());
      |                      ^~~~
      |                      qsort
Language: C++

#include<iostream>
#include<stdio.h>
#include<vector>
#include<utility>
#include<queue>
#include<math.h>
#include<string>
#include<stack>
#include<typeinfo>
using namespace std;
typedef pair<int, int> P;
int main() {
	char ch, straight, four, three, twop, onep;
	int check[5] = { 1,10,11,12,13 }, st = 0;
	int card[5];	while (cin >> card[0] >> ch >> card[1] >> ch >> card[2] >> ch >> card[3] >> ch >> card[4]) {
		int cnt[14] = { 0 };
		sort(card, card + 5);
		four = false;
		three = false;
		twop = false;
		onep = false;
		straight = true;
		st = 0;
		for (int i = 0; i < 5; ++i) {
			if (i != 0 && card[i - 1] + 1 != card[i])straight = false;
			if (card[i] == check[i])st++;
			cnt[card[i]]++;
		}
		if (st == 5)straight = true;
		for (int i = 0; i < 5; ++i) {
			if (i != 0 && card[i - 1] == card[i])continue;
			if (cnt[card[i]] == 4) {
				four = true;
				break;
			}
			else if (cnt[card[i]] == 3) three = true;
			else if (cnt[card[i]] == 2 && onep)twop = true;
			else if (cnt[card[i]] == 2)onep = true;
		}

		if (four)cout << "four card" << endl;
		else if (onep&&three)cout << "full house" << endl;
		else if (straight)cout << "straight" << endl;
		else if (three)cout << "three card" << endl;
		else if (twop)cout << "two pair" << endl;
		else if (onep)cout << "one pair" << endl;
		else cout << "null" << endl;


	}
	return 0;
}


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

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

int a[5];

bool isStraight(){
	vector<int> n;
	for(int i=0 ; i<5 ; i++){
		n.push_back(a[i]);
	}
	sort( n.begin(), n.end() );
	if( n[0]+1 == n[1] && n[1]+1 == n[2] && n[2]+1 == n[3] && n[3]+1 == n[4]){
		return true;
	}
	if( n[0]==1 && n[1]==10 && n[2]==11 && n[3]==12 && n[4]==13){
		return true;
	}
	return false;
}

string checkCard(){
	int n, count, c[5];
	int c2=0, c3=0, c4=0;

	for(int j=0 ; j<5 ; j++){
		count = 0;
		n = a[j];
		for(int i=0 ; i<5 ; i++){
			if(a[i]==n)count++;
		}
		c[j] = count;
	}
	for(int i=0 ; i<5 ; i++){
		if(c[i]==2)c2++;
		if(c[i]==3)c3++;
		if(c[i]==4)c4++;
	}
	if(c4==4) return "four card";
	else if(c3==3 && c2==2) return "full house";
	else if( isStraight() ) return "straight";
	else if(c3==3) return "three card";
	else if(c2==4) return "two pair";
	else if(c2==2) return "one pair";
	else return "null";
}

int main(){
	
	while( scanf("%d,%d,%d,%d,%d", &a[0], &a[1], &a[2], &a[3], &a[4] ) != EOF ){
		cout << checkCard() << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'bool isStraight()':
a.cc:13:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   13 |         sort( n.begin(), n.end() );
      |         ^~~~
      |         short
Language: C++

#include <iostream>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;

int a[5];

bool isStraight(){
	vector<int> n;
	for(int i=0 ; i<5 ; i++){
		n.push_back(a[i]);
	}
	sort( n.begin(), n.end() );
	if( n[0]+1 == n[1] && n[1]+1 == n[2] && n[2]+1 == n[3] && n[3]+1 == n[4]){
		return true;
	}
	if( n[0]==1 && n[1]==10 && n[2]==11 && n[3]==12 && n[4]==13){
		return true;
	}
	return false;
}

string checkCard(){
	int n, count, c[5];
	int c2=0, c3=0, c4=0;

	for(int j=0 ; j<5 ; j++){
		count = 0;
		n = a[j];
		for(int i=0 ; i<5 ; i++){
			if(a[i]==n)count++;
		}
		c[j] = count;
	}
	for(int i=0 ; i<5 ; i++){
		if(c[i]==2)c2++;
		if(c[i]==3)c3++;
		if(c[i]==4)c4++;
	}
	if(c4==4) return "four card";
	else if(c3==3 && c2==2) return "full house";
	else if( isStraight() ) return "straight";
	else if(c3==3) return "three card";
	else if(c2==4) return "two pair";
	else if(c2==2) return "one pair";
	else return "null";
}

int main(){
	string str;
	char s[80];
	while( scanf("%d,%d,%d,%d,%d", &a[0], &a[1], &a[2], &a[3], &a[4] ) != EOF ){
		str = checkCard();
		printf("%s\n",str.c_str());
	}
	return 0;
}

Compiler output:
a.cc: In function 'bool isStraight()':
a.cc:14:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   14 |         sort( n.begin(), n.end() );
      |         ^~~~
      |         short
Language: C++

#include <stdio.h>

int compare_int (const void* a,const void* b) {

  return (*(int*)a-*(int*)b);

}

int main(void) {

  int hand[5];
  
  int overlap[5];
  int used[5];

  int count;
  int full_or_three=-1;
  int two_or_one=-1;
  int temp;
  int i,j,k,l,m=0;

  char c;

  while(scanf("%d,%d,%d,%d,%d",&hand[0],&hand[1],&hand[2],&hand[3],&hand[4])!=EOF) {

    //sort current hand
    qsort(hand,sizeof(hand)/sizeof(hand[0]),sizeof(int),compare_int);

    //for(i=0;i<5;i++) printf("%d ",hand[i]);
  
    //count overlapped cards
    count=0;

    for(i=0;i<5;i++) {

      overlap[i]=0;
      used[i]=0;
    }

    for(i=0;i<4;i++) {

      if(used[i]==1) continue;
    
      for(j=i+1;j<5;j++) {

	if(used[j]==0 && hand[i]==hand[j]) {

	  overlap[count]++;

	  used[i]=used[j]=1;

	}

      }

      used[i]=1;

      count++;

    }

    //for(i=0;i<5;i++) printf("%d ",overlap[i]);

    //check overlapped cards
  
    //four card?
    for(i=0;i<5;i++) {

      if(overlap[i]==3) {

	printf("four card\n");

	goto Terminate;
      
      }

    }

    //full house or three card?
    for(i=0;i<5;i++) {
    
      if(overlap[i]==2) {

	for(j=0;j<5;j++) {

	  if(overlap[j]==1) {

	    printf("full house\n");

	    goto Terminate;

	  }

	}

	printf("three card\n");

	goto Terminate;

      }

    }

    if(full_or_three==1) {

      for(i=0;i<5;i++) {

	if(overlap[i]==1) {

	  printf("full house\n");

	  goto Terminate;

	}

	else {

	  printf("three card\n");

	  goto Terminate;

	}

      }

    }

    //straight?
    if(hand[0]+1==hand[1] && hand[1]+1==hand[2] && hand[2]+1==hand[3] && hand[3]+1==hand[4] || (hand[0]==1 && hand[1]==10 && hand[2]==11 && hand[3]==12 && hand[4]==13)) {

      printf("straight\n");

      goto Terminate;

    }

    //two pair or one pair?
    for(i=0;i<4;i++) {

      if(overlap[i]==1) {

	for(j=i+1;j<5;j++) {

	  if(overlap[j]==1) {

	    printf("two pair\n");

	    goto Terminate;

	  }

	}

	printf("one pair\n");

	goto Terminate;

      }

    }

    //null
    printf("null\n");

  Terminate:
    continue;

  }

  return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:5: error: 'qsort' was not declared in this scope
   27 |     qsort(hand,sizeof(hand)/sizeof(hand[0]),sizeof(int),compare_int);
      |     ^~~~~
Language: C++

#include<iostream>
#include<cstdio>
#include<stdlib>
using namespace std;
int max(const void* x,const void* y);
int main(){
	for(;;){
		int hand[5];
		if(scanf("%d,%d,%d,%d,%d",&hand[0],&hand[1],&hand[2],&hand[3],&hand[4]) == EOF){break;}
		qsort(hand,5,sizeof(int),max);
		int f = 0;
		for(int i=0; i<5; i++){
			if(hand[i] == hand[i+1] && hand[i+1] == hand[i+2] && hand[i+2] == hand[i+3]){f = 1;i+=3;}
			else if(hand[i] == hand[i+1] && hand[i+1] == hand[i+2]){f += 2;i+=2;}
			else if(hand[i] == hand[i+1]){f += 3;i+=1;}
		}
		if(hand[0]+1 == hand[1] && hand[1]+1 == hand[2] && hand[2]+1 == hand[3] && hand[3]+1 == hand[4]){f = 10;}
		if(hand[0] == 1 && hand[1] == 10 && hand[2] == 11 && hand[3] == 12 && hand[4] == 13){f = 10;}
		if(f == 1){cout <<"four card"<<endl;}
		else if(f == 2){cout <<"three card"<<endl;}
		else if(f == 3){cout <<"one pair"<<endl;}
		else if(f == 6){cout <<"two pair"<<endl;}
		else if(f == 5){cout <<"full house"<<endl;}
		else if(f == 10){cout <<"straight"<<endl;}
		else if(f == 0){cout <<"null"<<endl;}
	}
	return 0;
}
int max(const void* x,const void* y){
	return *(int*)x - *(int*)y;
}

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

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

using namespace std;

int main(void){
  int x[5],card[14],fg[5],i;
  vector<int>y;
  while(~scanf("%d,%d,%d,%d,%d"
	       ,&x[0],&x[1],&x[2],&x[3],&x[4])){
    
    memset(card,0,sizeof(card));
    memset(fg,0,sizeof(fg));


    for(i=0;i<5;i++)card[x[i]]++;

    for(i=1;i<14;i++){
      if(card[i]==2 && fg[0]==0)fg[0]=1;
      else if(card[i]==2 && fg[0]==1){
	fg[0]=0;
	cout <<"two pair" << endl;
	fg[2]=1;
	break;
      }
      else if(card[i]==3 && fg[0]!=1)fg[3]=1;
      else if(card[i]==3 && fg[0]==1){
	fg[0]=0;
	cout << "full house" << endl;
	fg[2]=1;
	break;
      }
      else if(card[i]==4){
	cout << "four card" << endl;
	fg[2]=1;
	break;
      }
    }
    if(fg[0]==1){
      cout << "one pair" << endl;
      fg[2]=1;
    }
    else if(fg[3]==1){
      cout << "three card" << endl;
      fg[2]=1;
    }
    
    for(i=0;i<5;i++)y.push_back(x[i]);
    sort(y.begin(),y.end());
 
    for(i=1;i<4;i++)if(y[i]+1!=y[i+1])fg[4]=1;

    if(!fg[4] && !fg[2]){
      cout << "straight" <<endl;
      fg[2]=1;
    }
    if(fg[2]==0)cout <<"null"<<endl;
    y.clear();
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:5: error: 'memset' was not declared in this scope
   14 |     memset(card,0,sizeof(card));
      |     ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include<cstdio>
  +++ |+#include <cstring>
    5 |
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
#include<cstdio>
#include<cstdlib>

using namespace std;

int main(void){
  int x[5],card[14],fg[5],i;
  vector<int>y;
  while(~scanf("%d,%d,%d,%d,%d"
	       ,&x[0],&x[1],&x[2],&x[3],&x[4])){
    
    memset(card,0,sizeof(card));
    memset(fg,0,sizeof(fg));


    for(i=0;i<5;i++)card[x[i]]++;

    for(i=1;i<14;i++){
      if(card[i]==2 && fg[0]==0)fg[0]=1;
      else if(card[i]==2 && fg[0]==1){
	fg[0]=0;
	cout <<"two pair" << endl;
	fg[2]=1;
	break;
      }
      else if(card[i]==3 && fg[0]!=1)fg[3]=1;
      else if(card[i]==3 && fg[0]==1){
	fg[0]=0;
	cout << "full house" << endl;
	fg[2]=1;
	break;
      }
      else if(card[i]==4){
	cout << "four card" << endl;
	fg[2]=1;
	break;
      }
    }
    if(fg[0]==1){
      cout << "one pair" << endl;
      fg[2]=1;
    }
    else if(fg[3]==1){
      cout << "three card" << endl;
      fg[2]=1;
    }
    
    for(i=0;i<5;i++)y.push_back(x[i]);
    sort(y.begin(),y.end());
 
    for(i=1;i<4;i++)if(y[i]+1!=y[i+1])fg[4]=1;

    if(!fg[4] && !fg[2]){
      cout << "straight" <<endl;
      fg[2]=1;
    }
    if(fg[2]==0)cout <<"null"<<endl;
    y.clear();
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: 'memset' was not declared in this scope
   15 |     memset(card,0,sizeof(card));
      |     ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    5 | #include<cstdlib>
  +++ |+#include <cstring>
    6 |
Language: C++

#include<iostream>
#include<string>
#include<algorithm>

using namespace std;

int main(void){
	
	string yaku[]={"one pair","two pair","three card","full house","four card","straight","null"};
	int tefuda[5],count[14];
	bool flag,straight;

	while(scanf("%d,%d,%d,%d,%d",&tefuda[0],&tefuda[1],&tefuda[2],&tefuda[3],&tefuda[4])!=EOF){
		
		flag=true;
		straight=true;
		
		memset(count,0,sizeof(count));
		//sort
		sort(tefuda,tefuda+5);
		//1-4 pair or fullhouse 
		for(int i=0;i<4;i++){
			for(int j=i+1;j<5;j++){
				if(tefuda[i]==tefuda[j]){
					count[tefuda[i]]++;
					flag=false;
				}	
			}
		}
		

		//straight
		if(flag){
			if(tefuda[0]==1 && tefuda[1]==2){
				for(int i=2;i<5;i++){
					if(tefuda[i]!=i+1){
						straight=false;
					}
				}
			}
			else if(tefuda[0]==1 && tefuda[4]==13){
				for(int i=1;i<4;i++){
					if(tefuda[i]!=i+9){
						straight=false;
					}
				}
			}
			else{
				for(int i=tefuda[0];i<5+tefuda[0];i++){
					if(tefuda[i-tefuda[0]]!=i){
						straight=false;
					}
				}	
			}
			
			if(straight){
				cout<<yaku[5]<<endl;	//straight
				//break;
			}
			else{
				cout<<yaku[6]<<endl;	//null
				//break;
			}
		}
		else{
			sort(count,count+14);
			if(count[13]==6){
				cout<<yaku[4]<<endl;
			}else if(count[12]==1 && count[13]==3){
				cout<<yaku[3]<<endl;
			}else if(count[12]==0 && count[13]==3){
				cout<<yaku[2]<<endl;
			}else if(count[12]==count[13]){
				cout<<yaku[1]<<endl;
			}else if(count[12]<2 && count[13]==1){
				cout<<yaku[0]<<endl;
			}
		}

	}
}

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

#include<cstdio>
#include<algorithm>

using namespace std;

int cards[5];
int card[14]={0};


int main()
{
	start:
	while(scanf("%d,%d,%d,%d,%d",&cards[0],&cards[1],&cards[2],&cards[3],&cards[4])!=EOF)
	{
		fill(card,card+14,0);
		for(int i=0;i<5;i++)
		{
			card[cards[i]-1]++;
			if(cards[i]==1)card[13]++;
		}
		for(int i=0;i<13;i++)
		{
			if(card[i]==4)
			{
				printf("four card\n");
				goto start;
			}
			if(card[i]==3)
			{
				for(int j=0;j<13;j++)
				{
					if(card[j]==2)
					{
						printf("full house\n");
					    goto start;
					}
				}
				printf("three card\n");
					goto start;
			}
		}
		int flag=0;
		for(int i=0;i<13;i++)
		{
			if(card[i]==2)flag++;
		}
		if(flag==2)
		{
			printf("two pair\n");
					goto start;
		}
		if(flag==1)
		{
			printf("one pair\n");
					goto start;
		}
		for(int i=0;i<14;i++)
		{
			int k=1;
			for(int j=0;j<5;j++)
			{
				k*=card[i+j];
			}
			if(k==1)
			{
				printf("straight\n");
				goto start;
			}
		}
		printf("null\n");
		goto start;
	}
　　　　return 0;
}

Compiler output:
a.cc:73:1: error: extended character 　 is not valid in an identifier
   73 | 　　　　return 0;
      | ^
a.cc:73:1: error: extended character 　 is not valid in an identifier
a.cc:73:1: error: extended character 　 is not valid in an identifier
a.cc:73:1: error: extended character 　 is not valid in an identifier
a.cc: In function 'int main()':
a.cc:73:1: error: '\U00003000\U00003000\U00003000\U00003000return' was not declared in this scope
   73 | 　　　　return 0;
      | ^~~~~~~~~~~~~~
Language: C++

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

int main(){
int c[6],s[6],ans=0;
string a[7]={"null","one pair","two pair","three card","straight","full 

house","four card"};
while(scanf("%d,%d,%d,%d,%d",&c[0],&c[1],&c[2],&c[3],&c[4])!=EOF){
ans=0;
for(int i=0;i<5;i++)s[i]=100;
s[0]=c[0];
for(int i=1;i<5;i++){
for(int j=i-1;j>-1;j--){
if(s[j]<=c[i]){
for(int k=i;k>j+1;k--)s[k]=s[k-1];
s[j+1]=c[i];
break;}}
if(s[0]>c[i]){
for(int k=i;k>0;k--)s[k]=s[k-1];
s[0]=c[i];}}
if(s[0]==s[1]||s[1]==s[2]||s[3]==s[4]||s[2]==s[3])ans=1;
if((s[0]==s[1]||s[1]==s[2])&&(s[2]==s[3]||s[3]==s[4]))ans=2;
if(s[0]==s[2]||s[1]==s[3]||s[2]==s[4])ans=3;
if(s[2]+1==s[3]&&s[1]+1==s[2]&&s[3]+1==s[4]&&(s[0]+1==s[1]||(s[0]==1&&s

[4]==13)))ans=4;
if((s[0]==s[2]&&s[3]==s[4])||(s[0]==s[1]&&s[2]==s[4]))ans=5;
if(s[0]==s[3]||s[1]==s[4])ans=6;

for(int i=0;i<7;i++){if(ans==i)cout<<a[i]<<endl;}

}

}

Compiler output:
a.cc:7:67: warning: missing terminating " character
    7 | string a[7]={"null","one pair","two pair","three card","straight","full
      |                                                                   ^
a.cc:7:67: error: missing terminating " character
    7 | string a[7]={"null","one pair","two pair","three card","straight","full
      |                                                                   ^~~~~ 
a.cc:9:18: warning: missing terminating " character
    9 | house","four card"};
      |                  ^
a.cc:9:18: error: missing terminating " character
    9 | house","four card"};
      |                  ^~~
a.cc: In function 'int main()':
a.cc:9:1: error: 'house' was not declared in this scope
    9 | house","four card"};
      | ^~~~~
a.cc:9:6: error: expected '}' before user-defined string literal
    9 | house","four card"};
      |      ^~~~~~~
a.cc:7:13: note: to match this '{'
    7 | string a[7]={"null","one pair","two pair","three card","straight","full
      |             ^
a.cc:9:6: error: expected ',' or ';' before user-defined string literal
    9 | house","four card"};
      |      ^~~~~~~
Language: C++

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

int main(){
int c[6],s[6],ans=0;
string a[7]={"null","one pair","two pair","three card","straight","full 

house","four card"};
while(scanf("%d,%d,%d,%d,%d",&c[0],&c[1],&c[2],&c[3],&c[4])){
ans=0;
for(int i=0;i<5;i++)s[i]=100;
s[0]=c[0];
for(int i=1;i<5;i++){
for(int j=i-1;j>-1;j--){
if(s[j]<=c[i]){
for(int k=i;k>j+1;k--)s[k]=s[k-1];
s[j+1]=c[i];
break;}}
if(s[0]>c[i]){
for(int k=i;k>0;k--)s[k]=s[k-1];
s[0]=c[i];}}
if(s[0]==s[1]||s[1]==s[2]||s[3]==s[4]||s[2]==s[3])ans=1;
if((s[0]==s[1]||s[1]==s[2])&&(s[2]==s[3]||s[3]==s[4]))ans=2;
if(s[0]==s[2]||s[1]==s[3]||s[2]==s[4])ans=3;
if(s[2]+1==s[3]&&s[1]+1==s[2]&&s[3]+1==s[4]&&(s[0]+1==s[1]||(s[0]==1&&s

[4]==13)))ans=4;
if((s[0]==s[2]&&s[3]==s[4])||(s[0]==s[1]&&s[2]==s[4]))ans=5;
if(s[0]==s[3]||s[1]==s[4])ans=6;

for(int i=0;i<7;i++){if(ans==i)cout<<a[i]<<endl;}

}

}

Compiler output:
a.cc:7:67: warning: missing terminating " character
    7 | string a[7]={"null","one pair","two pair","three card","straight","full
      |                                                                   ^
a.cc:7:67: error: missing terminating " character
    7 | string a[7]={"null","one pair","two pair","three card","straight","full
      |                                                                   ^~~~~ 
a.cc:9:18: warning: missing terminating " character
    9 | house","four card"};
      |                  ^
a.cc:9:18: error: missing terminating " character
    9 | house","four card"};
      |                  ^~~
a.cc: In function 'int main()':
a.cc:9:1: error: 'house' was not declared in this scope
    9 | house","four card"};
      | ^~~~~
a.cc:9:6: error: expected '}' before user-defined string literal
    9 | house","four card"};
      |      ^~~~~~~
a.cc:7:13: note: to match this '{'
    7 | string a[7]={"null","one pair","two pair","three card","straight","full
      |             ^
a.cc:9:6: error: expected ',' or ';' before user-defined string literal
    9 | house","four card"};
      |      ^~~~~~~
Language: C++

<?php

while (TRUE) {
    $c = fscanf(STDIN, '%d,%d,%d,%d,%d');
    if (feof(STDIN)) {
        break;
    }
    sort($c);
    $hash = array();
    $max = 0;
    foreach ($c as $v) {
        if (!isset($hash[$v])) {
            $hash[$v] = 0;
        }
        $hash[$v]++;
        $max = $hash[$v] > $max ? $hash[$v] : $max;
    }
    arsort($hash);
    $combo = 'null';
    if ($max >= 2) {
        $combo = 'one pair';
    }
    if ($max >= 2 && count($hash) <= 3) {
        $combo = 'two pair';
    }
    if ($max >= 3) {
        $combo = 'three card';
    }
    if (count($hash) === 5 && isStraight($c)) {
        $combo = 'straight';
    }
    if ($max >= 3 && count($hash) <= 2) {
        $combo = 'full house';
    }
    if ($max >= 4) {
        $combo = 'four card';
    }
    echo $combo . PHP_EOL;
}

function isStraight($cards) {
    if (max($cards) - min($cards) === 4) {
        return true;
    }
    if ($cards[0] === 1 && $cards[1] === 10 && $cards[4] === 13) {
        return true;
    }
    return false;
}

Compiler output:
a.cc:4:24: warning: multi-character literal with 14 characters exceeds 'int' size of 4 bytes
    4 |     $c = fscanf(STDIN, '%d,%d,%d,%d,%d');
      |                        ^~~~~~~~~~~~~~~~
a.cc:19:14: warning: multi-character character constant [-Wmultichar]
   19 |     $combo = 'null';
      |              ^~~~~~
a.cc:21:18: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   21 |         $combo = 'one pair';
      |                  ^~~~~~~~~~
a.cc:24:18: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   24 |         $combo = 'two pair';
      |                  ^~~~~~~~~~
a.cc:27:18: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes
   27 |         $combo = 'three card';
      |                  ^~~~~~~~~~~~
a.cc:30:18: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   30 |         $combo = 'straight';
      |                  ^~~~~~~~~~
a.cc:33:18: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes
   33 |         $combo = 'full house';
      |                  ^~~~~~~~~~~~
a.cc:36:18: warning: multi-character literal with 9 characters exceeds 'int' size of 4 bytes
   36 |         $combo = 'four card';
      |                  ^~~~~~~~~~~
a.cc:1:1: error: expected unqualified-id before '<' token
    1 | <?php
      | ^
a.cc:41:1: error: 'function' does not name a type; did you mean 'union'?
   41 | function isStraight($cards) {
      | ^~~~~~~~
      | union
Language: C++

#include <iostream>
#include <cstdio>

using namespace std;

int main(void){
  int i,j,k,l;
  int card[5];
  int poker_hand;
  bool flag;

  while(true){
    poker_hand=0;
    for(i=0;i<5;i++){
      if(scanf("%d,",&card[i])==EOF)return(0);
    }
    sort(card,card+5);
    for(i=0;i<4;i++){
      if(card[i]==card[i+1])poker_hand=1;
    }
    if(card[0]==card[1]&&card[2]==card[3])poker_hand=2;
    if(card[0]==card[1]&&card[3]==card[4])poker_hand=2;
    if(card[1]==card[2]&&card[3]==card[4])poker_hand=2;
    for(i=0;i<3;i++){
      if(card[i]==card[i+1]&&card[i]==card[i+2])poker_hand=3;
    }
    flag=true;
    for(i=1;i<5;i++){
      if(card[i]!=card[0]+i)flag=false;
    }
    if(flag)poker_hand=4;
    flag=true;
    if(card[0]==1&&card[1]==10){
      for(i=1;i<4;i++){
	if(card[i+1]!=card[1]+i)flag=false;
      }
    }else{
      flag=false;
    }
    if(flag)poker_hand=4;
    if(card[0]==card[1]&&card[0]==card[2]&&card[3]==card[4])poker_hand=5;
    if(card[0]==card[1]&&card[2]==card[3]&&card[2]==card[4])poker_hand=5;
    if(card[0]==card[3])poker_hand=6;
    if(card[1]==card[4])poker_hand=6;

    
    switch (poker_hand) {
      case 0:
	printf("null\n");
	break;
      case 1:
	printf("one pair\n");
	break;
      case 2:
	printf("two pair\n");
	break;
      case 3:
	printf("three card\n");
	break;
      case 4:
	printf("straight\n");
	break;
      case 5:
	printf("full house\n");
	break;
      case 6:
	printf("four card\n");
	break;
    }
  }
  return(0);
}

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

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

int Result(int cards[5]){
	int num_card[13];
	bool four=false, three=false, two=false;
	int	num_two=0;
	int min = 12,max = 0;

	for(int i=0;i<13;++i)num_card[i]=0;

	for(int i=0;i<5;++i){
		num_card[ cards[i] - 1 ] ++;
	}



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

		if(num_card[i]>0){
			if(i<min)min=i;
			if(i>max)max=i;

			if(num_card[i]==4)four=true;
			else if(num_card[i]==3)three=true;
			else if(num_card[i]==2){
				two=true;
				++num_two;
			}
		}
	}

	if(four)return 7;
	else if(three){
		if(two)return 6;
		else return 4;
	}
	else if(two){
		if(num_two == 2)return 3;
		else return 2;
	}

	if(max-min+1 == 5)
		return 5;

	return 1;
}

void toint(string s, int cards[5]){

	int m=0;


	for(int i=0;i<5;++i){
		int n=0;

		if(s[m]==',' || s[m]=='\0'){
			cards[i] = n;
			++m;
			continue;
		}

		n += n*10 + s[m]-'0';
		++m;
		--n;
	}
}

int main(){

	string s, res;
	int card[5] = {1,2,3,4,5};
	

	cin >> s;

	toint(s,card);

	switch Result(card){
		case 1:res="null";break;
		case 2:res="one pair";break;
		case 3:res="two pair";break;
		case 4:res="three card";break;
		case 5:res="straight";break;
		case 6:res="full house";break;
		case 7:res="four card";break;
	}

	

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:80:16: error: expected '(' before 'Result'
   80 |         switch Result(card){
      |                ^~~~~~
      |                (
Language: C++

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

int Result(int cards[5]){
	int num_card[13];
	bool four=false, three=false, two=false;
	int	num_two=0;
	int min = 12,max = 0;

	for(int i=0;i<13;++i)num_card[i]=0;

	for(int i=0;i<5;++i){
		num_card[ cards[i] - 1 ] ++;
	}



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

		if(num_card[i]>0){
			if(i<min)min=i;
			if(i>max)max=i;

			if(num_card[i]==4)four=true;
			else if(num_card[i]==3)three=true;
			else if(num_card[i]==2){
				two=true;
				++num_two;
			}
		}
	}

	if(four)return 7;
	else if(three){
		if(two)return 6;
		else return 4;
	}
	else if(two){
		if(num_two == 2)return 3;
		else return 2;
	}

	if(max-min+1 == 5)
		return 5;

	return 1;
}
int strtoint(char *s){
	int n=0;
	while(*s!='\0'){
		n += n*10 + *s - '0';
		s++;
	}
	return n;
}

void toint(char *s, int cards[5]){

	char *tp;

	tp = strtok(s,",");
	cards[0] = strtoint(tp);

	for(int i=1;i<5;++i){
		tp = strtok(NULL,",");
		cards[i] = strtoint(tp);

	}





}

int main(){

	char s[32];
	string res;
	int card[5];	

	cin >> s;

	toint(s,card);

	switch( Result(card) ){
		case 1:res="null";break;
		case 2:res="one pair";break;
		case 3:res="two pair";break;
		case 4:res="three card";break;
		case 5:res="straight";break;
		case 6:res="full house";break;
		case 7:res="four card";break;
	}

	cout << res;

	

	return 0;
}

Compiler output:
a.cc: In function 'void toint(char*, int*)':
a.cc:62:14: error: 'strtok' was not declared in this scope; did you mean 'strtoq'?
   62 |         tp = strtok(s,",");
      |              ^~~~~~
      |              strtoq
Language: Java

import java.util.Hashtable;
import java.util.Scanner;


public class AOJ_Volume0039 {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		Hashtable<Character,Integer> roman = new Hashtable<Character,Integer>();
		roman.put('I',1);
		roman.put('V',5);
		roman.put('X',10);
		roman.put('L',50);
		roman.put('C',100);
		roman.put('D',500);
		roman.put('M',1000);
		while(sc.hasNext()){
			char[] s = sc.nextLine().toCharArray();
			int ans = 0;
			for(int i=0;i<s.length-1;i++){
				if(roman.get(s[i]) >= roman.get(s[i+1])) ans += roman.get(s[i]);
				else ans -= roman.get(s[i]);
			}
			ans += roman.get(s[s.length - 1]);
			System.out.println(ans);
		}
	}
}

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

import java.io.*;

class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line;
while((line=br.readLine())!=null){
int ans=0:
char[] n=line.toCharArray();
int[] fig=new int[n.length];
for(int i=0;i<fig.length;i++){
fig[i]=toNum(n[i]);
}
for(int i=1;i<fig.length;i++){
if(fig[i-1]<fig[i]){
fig[i-1]*=-1;
}
}
for(int i=0;i<fig.length;i++){
ans+=fig[i];
}
}
static int toNum(char c){
switch(c){
case I: return 1;
case V: return 5;
case X: return 10;
case L: return 50;
case C: return 100;
case D: return 500;
case M: return 1000;
}
}
}

Compiler output:
Main.java:8: error: ';' expected
int ans=0:
         ^
Main.java:23: error: illegal start of expression
static int toNum(char c){
^
2 errors
Language: Java

import java.io.*;

class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line;
while((line=br.readLine())!=null){
int ans=0;
char[] n=line.toCharArray();
int[] fig=new int[n.length];
for(int i=0;i<fig.length;i++){
fig[i]=toNum(n[i]);
}
for(int i=1;i<fig.length;i++){
if(fig[i-1]<fig[i]){
fig[i-1]*=-1;
}
}
for(int i=0;i<fig.length;i++){
ans+=fig[i];
}
}
}
static int toNum(char c){
switch(c){
case I: return 1;
case V: return 5;
case X: return 10;
case L: return 50;
case C: return 100;
case D: return 500;
case M: return 1000;
}
}

Compiler output:
Main.java:34: error: reached end of file while parsing
}
 ^
1 error
Language: Java

import java.io.*;

class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line;
while((line=br.readLine())!=null){
int ans=0;
char[] n=line.toCharArray();
int[] fig=new int[n.length];
for(int i=0;i<fig.length;i++){
fig[i]=toNum(n[i]);
}
for(int i=1;i<fig.length;i++){
if(fig[i-1]<fig[i]){
fig[i-1]*=-1;
}
}
for(int i=0;i<fig.length;i++){
ans+=fig[i];
}
}
}
static int toNum(char c){
switch(c){
case I: return 1;
case V: return 5;
case X: return 10;
case L: return 50;
case C: return 100;
case D: return 500;
case M: return 1000;
}
}
}

Compiler output:
Main.java:26: error: cannot find symbol
case I: return 1;
     ^
  symbol:   variable I
  location: class Main
Main.java:27: error: cannot find symbol
case V: return 5;
     ^
  symbol:   variable V
  location: class Main
Main.java:28: error: cannot find symbol
case X: return 10;
     ^
  symbol:   variable X
  location: class Main
Main.java:29: error: cannot find symbol
case L: return 50;
     ^
  symbol:   variable L
  location: class Main
Main.java:30: error: cannot find symbol
case C: return 100;
     ^
  symbol:   variable C
  location: class Main
Main.java:31: error: cannot find symbol
case D: return 500;
     ^
  symbol:   variable D
  location: class Main
Main.java:32: error: cannot find symbol
case M: return 1000;
     ^
  symbol:   variable M
  location: class Main
7 errors
Language: Java

import java.io.*;

class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line;
while((line=br.readLine())!=null){
int ans=0;
char[] n=line.toCharArray();
int[] fig=new int[n.length];
for(int i=0;i<fig.length;i++){
fig[i]=toNum(n[i]);
}
for(int i=1;i<fig.length;i++){
if(fig[i-1]<fig[i]){
fig[i-1]*=-1;
}
}
for(int i=0;i<fig.length;i++){
ans+=fig[i];
}
}
}
static int toNum(char c){
switch(c){
case 'I': return 1;
case 'V': return 5;
case 'X': return 10;
case 'L': return 50;
case 'C': return 100;
case 'D': return 500;
case 'M': return 1000;
}
}
}

Compiler output:
Main.java:34: error: missing return statement
}
^
1 error
Language: Java

import java.io.*;

class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line;
while((line=br.readLine())!=null){
int ans=0;
char[] n=line.toCharArray();
int[] fig=new int[n.length];
for(int i=0;i<fig.length;i++){
fig[i]=toNum(n[i]);
}
for(int i=1;i<fig.length;i++){
if(fig[i-1]<fig[i]){
fig[i-1]*=-1;
}
}
for(int i=0;i<fig.length;i++){
ans+=fig[i];
}
}
}
static int toNum(char c){
int n;
switch(c){
case 'I': n=1;
          break;
case 'V': n=5;
          break;
case 'X': n=10;
          break;
case 'L': n=50;
          break;
case 'C': n=100;
          break;
case 'D': n=500;
          break;
case 'M': n=1000;
          break;
}
return n;
}
}

Compiler output:
Main.java:42: error: variable n might not have been initialized
return n;
       ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
 
class Main{
    public static void main(String args[]){
        BufferedReader reader = 
        		new BufferedReader(new InputStreamReader(System.in));
        
        String st = "";
        int[] a = new int[100];
        int sum;
        
        while (true){
        	try{
            st = reader.readLine();
        	}catch(IOException e){
        	}
        	sum = 0;
            
            for (int i = 0; i < st.length(); i++) {
                if (st.charAt(i) == 'I') a[i] = 1;
                if (st.charAt(i) == 'V') a[i] = 5;
                if (st.charAt(i) == 'X') a[i] = 10;
                if (st.charAt(i) == 'L') a[i] = 50;
                if (st.charAt(i) == 'C') a[i] = 100;
                if (st.charAt(i) == 'D') a[i] = 500;
                if (st.charAt(i) == 'M') a[i] = 1000;
                if (i != 0 && a[i - 1] < a[i]) {
                    a[i] -= a[i - 1];
                    a[i - 1] = 0;
                }
            }
            
            for (int i = 0; i < st.length(); i++) {
                sum += a[i];
            }
            
            System.out.println(sum);
        }
        try{
        	reader.close();
        }catch(IOException e){
        }
    }
}

Compiler output:
Main.java:41: error: unreachable statement
        try{
        ^
1 error
Language: Java

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

import javafx.scene.shape.Ellipse;

class Main {
    static String line;

    static String[] sx = { "XC", "XL", "XXX", "XX", "XIX", "XIV", "XIII", "XII", "XI", "XVIII", "XVII", "XVI", "XV",
            "X" };
    static int[] ix = { 90, 40, 30, 20, 19, 14, 13, 12, 11, 18, 17, 16, 15, 10 };

    static String[] sl = { "LXXX", "LXX", "LX", "L" };
    static int[] il = { 80, 70, 60, 50 };

    static String[] sv = { "VIII", "VII", "VI", "V" };
    static int[] iv = { 8, 7, 6, 5 };

    static String[] si = { "IX", "IV", "III", "II", "I" };
    static int[] ii = { 9, 4, 3, 2, 1 };

    static String[] so = { "M", "D", "C" };
    static int[] io = { 1000, 500, 100 };

    static String[] sss;
    static int[] iii;

    static int getValue() {
        setarr();

        for (int i = 0; i < sss.length; i++) {
            if (line.startsWith(sss[i])){
                line = line.replaceFirst(sss[i], "");
                return iii[i];
            }
        }

        return 0; // unreachable
    }

    static void setarr() {
        switch (line.charAt(0)) {
        case 'X':
            sss = sx;
            iii = ix;
            break;
        case 'L':
            sss = sl;
            iii = il;
            break;
        case 'V':
            sss = sv;
            iii = iv;
            break;
        case 'I':
            sss = si;
            iii = ii;
            break;
        default:
            sss = so;
            iii = io;
        }
    }

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

        while ((line = br.readLine()) != null) {
            int score = getValue();

            while (line.length() != 0) {
                int next = getValue();
                if (score >= next)
                    score += next;
                else
                    score = next-score;
            }

            System.out.println(score);
        }
    }
}


Compiler output:
Main.java:5: error: package javafx.scene.shape does not exist
import javafx.scene.shape.Ellipse;
                         ^
1 error
Language: Java

import java.util.Scanner;

public class AOJ0039 {
	int n;
	public static void main(String[] args) {
		//new AOJ0039().run();
		new Main().run();
	}
	
	void run(){
		Scanner sc=new Scanner(System.in);
		
		while(sc.hasNext()){
		String str=sc.next();
		n=str.length();
		System.out.println(roman(str.toCharArray(),0,0,0));
		}
	}
	//IVXLCDM
	int roman(char ch[],int i,int k,int sum){
		
		//System.out.println(i+" "+sum);
		
		if(i==n){
			return sum;
		}
		
		if(ch[i]=='I'){
			return roman(ch,i+1,1,sum+1);
		}else if(ch[i]=='V'){
			if(k<5){
				return roman(ch,i+1,5,sum+(5-k)-k);
			}
			return roman(ch,i+1,5,sum+5);
		}else if(ch[i]=='X'){
			if(k<10){
				return roman(ch,i+1,10,sum+(10-k)-k);
			}
			return roman(ch,i+1,10,sum+10);
		}else if(ch[i]=='L'){
			if(k<50){
				return roman(ch,i+1,50,sum+(50-k)-k);
			}
			return roman(ch,i+1,50,sum+50);
		}else if(ch[i]=='C'){
			if(k<100){
				return roman(ch,i+1,100,sum+(100-k)-k);
			}
			return roman(ch,i+1,100,sum+100);
		}else if(ch[i]=='D'){
			if(k<500){
				return roman(ch,i+1,500,sum+(500-k)-k);
			}
			return roman(ch,i+1,500,sum+500);
		}else if(ch[i]=='M'){
			if(k<1000){
				return roman(ch,i+1,1000,sum+(1000-k)-k);
			}
			return roman(ch,i+1,1000,sum+1000);
		}

		return -1;
	}
}

Compiler output:
Main.java:3: error: class AOJ0039 is public, should be declared in a file named AOJ0039.java
public class AOJ0039 {
       ^
Main.java:7: error: cannot access Main
		new Main().run();
		    ^
  bad source file: ./Main.java
    file does not contain class Main
    Please remove or make sure it appears in the correct subdirectory of the sourcepath.
2 errors
Language: Java

import java.io.*;
class Main
{
    public static void main(String args[])throws IOException
    {
	BufferedReader input=new BufferedReader(new InputStreamReader(System.in));
	String str;
	int a[]=new int[str.length()];
	while((str=input.readLine())!=null)
	    {
	String str_ary[]=new String[str.length()];
	
	for(int i=0;i<str.length();i++)
	    {
		str_ary[i]=""+str.charAt(i);
		if(str_ary[i].equals("I"))a[i]=1;
		if(str_ary[i].equals("V"))a[i]=5;
		if(str_ary[i].equals("X"))a[i]=10;
		if(str_ary[i].equals("L"))a[i]=50;
		if(str_ary[i].equals("C"))a[i]=100;
		if(str_ary[i].equals("D"))a[i]=500;
		if(str_ary[i].equals("M"))a[i]=1000;		
	    }
	int sum=0;
	
	for(int i=0;i<a.length-1;i+=2)
	    {
		
		if(a[i]>=a[i+1])sum+=a[i]+a[i+1];
		if(a[i]<a[i+1])sum+=a[i+1]-a[i];
		
	    }
	if(a.length%2!=0 && a[a.length-1]>a[a.length-2])sum+=a[a.length-1]-a[a.length-2];
	if(a.length%2!=0 && a[a.length-1]<a[a.length-2])sum+=a[a.length-1]+a[a.length-2];
	System.out.println(sum);
	    }
    }
}

Compiler output:
Main.java:8: error: variable str might not have been initialized
	int a[]=new int[str.length()];
	                ^
1 error
Language: C

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

int main(){
	string s;
	map<char,int>mp={
		{'I',1},
		{'V',5},
		{'X',10},
		{'L',50},
		{'C',100},
		{'D',500},
		{'M',1000}
	};
	while(cin>>s){
		int cnt=mp[s[0]],r=1;
		char back=s[0];
		if(i>1){
			for(int i=1;i<s.size();i++){
				if(back==s[i])r++;
			}
		}
		cout<<cnt<<endl;
	}
	return 0;	
}

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

n,l,t[256];
main(char r[]){
    t[73]=1;
    t[86]=5;
    t[88]=10;
    t[76]=50;
    t[67]=100;
    t[68]=500;
    t[77]=1000;
 
    for(;l=read(0,r,128);){
        n=t[r[l--]];
        for (;l--;){
            n+=t[r[l]*(t[r[l+1]]>t[r[i]]?-1:1);
        }
        printf("%d\n",n);
    }
    return (0);
}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | n,l,t[256];
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'l' [-Wimplicit-int]
    1 | n,l,t[256];
      |   ^
main.c:1:5: error: type defaults to 'int' in declaration of 't' [-Wimplicit-int]
    1 | n,l,t[256];
      |     ^
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(char r[]){
      | ^~~~
main.c: In function 'main':
main.c:11:12: error: implicit declaration of function 'read' [-Wimplicit-function-declaration]
   11 |     for(;l=read(0,r,128);){
      |            ^~~~
main.c:14:38: error: 'i' undeclared (first use in this function)
   14 |             n+=t[r[l]*(t[r[l+1]]>t[r[i]]?-1:1);
      |                                      ^
main.c:14:38: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:47: error: expected ']' before ';' token
   14 |             n+=t[r[l]*(t[r[l+1]]>t[r[i]]?-1:1);
      |                                               ^
      |                                               ]
main.c:14:48: error: expected ';' before '}' token
   14 |             n+=t[r[l]*(t[r[l+1]]>t[r[i]]?-1:1);
      |                                                ^
      |                                                ;
   15 |         }
      |         ~                                       
main.c:16:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   16 |         printf("%d\n",n);
      |         ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
  +++ |+#include <stdio.h>
    1 | n,l,t[256];
main.c:16:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   16 |         printf("%d\n",n);
      |         ^~~~~~
main.c:16:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

main()
{
    int t[256],n,l;
    char r[128];
 
    t[73] = 1;
    t[86] = 5;
    t[88] = 10;
    t[76] = 50;
    t[67] = 100;
    t[68] = 500;
    t[77] = 1000;
 
    for(;l=read(0,r,128);){
        n=t[r[--l]];
        for(;--l;){
            n+=t[r[l]]*(t[r[l+1]]>t[r[i]]?-1:1);
        }
        printf("%d\n", n);
    }
 
    return (0);
}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main()
      | ^~~~
main.c: In function 'main':
main.c:14:12: error: implicit declaration of function 'read' [-Wimplicit-function-declaration]
   14 |     for(;l=read(0,r,128);){
      |            ^~~~
main.c:17:39: error: 'i' undeclared (first use in this function)
   17 |             n+=t[r[l]]*(t[r[l+1]]>t[r[i]]?-1:1);
      |                                       ^
main.c:17:39: note: each undeclared identifier is reported only once for each function it appears in
main.c:19:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   19 |         printf("%d\n", n);
      |         ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
  +++ |+#include <stdio.h>
    1 | main()
main.c:19:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   19 |         printf("%d\n", n);
      |         ^~~~~~
main.c:19:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<stdio.h>

int main(){

	int i,j,moji[100]sum;
	char tmp[100];

	while(fgets(tmp,100,stdin)!=NULL){
		sum=0;
		i=0;
		while(tmp[i]!='\0'){
			if(tmp[i]=='I') moji[i]=1;
			else if(tmp[i]=='V') moji[i]=5;
			else if(tmp[i]=='X') moji[i]=10;
			else if(tmp[i]=='L') moji[i]=50;
			else if(tmp[i]=='C') moji[i]=100;
			else if(tmp[i]=='D') moji[i]=500;
			else if(tmp[i]=='M') moji[i]=1000;
			i++;
		}
		i--;
		for(j=i;j!=0;j--){
			if(moji[j]>moji[j-1]){
				sum+=moji[j]-moji[j-1];
			}
			else if(moji[j]<moji[j-1]){
				sum+=moji[j]+moji[j-1];
			}
		}
		printf("%d\n",sum);
	}







	return 0;

}

Compiler output:
main.c: In function 'main':
main.c:5:26: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'sum'
    5 |         int i,j,moji[100]sum;
      |                          ^~~
main.c:9:17: error: 'sum' undeclared (first use in this function)
    9 |                 sum=0;
      |                 ^~~
main.c:9:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:41: error: 'moji' undeclared (first use in this function)
   12 |                         if(tmp[i]=='I') moji[i]=1;
      |                                         ^~~~