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

#include<cstdio>
#include<iostream>

int main(void){
	int n,h,w,a[1000][1000],m,p[1000],q[1000];
	
	cin >> n;
	for(int i=0;i<n;i++){
		cin >> h >> w >> m ;
		for(int j=0;j<m;j++){
			cin>> p[j] >> q[j] ;
		}
		for(int x=0;x<=h;x++){
			for(int y=0;y<=w;y++){
				a[x][y]=0;
			}
		}
		a[0][1]=1;
		for(int x=1;x<=h;x++){
			for(int y=0;y<=w:y++){
				a[x][y]=a[x-1][y]+a[x][y-1];
				for(int g=0;g<m;g++){
					a[p[g]][q[g]]=0;
				}
			}
		}
		
		cout << a[h][w] ;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |         cin >> n;
      |         ^~~
      |         std::cin
In file included from a.cc:2:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:20:37: warning: range-based 'for' loops with initializer only available with '-std=c++20' or '-std=gnu++20' [-Wc++20-extensions]
   20 |                         for(int y=0;y<=w:y++){
      |                                     ^
a.cc:20:41: error: found ':' in nested-name-specifier, expected '::'
   20 |                         for(int y=0;y<=w:y++){
      |                                         ^
      |                                         ::
a.cc:20:40: error: 'w' is not a class, namespace, or enumeration
   20 |                         for(int y=0;y<=w:y++){
      |                                        ^
a.cc:26:17: error: expected primary-expression before '}' token
   26 |                 }
      |                 ^
a.cc:25:26: error: expected ';' before '}' token
   25 |                         }
      |                          ^
      |                          ;
   26 |                 }
      |                 ~         
a.cc:26:17: error: expected primary-expression before '}' token
   26 |                 }
      |                 ^
a.cc:25:26: error: expected ')' before '}' token
   25 |                         }
      |                          ^
      |                          )
   26 |                 }
      |                 ~         
a.cc:20:28: note: to match this '('
   20 |                         for(int y=0;y<=w:y++){
      |                            ^
a.cc:26:17: error: expected primary-expression before '}' token
   26 |                 }
      |                 ^
a.cc:28:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   28 |                 cout << a[h][w] ;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
	int k;
	cin >> k;
	for ( int l = 0; l < k; l++ ) {
		int gx, gy;
		cin >> gx >> gy;
		int a[17][17];
		int tate[17][16];
		int yoko[16][17];
		fill( a[0], a[17], 0 );
		fill( tate[0], tate[17], 0 );
		fill( yoko[0], yoko[16], 0 );
		a[1][1] = 1;
		int n;
		cin >> n;
		for ( int i = 0; i < n; i++ ) {
			int x1, y1, x2, y2;
			cin >> x1 >> y1 >> x2 >> y2;
			if ( x1 == x2 ) 
				tate[x1 + 1][y1 + 1] = 1;
			else
				yoko[x1 + 1][y1 + 1] = 1;
		}
		for ( i = 1; i < 17; i++ ) {
			for ( j = 1; j < 17; j++ ) {
				if ( tate[i][j - 1] == 0 )
					a[i][j] += a[i][j - 1];
				if ( yoko[i - 1][j] == 0 )
					a[i][j] += a[i - 1][j];
			}
		}
		cout << a[gx + 1][gy + 1] << endl;
	}
		
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:23: error: 'i' was not declared in this scope
   27 |                 for ( i = 1; i < 17; i++ ) {
      |                       ^
a.cc:28:31: error: 'j' was not declared in this scope
   28 |                         for ( j = 1; j < 17; j++ ) {
      |                               ^
Language: C++

#include <iostream>
using namespace std;

int main() {
	int k;
	cin >> k;
	for ( int l = 0; l < k; l++ ) {
		int gx, gy;
		cin >> gx >> gy;
		int a[17][17];
		int tate[17][16];
		int yoko[16][17];
		fill( a[0], a[17], 0 );
		fill( tate[0], tate[17], 0 );
		fill( yoko[0], yoko[16], 0 );
		a[1][1] = 1;
		int n;
		cin >> n;
		for ( int i = 0; i < n; i++ ) {
			int x1, y1, x2, y2;
			cin >> x1 >> y1 >> x2 >> y2;
			if ( x1 == x2 ) 
				tate[x1 + 1][y1 + 1] = 1;
			else
				yoko[x1 + 1][y1 + 1] = 1;
		}
		for ( i = 1; i < 17; i++ ) {
			for ( j = 1; j < 17; j++ ) {
				if ( tate[i][j - 1] == 0 )
					a[i][j] += a[i][j - 1];
				if ( yoko[i - 1][j] == 0 )
					a[i][j] += a[i - 1][j];
			}
		}
		if ( a[gx + 1][gy + 1] != 0 )
			cout << a[gx + 1][gy + 1] << endl;
		else
			cout << "Miserable Hokusai!" << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:23: error: 'i' was not declared in this scope
   27 |                 for ( i = 1; i < 17; i++ ) {
      |                       ^
a.cc:28:31: error: 'j' was not declared in this scope
   28 |                         for ( j = 1; j < 17; j++ ) {
      |                               ^
Language: C++



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

int A[128], n; 
int main() {
	while(cin >> n && n >0){
		A[0] = 0;
		A[1] = 1;
		A[2] = 2;
		for (int i=3; i<=n+10; ++i) {
			A[i] = A[i-1]+A[i-2]+A[i-3];
		}
		n = int((A[n]+9/10+364)/365)
	cout << n <<endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:45: error: expected ';' before 'cout'
   16 |                 n = int((A[n]+9/10+364)/365)
      |                                             ^
      |                                             ;
   17 |         cout << n <<endl;
      |         ~~~~
Language: C++



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

int A[128], n, a; 
int main() {
	while(cin >> n && n >0){
		A[0] = 0;
		A[1] = 1;
		A[2] = 2;
		for (int i=3; i<=n+10; ++i) {
			A[i] = A[i-1]+A[i-2]+A[i-3];
		}
		a = int((A[n]+9/10+364)/365)
	cout << a <<endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:45: error: expected ';' before 'cout'
   16 |                 a = int((A[n]+9/10+364)/365)
      |                                             ^
      |                                             ;
   17 |         cout << a <<endl;
      |         ~~~~
Language: C++

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


int I[17][17][17][17];
int dp[17][17];

int main() {
  int N;
  cin >> N;

  for(int times = 0; times < N; times++) {
    memset(I, 0, sizeof I);
    memset(dp, 0, sizeof dp);

    int W, H, p;
    cin >> W >> H >> p;

    for(int i = 0; i < p; i++) {
      int x1, y1, x2, y2;
      cin >> x1 >> y1 >> x2 >> y2;
      I[x1][y1][x2][y2] = 1;
      I[x2][y2][x1][y1] = 1;
    }

    dp[0][0] = 1;

    for(int x = 0; x <= W; x++) {
      for(int y = 0; y <= H; y++) {
        if(!I[x][y][x+1][y]) {
          dp[x+1][y] += dp[x][y];
        }

        if(!I[x][y][x][y+1]) {
          dp[x][y+1] += dp[x][y];
        }
      }
    }

    if(dp[W][H] == 0) {
      cout << "Miserable Hokusai!" << endl;
    } else {
      cout << dp[W][H] << endl;
    }
  }
}

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

#include<iostream>
#include<cstdlib>
using namespace std;
int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		int X,Y,N,x,y,z,w;
		cin>>X>>Y>>N;
		long a[31][31]={};
		for(int j=2;j<31;j+=2){
			a[j][0]=1;
			a[0][j]=1;
		}
		for(int j=0;j<N;j++){
			cin>>x>>y>>z>>w;
			if(x==0&&z==0){
				x=2x;
				y=2y;
				z=2z;
				w=2w;
				if((y-w)>0){
					for(int k=y;k<31;k+=2){
						a[k][0]=0;
					}
				}
				else{
					for(int k=w;k<31;k+=2){
						a[k][0]=0;
					}
				}
			}
			else if(y==0&&w==0){
				if((x-z)>0){
					for(int k=x;k<31;k+=2){
						a[0][k]=0;
					}
				}
				else{
					for(int k=z;k<31;k+=2){
						a[0][k]=0;
					}
				}
			}
			else  {
				a[(y+w)/2][(x+z)/2]=-1;
			}
		}
		
		for(int j=2;j<31;j+=2){
			for(int k=2;k<31;k+=2){
				if(a[j-1][k]=0)a[j][k]+=a[j-2][k];
				if(a[j][k-1])a[j][k]+=a[j][k-2];
			}
		}
		if(a[Y][X]!=0)cout<<a[Y][X]<<"\n";
		else cout<<"Miserable Hokusai!\n";
	}
	return 0;
}

Compiler output:
a.cc:20:35: warning: use of C++23 'make_signed_t<size_t>' integer constant
   20 |                                 z=2z;
      |                                   ^~
a.cc: In function 'int main()':
a.cc:18:35: error: unable to find numeric literal operator 'operator""x'
   18 |                                 x=2x;
      |                                   ^~
a.cc:19:35: error: unable to find numeric literal operator 'operator""y'
   19 |                                 y=2y;
      |                                   ^~
a.cc:21:35: error: unable to find numeric literal operator 'operator""w'
   21 |                                 w=2w;
      |                                   ^~
Language: C++

#include<iostream>
using namespace std;

int main(){
  int k;
  cin >> k;
  for(int i=0;i<k;i++){
    int gx,gy;
    cin >> gx >> gy;
    int p;
    cin >> p;
    int A[16][16][16][16]={};
    for (int j=0;j<p;j++){
      int a,b,c,d;
      cin >> a >> b>>c>>d;
      A[a][b][c][d] = 1;
    }
    int B[16][16]={};
    B[0][0] = 1;
    for(int j= 0;j<=gx;j++){
      for(int t=0;t<=gy;t++){
	if(j==0){
	  if(t!=0){
	    if(A[t-1][0][t][0]==0&&A[t][0][t-1][0]==0){
	      B[t][0] = B[t-1][0];
	    }
	  }
	}else{
	  if(t==0){
	    if(A[0][j-1][0][j]==0&&A[0][j][0][j-1]==0){
	      B[0][j]=B[0][j-1];
	    }
	  }else{
	    if(A[t][j-1][t][j]==0&&A[t][j][t][j-1]==0){
	      B[t][j]+=B[t][j-1];
	    }
	    if(A[t-1][j][t][j]==0&&A[t][j][t-1][j]==0){
	      B[t][j]+=B[t-1][j];
	    }
	  }
	}
    }
    if(B[gx][gy]==0){
      cout<<"Miserable Hokusai!"<<endl;
    }else{
      cout << B[gx][gy] << endl;
    }
  }
}

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

#include <iostream>
#include <vector>
#include <queue>
using namespace std;
bool b[16][16][16][16];
int d[16][16];
int main(){
    int n,gx,gy,p;
    cin>>n;
    while(n--){
        memset(b,false,sizeof(b));
        memset(d,0,sizeof(d));
        cin>>gx>>gy;
        cin>>p;
        for(int i=0;i<p;i++){
            int x1,y1,x2,y2;
            cin>>x1>>y1>>x2>>y2;
            b[y1][x1][y2][x2]=true;
            b[y2][x2][y1][x1]=true;
        }
        d[0][0]=1;
        for(int i=0;i<=gx;i++){
            for(int j=0;j<=gy;j++){
                if(i!=0)if(!b[j][i][j][i-1])d[j][i]+=d[j][i-1];
                if(j!=0)if(!b[j][i][j-1][i])d[j][i]+=d[j-1][i];
            }
        }
        if(d[gy][gx]==0){
            cout<<"Miserable Hokusai!"<<endl;
        }else{
            cout<<d[gy][gx]<<endl;
        }
    }
}

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

#include <iostream>
using namespace std;

int main() {
  int gx,gy; //?§?????????´???
  int mata_num; //?????????????????°
  int x1[100],y1[100],x2[100],y2[100]; //?????????????????§?¨?
  long long int T; //??????????????? (x, y) ?????°??????????????°
  int data_num; //???????????????????????°
  
  cin >> data_num;

  for (int i=0;i<data_num;i++) {
    cin >> gx >> gy;
    cin >> mata_num;
    if(mata_num == 0) {
      T = 1;
      for(int j=1;j<gx+1;j++) {
       T = T*(gx+gy-j+1)/j;
     }
     cout << T <<endl;
   }
   else {
    for (int j=0; j<mata_num; j++) {
     cin >> x1[j] >> y1[j];
     cin >> x2[j] >> y2[j];
   }
      /* ????????? (x,y)?????????????§????????????§???????????? Vert[x][y]==true???????????§???????????° Vert[x][y]==false ??¨?????????????§?????????????????§???????????????§ Horiz[x][y] ??????????´?????¨??????????*/
   int Vert[30][30] = {}; 
   int Horiz[30][30] = {};
      int T[30][30] = {}; //?????????????????? (x, y) ?????°??????????????° Tx,y
      for (int j=0;j<mata_num;j++) {
       if(x1[j] == x2[j]) {
         Horiz[x1[j]][max(y1[j],y2[j])] = 1;
       }
       else if(y1[j] == y2[j]) {
         Vert[max(x1[j],x2[j])][y1[j]] = 1;
       }
     }
     for (int j=0;j<30;j++){
       T[0][j] = 0;
       T[j][0] = 0;
     }
     T[1][1] = 1;
     for (int j=1;j<30;j++) {
       for (int k=1;l<30;k++) {
         if ((j != 1) || (k!= 1)) {
           if ((Vert[j-1][k-1] == 0) && (Horiz[j-1][k-1] == 0)) {
             T[j][l] = T[j][l-1] + T[j-1][l];
           }
           if ((Vert[j-1][k-1] == 0) && (Horiz[j-1][k-1] == 1)) {
             T[j][k] = T[j-1][k];
           }
           if ((Vert[j-1][k-1] == 1) && (Horiz[j-1][k-1] == 0)) {
             T[j][k] = T[j][k-1];
           }
           if ((Vert[j-1][k-1] == 1) && (Horiz[j-1][k-1] == 1)) {
             T[j][k] = 0;
           }
         }
       }
     }
      if(T[gx-1][gy-1] == 0) {  //??????????????????1??????????????´???
       cout << "Miserable Hokusai!" << endl;
     }
     else {
       cout << T[gx+1][gy+1] << endl;
     }
   }
 }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:46:21: error: 'l' was not declared in this scope
   46 |        for (int k=1;l<30;k++) {
      |                     ^
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int dx[]={0,1};
int dy[]={1,0};
int edge[16][16][16][16]={0};
main(){
  int te;
  cin>>te;
  while(te--){
  int gx,gy,p;
  while(cin>>gx>>gy>>p){
    long long dp[gy+1][gx+1];
    rep(i,16)rep(k,16)rep(j,16)rep(l,16)edge[i][j][k][l]=0;
    fill(&dp[0][0],&dp[gy][gx+1],0);
    dp[0][0]=1;
    for(int i=0;i<p;i++){
      int x1,x2,y1,y2;
      cin>>x1>>y1>>x2>>y2;
      edge[y1][x1][y2][x2]=1;
      edge[y2][x2][y1][x1]=1;
    }
    for(int i=0;i<=gy;i++){
      for(int j=0;j<=gx;j++){
	for(int k=0;k<2;k++){
	  int nex=j+dx[k],ney=i+dy[k];
	  if (nex>gx||ney>gy||
	      edge[i][j][ney][nex]||edge[ney][nex][i][j])continue;
	  dp[ney][nex]+=dp[i][j];
	}
      }
    }
    if ( dp[gy][gx] == 0){
      puts("Miserable Hokusai!");
    }else cout <<dp[gy][gx] << endl;

  }
  return false;
}
}

Compiler output:
a.cc:7:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    7 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:14:9: error: 'i' was not declared in this scope
   14 |     rep(i,16)rep(k,16)rep(j,16)rep(l,16)edge[i][j][k][l]=0;
      |         ^
a.cc:14:5: error: 'rep' was not declared in this scope
   14 |     rep(i,16)rep(k,16)rep(j,16)rep(l,16)edge[i][j][k][l]=0;
      |     ^~~
Language: C++

#include<iostream>
using namespace std;

int main(){
	int a;
	cin>>a;
	for(int b=0;b<a;b++){
		int gx,gy;
		cin>>gx>>gy;
		int n;
		cin>>n;
		int mttb[110][4];
		for(int i=0;i<n;i++){
			cin>>mttb[i][0]>>mttb[i][1]>>mttb[i][2]>>mttb[i][3];
		}
		int map[20][20];
		memset(map,0,sizeof(map));
		map[0][0]=1;
		for(int x=0;x<=gx;x++){
			for(int y=0;y<=gy;y++){
				bool go=true;
				for(int i=0;i<n;i++){
					if(x==0||(mttb[i][0]==x-1&&mttb[i][2]==x||mttb[i][0]==x&&mttb[i][2]==x-1)&&mttb[i][1]==y&&mttb[i][3]==y){
						go=false;
						break;
					}
				}
				if(go)map[x][y]+=map[x-1][y];
				go=true;
				for(int i=0;i<n;i++){
					if(y==0||mttb[i][0]==x&&mttb[i][2]==x&&(mttb[i][1]==y-1&&mttb[i][3]==y||mttb[i][1]==y&&mttb[i][3]==y-1)){
						go=false;
						break;
					}
				}
				if(go)map[x][y]+=map[x][y-1];
			}
		}
		if(map[gx][gy]!=0){
			cout<<map[gx][gy]<<endl;
		}else{
			cout<<"Miserable Hokusai!\n";
		}
	}
	return 0;
}

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


#include<iostream>
using namespace std;

int main(void){
	int a;
	cin>>a;
	for(int b=0;b<a;b++){
		int gx,gy;
		cin>>gx>>gy;
		int n;
		cin>>n;
		int mttb[110][4];
		for(int i=0;i<n;i++){
			cin>>mttb[i][0]>>mttb[i][1]>>mttb[i][2]>>mttb[i][3];
		}
		int map[20][20];
		memset(map,0,sizeof(map));
		map[0][0]=1;
		for(int x=0;x<=gx;x++){
			for(int y=0;y<=gy;y++){
				bool go=true;
				for(int i=0;i<n;i++){
					if(x==0||(mttb[i][0]==x-1&&mttb[i][2]==x||mttb[i][0]==x&&mttb[i][2]==x-1)&&mttb[i][1]==y&&mttb[i][3]==y){
						go=false;
						break;
					}
				}
				if(go)map[x][y]+=map[x-1][y];
				go=true;
				for(int i=0;i<n;i++){
					if(y==0||mttb[i][0]==x&&mttb[i][2]==x&&(mttb[i][1]==y-1&&mttb[i][3]==y||mttb[i][1]==y&&mttb[i][3]==y-1)){
						go=false;
						break;
					}
				}
				if(go)map[x][y]+=map[x][y-1];
			}
		}
		if(map[gx][gy]!=0){
			cout<<map[gx][gy]<<endl;
		}else{
			cout<<"Miserable Hokusai!\n";
		}
	}
	return 0;
}

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

#include<iostream>
using namespace std;

int main(void){
	int a;
	cin>>a;
	for(int b=0;b<a;b++){
		int gx,gy;
		cin>>gx>>gy;
		int n;
		cin>>n;
		int mttb[110][4];
		for(int i=0;i<n;i++){
			cin>>mttb[i][0]>>mttb[i][1]>>mttb[i][2]>>mttb[i][3];
		}
		int map[20][20];
		memset(map,0,sizeof(map));
		map[0][0]=1;
		for(int x=0;x<=gx;x++){
			for(int y=0;y<=gy;y++){
				bool go=true;
				for(int i=0;i<n;i++){
					if(x==0||(mttb[i][0]==x-1&&mttb[i][2]==x||mttb[i][0]==x&&mttb[i][2]==x-1)&&mttb[i][1]==y&&mttb[i][3]==y){
						go=false;
						break;
					}
				}
				if(go)map[x][y]+=map[x-1][y];
				go=true;
				for(int i=0;i<n;i++){
					if(y==0||mttb[i][0]==x&&mttb[i][2]==x&&(mttb[i][1]==y-1&&mttb[i][3]==y||mttb[i][1]==y&&mttb[i][3]==y-1)){
						go=false;
						break;
					}
				}
				if(go)map[x][y]+=map[x][y-1];
			}
		}
		if(map[gx][gy]!=0){
			cout<<map[gx][gy]<<endl;
		}else{
			cout<<"Miserable Hokusai!\n";
		}
	}
	return 0;
}

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


#include<iostream>
using namespace std;

int main(void){
	int a;
	cin>>a;
	for(int b=0;b<a;b++){
		int gx,gy;
		cin>>gx>>gy;
		int n;
		cin>>n;
		int mttb[110][4];
		for(int i=0;i<n;i++){
			cin>>mttb[i][0]>>mttb[i][1]>>mttb[i][2]>>mttb[i][3];
		}
		int map[20][20];
		memset(map,0,sizeof(map));
		map[0][0]=1;
		/*for(int x=0;x<=gx;x++){
			for(int y=0;y<=gy;y++){
				bool go=true;
				for(int i=0;i<n;i++){
					if(x==0||(mttb[i][0]==x-1&&mttb[i][2]==x||mttb[i][0]==x&&mttb[i][2]==x-1)&&mttb[i][1]==y&&mttb[i][3]==y){
						go=false;
						break;
					}
				}
				if(go)map[x][y]+=map[x-1][y];
				go=true;
				for(int i=0;i<n;i++){
					if(y==0||mttb[i][0]==x&&mttb[i][2]==x&&(mttb[i][1]==y-1&&mttb[i][3]==y||mttb[i][1]==y&&mttb[i][3]==y-1)){
						go=false;
						break;
					}
				}
				if(go)map[x][y]+=map[x][y-1];
			}
		}*/
		if(map[gx][gy]!=0){
			cout<<map[gx][gy]<<endl;
		}else{
			cout<<"Miserable Hokusai!\n";
		}
	}
	return 0;
}

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


#include<iostream>
using namespace std;

int main(void){
	int a;
	cin>>a;
	for(int b=0;b<a;b++){
		int gx,gy;
		cin>>gx>>gy;
		int n;
		cin>>n;
		int mttb[110][4];
		for(int i=0;i<n;i++){
			cin>>mttb[i][0]>>mttb[i][1]>>mttb[i][2]>>mttb[i][3];
		}
		int map[20][20];
		memset(map,0,sizeof(map));
		map[0][0]=1;
		/*for(int x=0;x<=gx;x++){
			for(int y=0;y<=gy;y++){
				bool go=true;
				for(int i=0;i<n;i++){
					if(x==0||(mttb[i][0]==x-1&&mttb[i][2]==x||mttb[i][0]==x&&mttb[i][2]==x-1)&&mttb[i][1]==y&&mttb[i][3]==y){
						go=false;
						break;
					}
				}
				if(go)map[x][y]+=map[x-1][y];
				go=true;
				for(int i=0;i<n;i++){
					if(y==0||mttb[i][0]==x&&mttb[i][2]==x&&(mttb[i][1]==y-1&&mttb[i][3]==y||mttb[i][1]==y&&mttb[i][3]==y-1)){
						go=false;
						break;
					}
				}
				if(go)map[x][y]+=map[x][y-1];
			}
		}*/
		/*if(map[gx][gy]!=0){
			cout<<map[gx][gy]<<endl;
		}else{
			cout<<"Miserable Hokusai!\n";
		}*/
	}
	return 0;
}

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

// subtle.cpp : C vWFNg t@CÅ·B

#include "stdafx.h"
#include <iostream>
#include <bitset>
#include <algorithm>
#include <map>
#include <set>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <string>
#include <vector>
#include <numeric>
#include <list>
#include <sstream>
using namespace std;
//#define P pair<int,int>
//#define max 999999
typedef unsigned int uint;
typedef unsigned long ul;
typedef long long ll;
typedef unsigned long long ull;
#define rep(i,n) for(ull i = 0;i<n;i++)
#define pb(n) push_back(n)
#define mp(n,k) (make_pair(n,k))
#define clear(n) memset(n,0,sizeof(n))
using namespace System;
uint dp[20][20];

int main() {
	int n;
	cin >> n;
	for(int k = 0;k<n;k++){
	memset(dp,0,sizeof(dp));
	int gx,gy,p;
	set<pair<pair<int,int>,pair<int,int> > > R;
	cin >> gx >> gy;
	cin >> p;
	for(int i = 0;i<p;i++){
		int x1,y1,x2,y2;
		cin >> x1 >> y1 >> x2 >> y2;
		R.insert(make_pair(make_pair(x1+1,y1+1),make_pair(x2+1,y2+1)));
		R.insert(make_pair(make_pair(x2+1,y2+1),make_pair(x1+1,y1+1)));
	}
	dp[1][1] = 1;
	for(int i = 1;i<=gx+1;i++)for(int j = 1;j<=gy+1;j++){
		if(!R.count(mp(mp(i,j),mp(i-1,j)))){
			dp[i][j] += dp[i-1][j];
		}
		if(!R.count(mp(mp(i,j),mp(i,j-1)))){
			dp[i][j] += dp[i][j-1];
		}
	}
	if(dp[gx+1][gy+1])
		cout << dp[gx+1][gy+1] << endl;
	else
		cout << "Miserable Hokusai!" << endl;
	}
	//cin >> n;
	return 0;
}

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

#include<iostream>

using namespace std;

typedef pair<int,int> P;
const int MAX = 16;
bool Mata[MAX][MAX][MAX][MAX];
P g;
int ans;

void init(){
  ans = 0;
  memset(Mata,false,sizeof(Mata));
}

void solve(int x,int y){
  
  if(x == g.first && y == g.second) ans++;
  else if(x <= g.first && y <= g.second){
    if(!Mata[x][y][x+1][y]) solve(x+1,y);
    if(!Mata[x][y][x][y+1]) solve(x,y+1);
  }
}

int main(){
  int N;
  cin >> N;
  while(N--){
    init();
    cin >> g.first >> g.second;
    int num;
    cin >> num;
    while(num--){
      P f,t;
      cin >> f.first >> f.second >> t.first >> t.second;
      Mata[f.first][f.second][t.first][t.second] = true;
      Mata[t.first][t.second][f.first][f.second] = true;
    }
    solve(0,0);
    if(ans) cout << ans << endl;
    else cout << "Miserable Hokusai!" << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'void init()':
a.cc:13:3: error: 'memset' was not declared in this scope
   13 |   memset(Mata,false,sizeof(Mata));
      |   ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 |
Language: C++

#include <iostream>

using namespace std;

void solve()
{
	
	int n;
	cin >> n;
    for(int i = 0; i < n; ++i)
	{
        int gx, gy, p;
        bool stage[16][16][16][16];
        memset(stage,-1,sizeof(stage));
        cin >> gx >> gy >> p;
        for(int j = 0; j < p; ++j)
		{
            int x1,y1,x2,y2;
			cin >> x1 >> y1 >> x2 >> y2;
            stage[x1][y1][x2][y2] = false;
            stage[x2][y2][x1][y1] = false;
        }
        int dp[17][17];
        memset(dp, 0, sizeof(dp));
        dp[0][0] = 1;
        dp[1][1] = 1;
        for(int y = 0; y <= gy; ++y)
		{
            for(int x = 0; x <= gx; ++x)
			{
                if(x == 0 && y == 0) continue;
                if(x > 0 && stage[x - 1][y][x][y])
				{
                    dp[y + 1][x + 1] += dp[y + 1][x];
                }
                if(y > 0 && stage[x][y - 1][x][y])
				{
                    dp[y + 1][x + 1] += dp[y][x + 1];
                }
            }
        }
		if(dp[gy + 1][gx + 1] == 0)
		{
			cout << "Miserable Hokusai!" << endl;
        }
        else
		{
			cout << dp[gy + 1][gx + 1] << endl;
        }
    }
}

int main()
{
	solve();
	return(0);
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:14:9: error: 'memset' was not declared in this scope
   14 |         memset(stage,-1,sizeof(stage));
      |         ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 |
Language: C++

#include <iostream>
#include <stdlib.h>

using namespace std;

void solve()
{
	
	int n;
	cin >> n;
    for(int i = 0; i < n; ++i)
	{
        int gx, gy, p;
        bool stage[16][16][16][16];
        memset(stage,-1,sizeof(stage));
        cin >> gx >> gy >> p;
        for(int j = 0; j < p; ++j)
		{
            int x1,y1,x2,y2;
			cin >> x1 >> y1 >> x2 >> y2;
            stage[x1][y1][x2][y2] = false;
            stage[x2][y2][x1][y1] = false;
        }
        int dp[17][17];
        memset(dp, 0, sizeof(dp));
        dp[0][0] = 1;
        dp[1][1] = 1;
        for(int y = 0; y <= gy; ++y)
		{
            for(int x = 0; x <= gx; ++x)
			{
                if(x == 0 && y == 0) continue;
                if(x > 0 && stage[x - 1][y][x][y])
				{
                    dp[y + 1][x + 1] += dp[y + 1][x];
                }
                if(y > 0 && stage[x][y - 1][x][y])
				{
                    dp[y + 1][x + 1] += dp[y][x + 1];
                }
            }
        }
		if(dp[gy + 1][gx + 1] == 0)
		{
			cout << "Miserable Hokusai!" << endl;
        }
        else
		{
			cout << dp[gy + 1][gx + 1] << endl;
        }
    }
}

int main()
{
	solve();
	return(0);
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:15:9: error: 'memset' was not declared in this scope
   15 |         memset(stage,-1,sizeof(stage));
      |         ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <stdlib.h>
  +++ |+#include <cstring>
    3 |
Language: C++

//
//取り組んだ問題:平安京
//プロ怖い
//
//

#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <queue>
#include <string>
#include <list>
#define rep(i,n) for(int i = 0; i < n;i++)
#define Rep(i,n) for(int i = 0; i <= n;i++)

using namespace std;

int main(){
    int gx,gy;
    int x1,y1,x2,y2;
    int p;
    int dataset;
    cin >> dataset;
    rep(xxxxx,dataset){
        int map[20][20]={};
        int dp[20][20]={};
        dp[0][0]=1;
        cin >> gx >> gy;
        cin >> p;
        rep(xxxxxxx,p){
            cin >> x1 >> y1  >> x2 >> y2;
            if(x1 == x2){
                if(y1 > y2){
                    map[x1][y2] += 2;
                }else{
                    map[x1][y1] += 2;
                }
            }else{
                if(x1 > x2){
                    map[x2][y1] += 1;
                }else{
                    map[x1][y1] += 1;
                }
            }
        }
        for(int i = 0;i <= gx;i++){
            for(int j = 0;j <= gy;j++){
                if((map[i][j]&2) == 0)
                    dp[i][j+1] += dp[i][j];
                if(map[i][j]&1) == 0)
                    dp[i+1][j] += dp[i][j];
            }
        }
        if(dp[gx][gy]==0){
            cout << "Miserable Hokusai!" << endl;
        }else{
            cout << dp[gx][gy] << endl;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:51:33: error: expected primary-expression before '==' token
   51 |                 if(map[i][j]&1) == 0)
      |                                 ^~
Language: C++

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

using namespace std;

int R[30][30];
int S[16][16];

int main()
{
	int s, t;
	for ( s = 0; s < 30; s++)
	{
		for (t = 0; t < 30; t++)
		{
			R[s][t]=0;
		}
	}
	int p, q;
	int N, gx, gy, M, i, j, t, x1, y1, x2, y2;
	cin >> N;
	for ( k = 0; k < N; k++)
	{
		cin >> gx >> gy;
		cin >> M;
		if ( M == 0) break;
		for ( i = 0; i < M; i++)
		{
			cin >> x1 >> y1 >> x2 >> y2;
			if ( x1 == x2) R[2*x1][2*max(y1,y2)-1]=1;
			if ( y1 == y2) R[2*max(x1,x2)-1][2*y1]=1;
		}
		S[0][0]=1;
		for ( j = 1; j < 16; j++)
		{
			for (t = 0; t < (j + 1); t++)
			{
				S[j-t][t]=0;
				if ( t == 0 && R[(j-t)*2-1][t] == 0) S[j-t][t]=S[j-t-1][t];
				if ( t == j && R[j-t][t*2-1] == 0) S[j-t][t]=S[j-t][t-1];
				if ( t != 0 && t != j && R[(j-t)*2-1][t] == 0 && R[j-t][t*2-1] == 0) S[j-t][t]=S[j-t-1][t]+S[j-t][t-1];
				if ( t != 0 && t != j && R[(j-t)*2-1][t] == 0 && R[j-t][t*2-1] == 1) S[j-t][t]=S[j-t-1][t];
				if ( t != 0 && t != j && R[(j-t)*2-1][t] == 1 && R[j-t][t*2-1] == 0) S[j-t][t]=S[j-t][t-1];
			}
		}
		cout << S[gx][gy] << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:33: error: redeclaration of 'int t'
   21 |         int N, gx, gy, M, i, j, t, x1, y1, x2, y2;
      |                                 ^
a.cc:12:16: note: 'int t' previously declared here
   12 |         int s, t;
      |                ^
a.cc:23:15: error: 'k' was not declared in this scope
   23 |         for ( k = 0; k < N; k++)
      |               ^
Language: C++

#include<iostream>
using namespace std;
int p1[9],p2[9];

#define rep(i,n) for(int i=0;i<(int)n;i++)
double ans = 0;
long long dp[9][(1 << 9)][200]={0};

void solve(){
  
  rep(j,9){
    int state = ( 1 << j);
    if ( p1[0]>p2[j]){
      dp[0][state][p1[0]+p2[j]]+=1;
    }else {
      dp[0][state][0]+=1;
    }      
  }
  
  for(int i=0;i<8;i++){
    rep(j,(1<<9)){
      rep(k,200){
	if ( dp[i][j][k] == 0)continue;
	rep(l,9){
	  if ( ( (1 << l)&j) != 0)continue;
	  if (p1[i+1]>p2[l]){
	    dp[i+1][(1<<l)|j][k+p1[i+1]+p2[l]]+=dp[i][j][k];
	  }else {
	    dp[i+1][(1<<l)|j][k]+=dp[i][j][k];
	  }
	}
      }
    }
  }
  

  double div=0;
  rep(i,200)div+=dp[8][(1 << 9)-1][i];
  for(int i=86;i<200;i++){
    ans+=dp[8][(1<<9)-1][i];
  }
  //cout << ans << " " << div << endl;

  ans/=div;
  
}


main(){
cin>>te;
while(te--){
  rep(i,9)cin>>p1[i];
  rep(i,9)cin>>p2[i];
  solve();

  printf("%.5lf %.5lf\n",ans,1-ans);
}
}

Compiler output:
a.cc:49:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   49 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:50:6: error: 'te' was not declared in this scope; did you mean 'tm'?
   50 | cin>>te;
      |      ^~
      |      tm
Language: C++

#include<iostream>
using namespace std;
int p1[9],p2[9];

#define rep(i,n) for(int i=0;i<(int)n;i++)
double ans = 0;
long long dp[9][(1 << 9)][200]={0};

void solve(){
  rep(i,9)rep(j,(1<<9)rep(k,200)dp[i][j][k]=0;
  rep(j,9){
    int state = ( 1 << j);
    if ( p1[0]>p2[j]){
      dp[0][state][p1[0]+p2[j]]+=1;
    }else {
      dp[0][state][0]+=1;
    }      
  }
  
  for(int i=0;i<8;i++){
    rep(j,(1<<9)){
      rep(k,200){
	if ( dp[i][j][k] == 0)continue;
	rep(l,9){
	  if ( ( (1 << l)&j) != 0)continue;
	  if (p1[i+1]>p2[l]){
	    dp[i+1][(1<<l)|j][k+p1[i+1]+p2[l]]+=dp[i][j][k];
	  }else {
	    dp[i+1][(1<<l)|j][k]+=dp[i][j][k];
	  }
	}
      }
    }
  }
  

  double div=0;
  rep(i,200)div+=dp[8][(1 << 9)-1][i];
  for(int i=86;i<200;i++){
    ans+=dp[8][(1<<9)-1][i];
  }
  //cout << ans << " " << div << endl;

  ans/=div;
  
}


main(){
  int te;
  cin>>te;
  while(te--){
    ans =0;
    rep(i,9)cin>>p1[i];
    rep(i,9)cin>>p2[i];
    solve();
    
    printf("%.5lf %.5lf\n",ans,1-ans);
  }
}

Compiler output:
a.cc:60:2: error: unterminated argument list invoking macro "rep"
   60 | }
      |  ^
a.cc: In function 'void solve()':
a.cc:10:11: error: 'rep' was not declared in this scope
   10 |   rep(i,9)rep(j,(1<<9)rep(k,200)dp[i][j][k]=0;
      |           ^~~
a.cc:10:14: error: expected '}' at end of input
   10 |   rep(i,9)rep(j,(1<<9)rep(k,200)dp[i][j][k]=0;
      |              ^
a.cc:9:13: note: to match this '{'
    9 | void solve(){
      |             ^
Language: C++

#include <iostream>
#include <memory>
#include <memory.h>
#include <cmath>
#include <fstream>
#include <cmath>
#include <numeric>
#include <vector>
#include <stack>
#include <string>
#include <queue>
#include <sstream>
#include <cstdlib>
#include <cstdio>
#include <map>
#include <iomanip>
#include <list>
#include <cctype>
#define USE_MATH_DEFINES
using namespace std;

typedef long long ll;
typedef pair<int, int> P;
typedef pair<int, P> PP;
typedef pair<int, PP> PPP;
const int INF = 1 << 30;
const double EPS = 1E-9;

int ga[9];
int ja[9];

int main(){
	int T;
	cin >> T;
	for(int t = 0; t < T; t++){
		for(int i = 0; i < 9; i++) cin >> ga[i];
		for(int j = 0; j < 9; j++) cin >> ja[j];
		sort(ga, ga + 9);
		int countg = 0;
		int countj = 0;
		do{
			int sg = 0, sj = 0;
			for(int i = 0; i < 9; i++){
				if(ga[i] < ja[i]){
					sj += ja[i] + ga[i];
				}else{
					sg += ja[i] + ga[i];
				}
			}
			if(sg > sj){
				countg++;
			}else{
				countj++;
			}
		}while(next_permutation(ga, ga + 9));
		double pg = (double)countg / (double)(countg + countj);
		double pj = 1 - pg;
		cout << pg << " " << pj << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:17: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   38 |                 sort(ga, ga + 9);
      |                 ^~~~
      |                 sqrt
a.cc:55:24: error: 'next_permutation' was not declared in this scope
   55 |                 }while(next_permutation(ga, ga + 9));
      |                        ^~~~~~~~~~~~~~~~
Language: C++

#include<iostream>
#include<map>
using namespace std;
main(){
  map<string,int> M;
  M["yotta"]= 24;
  M["zetta"]= 21;
  M["exa"]= 18;
  M["peta"]= 15;
  M["tera"]= 12;
  M["giga"]= 9;
  M["mega"]= 6;
  M["kilo"]= 3;
  M["hecto"]= 2;
  M["deca"]= 1;
  M["deci"]= -1;
  M["centi"]= -2;
  M["milli"]= -3;
  M["micro"]= -6;
  M["nano"]= -9;
  M["pico"]= -12;
  M["femto"]= -15;
  M["ato"]= -18;
  M["zepto"]= -21;
  M["yocto"]= -24; 
  int te;
  cin>>te;
  while(te--){
  string num,param,unit;
  while(cin>>num>>param){    
    int p;
    if ( M[param] == 0){
      unit = param;
      p=0;
    }else {
      cin>>unit;
      p = M[param];
    }
    if ( num[0] == '0'){
      //point move right point--
      int i=0;
      for(i=2;;i++){
	p--;
	if ( num[i] != '0' && num[i] != '.')break;
      }
      num=num.substr(i);
      if ( num.size() == 1){
	cout << num[0]<<
	  " * 10^" << p << " " << unit<<endl;
      }else {
	cout << num[0]<< "." << num.substr(1) <<
	  " * 10^" << p << " " << unit<<endl;
      }

    }else if ( find(num.begin(),num.end(),'.') != num.end() ){
      //point move left point++
      int i=0;
      int itr=0;
      while(num[itr]!='.')itr++;
      p+=(itr-1);
      num=num.erase(itr,1);
      cout << num[0]<< "." << num.substr(1) <<
	" * 10^" << p << " " << unit<<endl;
    }else {
      p+=num.size()-1;
      cout << num[0]<< "." << num.substr(1) <<
	" * 10^" << p << " " << unit<<endl;
    }
    unit.clear();
  }
  return false;
  }
}

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:55:20: error: no matching function for call to 'find(std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, char)'
   55 |     }else if ( find(num.begin(),num.end(),'.') != num.end() ){
      |                ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:55:20: note:   '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   55 |     }else if ( find(num.begin(),num.end(),'.') != num.end() ){
      |                ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

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

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

using namespace std;

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

char in[2000];
char dig[1001],pref[9],unit[51];

int main()
{
	map<string,int> prefix;
	prefix["yocto"]=-24; prefix["zepto"]=-21; prefix["ato"]=-18; prefix["femto"]=-15;
	prefix["pico"]=-12; prefix["nano"]=-9; prefix["micro"]=-6; prefix["milli"]=-3;
	prefix["centi"]=-2; prefix["deci"]=-1; prefix["deca"]=1; prefix["hecto"]=2;
	prefix["kilo"]=3; prefix["mega"]=6; prefix["giga"]=9; prefix["tera"]=12;
	prefix["peta"]=15; prefix["exa"]=18; prefix["zetta"]=21; prefix["yotta"]=24;
	
	int cs; scanf("%d ",&cs);
	while(cs--)
	{
		gets(in);
		int sp=count(in,in+strlen(in),' ');
		if(sp==2)sscanf(in,"%s%s%s",dig,pref,unit);
		else sscanf(in,"%s%s",dig,unit),pref[0]=0;
		
		int p,q=strlen(dig),r,e=prefix[pref];
		for(p=0;p<q&&(dig[p]=='.'||dig[p]=='0');p++);
		for(r=0;r<q&&dig[r]!='.';r++);
		
		e-=p-r+(p==0);
		char ans[1010]; int l=0;
		ans[l++]=dig[p];
		if(++p==q)goto END;
		ans[l++]='.';
		for(;p<q;p++)if(dig[p]!='.')ans[l++]=dig[p];
		
		END:
		ans[l]=0; 
		printf("%s * 10^%d %s\n",ans,e,unit);
	}
	return 0;
}

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

#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <iostream>
#include <math.h>
#include <assert.h>
#include <vector>
#include <queue>
#include <string>
#include <map>
#include <set>

using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
static const double EPS = 1e-9;
static const double PI = acos(-1.0);

#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, s, n) for (int i = (s); i < (int)(n); i++)
#define FOREQ(i, s, n) for (int i = (s); i <= (int)(n); i++)
#define FORIT(it, c) for (__typeof((c).begin())it = (c).begin(); it != (c).end(); it++)
#define MEMSET(v, h) memset((v), h, sizeof(v))

char line[10000];
char str1[10000];
char str2[10000];
char str3[10000];
char ans[10000];

int main() {
  map<string, int> mapto;
  mapto["yotta"] = 24;
  mapto["zetta"] = 21;
  mapto["exa"] = 18;
  mapto["peta"] = 15;
  mapto["tera"] = 12;
  mapto["giga"] = 9;
  mapto["mega"] = 6;
  mapto["kilo"] = 3;
  mapto["hecto"] = 2;
  mapto["deca"] = 1;
  mapto["deci"] = -1;
  mapto["centi"] = -2;
  mapto["milli"] = -3;
  mapto["micro"] = -6;
  mapto["nano"] = -9;
  mapto["pico"] = -12;
  mapto["femto"] = -15;
  mapto["ato"] = -18;
  mapto["zepto"] = -21;
  mapto["yocto"] = -24;

  int test;
  scanf("%d ", &test);
  while (test--) {
    int base = 0;
    gets(line);
    int v = sscanf(line, "%s %s %s", str1, str2, str3);
    if (v == 3) {
      swap(str2, str3);
      assert(mapto.count(str3));
      base = mapto[str3];
    }
    int len = strlen(str1);
    int dir = 1;
    if (str1[0] == '0') { dir = -1; }
    else { base--; }
    bool end = false;
    int index = 0;
    REP(i, len) {
      if (dir == 1) {
        if (str1[i] == '.') { end = true; continue; }
        if (!end) { base += dir; }
        if (index == 1) {
          ans[index++] = '.';
        }
        ans[index++] = str1[i];
      } else {
        if (str1[i] == '.') { continue; }
        if (str1[i] != '0') { end = true; }
        if (!end) { base += dir; }
        if (end) {
          if (index == 1) {
            ans[index++] = '.';
          }
          ans[index++] = str1[i];
        }
      }
    }
    ans[index] = 0;
    printf("%s * 10^%d %s\n", ans, base, str2);
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:59:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
   59 |     gets(line);
      |     ^~~~
      |     getw
Language: C++

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

bool judge(string s)
{
    unsigned sum = accumulate(s.begin(), s.end(), 0,
                    [](char c, unsigned x) -> unsigned { return x +(c - '0'); } 
                    );
    unsigned count = sum/9;
    if(sum % 9 == 0) count--;
    return  ( (count + s.size()) % 2 ) == 0;
}

int main()
{
    int n;
    cin >> n;
    for(int i = 0; i < n; i++)
    {
        string s;
        cin >> s;
        if(judge(s))
            cout << "Fabre wins.\n";
        else
            cout << "Audrey wins.\n";
    }
}

Compiler output:
a.cc: In function 'bool judge(std::string)':
a.cc:7:20: error: 'accumulate' was not declared in this scope
    7 |     unsigned sum = accumulate(s.begin(), s.end(), 0,
      |                    ^~~~~~~~~~
Language: C++

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

bool judge(string s)
{
    unsigned sum = accumulate(s.begin(), s.end(), 0,
            [](char c, unsigned x) -> unsigned { return x +(c - '0'); } 
            );
    unsigned count = (sum-1)/9;
    return  ( (count + s.size()) % 2 ) == 0;
}

int main()
{
    int n;
    cin >> n;
    for(int i = 0; i < n; i++)
    {
        string s;
        cin >> s;
        if(judge(s))
            cout << "Fabre wins.\n";
        else
            cout << "Audrey wins.\n";
    }
}

Compiler output:
a.cc: In function 'bool judge(std::string)':
a.cc:7:20: error: 'accumulate' was not declared in this scope
    7 |     unsigned sum = accumulate(s.begin(), s.end(), 0,
      |                    ^~~~~~~~~~
Language: C++

#include<stdio.h>
#include<string.h>
int main(){
    int n;
    scanf("%d",&n);
    for(int j=0;j<n;j++){
        char pro[1000];
        scanf(" %s",pro);
        int num,;
        num=strlen(pro);
        int a[1000]={};
        for(int i=0;pro[i]!='\0';i++){
            a[i]=pro[i]-'0';
        }
        int ans=0,count=0;
        for(int i=0;i<num;i++)ans+=a[i];
        while(ans>9){
            ans-=9;
            count++;
        }
        if((num-1+count)%2==0)printf("Audrey wins.\n");
        else printf("Fabre wins.\n");
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: expected unqualified-id before ';' token
    9 |         int num,;
      |                 ^
Language: C++

#include <iostream>
using namespace std;
int main()
{
inr T;cin >> T;
for(int t = 0;t <T; t++){
int N;
cin >> N;
const int p = N/9;
const int d = to_string(N).size();
cout << ((g+p-1)%2==0?"Audrey wins.":"Fabre wins.") << endl;
}
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:1: error: 'inr' was not declared in this scope; did you mean 'int'?
    5 | inr T;cin >> T;
      | ^~~
      | int
a.cc:5:14: error: 'T' was not declared in this scope
    5 | inr T;cin >> T;
      |              ^
a.cc:11:11: error: 'g' was not declared in this scope
   11 | cout << ((g+p-1)%2==0?"Audrey wins.":"Fabre wins.") << endl;
      |           ^
Language: C++

#include <iostream>
using namespace std;
int main()
{
inr T;cin >> T;
for(int t = 0;t <T; t++){
int N;
cin >> N;
const int p = N/9;
const int d = to_string(N).size();
cout << ((p+d-1)%2==0?"Audrey wins.":"Fabre wins.") << endl;
}
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:1: error: 'inr' was not declared in this scope; did you mean 'int'?
    5 | inr T;cin >> T;
      | ^~~
      | int
a.cc:5:14: error: 'T' was not declared in this scope
    5 | inr T;cin >> T;
      |              ^
Language: C++

#include <iostream>
using namespace std;
int main()
{
int T;cin >> T;
for(int t = 0;t <T; t++){
string N;cin>>N;
const int d = N.size();
int s = 0;
for(const char c:N){s+=c-'0';}
s%=9;
const int p= s%2==(N.back()-'0')%2);
cout << ((p+d-1)%2==0?"Audrey wins.":"Fabre wins.") << endl;
}
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:35: error: expected ',' or ';' before ')' token
   12 | const int p= s%2==(N.back()-'0')%2);
      |                                   ^
Language: C++

#include<string>
#include<iostream>
#include<stdlib>
using namespace std;
int main(){
	int n;
	cin>>n;
	while(n--){
		string s;
		cin>>s;
		int cnt=0;
		while(s.size()!=1){
			string t=s.substr(s.size()-2);
			//cout<<t<<endl;
			int x=atoi(t.c_str());
			//cout<<x<<endl;
			s=s.substr(0,s.size()-2);
			//cout<<" "<<x<<endl;
			int a=x%10;
			int b=(x-a)/10;
			a+=b;
			if(a/10){
				s+='1';
			}
			a%=10;
			s+=('0'+a);
			//cout<<s<<endl;
			cnt++;
		}
		if(cnt%2){
			cout<<"Fabre wins."<<endl;
		}else
		cout<<"Audrey wins."<<endl;
		//cout<<cnt<<endl;
	}
	return 0;
}

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