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

#include<stdio.h>
int main(void){
    int i,u,y=0,e=0,g,m=0,q,z=0,de,r[100][6]={0},f[100][6]={0},as=0,u=0,x=0,j=0;
    scanf("%d",&x);
    for(de=0;de<x;de++){
	    for(i=0;i<6;i++){
	    	scanf("%d",&r[de][i]);
	    }
    }

    for(de=0;de<x;de++){
	    memcpy(f[de],r[de],6);
    }
   de=0;
   for(de=0;de<x;de++){
	    for(g=0;g<1000;g++){
	    	m=0;
	    	u=0;
	    	while(r[de][0]!=r[0][0]||r[de][5]!=r[0][5]){
		    	u=r[de][0];
		    	r[de][0]=r[de][4];
		    	r[de][4]=r[de][5];
		    	r[de][5]=r[de][1];
		    	r[de][1]=u;
		    	m++;
		    	if(m==7){
		    		break;
		    	}
	    	}
	    	y=0;
	    	u=0;
	  	  while(r[de][1]!=r[0][1]||r[de][5]!=r[0][5]){
		    	u=r[de][1];
		    	r[de][1]=r[de][2];
		    	r[de][2]=r[de][4];
		    	r[de][4]=r[de][3];
		    	r[de][3]=u;
		    	y++;
		    	if(y==20)break;
		    	if(m==7||y==7){
		    		as=0;
		    		while(r[de][0]!=r[0][0]&&r[de][5]!=r[0][5]){
		    	u=r[de][0];
		    	r[de][0]=r[de][4];
		    	r[de][4]=r[de][5];
		    	r[de][5]=r[de][1];
		    	r[de][1]=u;
		    	if(as==20)break;
		    		}
		    		if(as==20)break;
		    	}
	   	 }
	   	 	y=0;
	   	 	u=0;
	  	  while(r[de][1]!=r[0][1]&&r[de][5]!=r[0][5]){
		    	u=r[de][1];
		    	r[de][1]=r[de][2];
		    	r[de][2]=r[de][4];
		    	r[de][4]=r[de][3];
		    	r[de][3]=u;
		    	y++;
		    	if(y==20)break;
		    	if(m==7||y==7){
		    		as=0;
		    		while(r[de][0]!=r[0][0]&&r[de][5]!=r[0][5]){
		    	u=r[de][0];
		    	r[de][0]=r[de][4];
		    	r[de][4]=r[de][5];
		    	r[de][5]=r[de][1];
		    	r[de][1]=u;
		    	if(as==20)break;
		    		}if(as==20)break;
		    	}
	   	 }
	    }
   }
   for(de=1;de<x;de++){
	if(r[0][0]==r[de][0]&&r[0][1]==r[de][1]&&r[0][2]==r[de][2]&&r[0][3]==r[de][3]&&r[0][4]==r[de][4]&&r[0][5]==r[de][5])
	{
		j++;
	}
   }
   if(j>0){
   		printf("No\n");
   }else{
   	printf("Yes\n");
   }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:69: error: redeclaration of 'u' with no linkage
    3 |     int i,u,y=0,e=0,g,m=0,q,z=0,de,r[100][6]={0},f[100][6]={0},as=0,u=0,x=0,j=0;
      |                                                                     ^
main.c:3:11: note: previous declaration of 'u' with type 'int'
    3 |     int i,u,y=0,e=0,g,m=0,q,z=0,de,r[100][6]={0},f[100][6]={0},as=0,u=0,x=0,j=0;
      |           ^
main.c:12:13: error: implicit declaration of function 'memcpy' [-Wimplicit-function-declaration]
   12 |             memcpy(f[de],r[de],6);
      |             ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'memcpy'
    1 | #include<stdio.h>
  +++ |+#include <string.h>
    2 | int main(void){
main.c:12:13: warning: incompatible implicit declaration of built-in function 'memcpy' [-Wbuiltin-declaration-mismatch]
   12 |             memcpy(f[de],r[de],6);
      |             ^~~~~~
main.c:12:13: note: include '<string.h>' or provide a declaration of 'memcpy'
Language: C

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

void turn(int *DICE,char com);

int main(void){
int i,j,k,f,n,top,front;
int DICE[6][105];
char com[105];
scanf("%d",&n);
for(j=0;j<n;j++){
	for(i=0;i<6;i++){scanf("%d",&DICE[i][j]);}
	}
for(k=0;i<n-1;k++){
	top=DICE[0][i];front=DICE[1][i];
	for(j=k+1;j<n;j+;){
		i=0;
		strcpy(com,"SSSSESSSS");
		while(DICE[1]!=front){
			if(com[i]=='\0'){break;}
			turn(DICE[0][j],com[i]);
			i++;
			}
		i=0;
		strcpy(com,"EEEE");
		while(DICE[1]!=top){
			if(com[i]=='\0'){break;}
			turn(DICE[0][j],com[i]);
			i++;
			}
		f=0;
		for(i=0;i<6;i++){if(DICE[i][k]!=DICE[i][j]){f=1;break;}else{f=0;}}
		if(f==0){printf("No\n");return 0;}
		}
	}
	printf("Yes\n");
return 0;
}

void turn(int *DICE,char com){
int temp;
switch(com){
	case 'N':
		temp     =*DICE;
		*DICE    =*(DICE+1);
		*(DICE+1)=*(DICE+5);
		*(DICE+5)=*(DICE+4);
		*(DICE+4)=temp;
		break;
	case 'S':
		temp     =*DICE;
		*DICE    =*(DICE+4);
		*(DICE+4)=*(DICE+5);
		*(DICE+5)=*(DICE+1);
		*(DICE+1)=temp;
		break;
	case 'E':
		temp     =*DICE;
		*DICE    =*(DICE+3);
		*(DICE+3)=*(DICE+5);
		*(DICE+5)=*(DICE+2);
		*(DICE+2)=temp;
		break;
	case 'W':
		temp     =*DICE;
		*DICE    =*(DICE+2);
		*(DICE+2)=*(DICE+5);
		*(DICE+5)=*(DICE+3);
		*(DICE+3)=temp;
		break;
	}
}

Compiler output:
main.c: In function 'main':
main.c:16:25: error: expected expression before ';' token
   16 |         for(j=k+1;j<n;j+;){
      |                         ^
main.c:19:30: warning: comparison between pointer and integer
   19 |                 while(DICE[1]!=front){
      |                              ^~
main.c:21:37: error: passing argument 1 of 'turn' makes pointer from integer without a cast [-Wint-conversion]
   21 |                         turn(DICE[0][j],com[i]);
      |                              ~~~~~~~^~~
      |                                     |
      |                                     int
main.c:4:16: note: expected 'int *' but argument is of type 'int'
    4 | void turn(int *DICE,char com);
      |           ~~~~~^~~~
main.c:26:30: warning: comparison between pointer and integer
   26 |                 while(DICE[1]!=top){
      |                              ^~
main.c:28:37: error: passing argument 1 of 'turn' makes pointer from integer without a cast [-Wint-conversion]
   28 |                         turn(DICE[0][j],com[i]);
      |                              ~~~~~~~^~~
      |                                     |
      |                                     int
main.c:4:16: note: expected 'int *' but argument is of type 'int'
    4 | void turn(int *DICE,char com);
      |           ~~~~~^~~~
Language: C

#include<stdio.h>
#include<stdlib.h>
struct DICE {
        int data;
        struct DICE *N;
        struct DICE *E;
        struct DICE *S;
        struct DICE *W;
        struct DICE *B;
        };
 
struct DICE *turn(struct DICE *NOW,char com);
int dice_check(struct DICE *NOW,struct DICE *A);
 
int main(void){
struct DICE A[7],B[7],*NOW;
int i,j,k,n,up,front,data[105][7];
 
scanf("%d",&n);
for(j=0;j<n;j++){
	for(i=0;i<6;i++){
    	scanf("%d",&data[j][i]);
	}
}
for(k=0;k<c-1;k++){
    A[0].data=data[k][0];
    A[1].data=data[k][1];
    A[2].data=data[k][2];
    A[3].data=data[k][3];
    A[4].data=data[k][4];
    A[5].data=data[k][5];
 
    A[0].N=&A[4];
    A[0].E=&A[2];
    A[0].S=&A[1];
    A[0].W=&A[3];
    A[0].B=&A[5];
 
    for(j=k+1;j<c;j++){
 
    B[0].data=data[j][0];
    B[1].data=data[j][1];
    B[2].data=data[j][2];
    B[3].data=data[j][3];
    B[4].data=data[j][4];
    B[5].data=data[j][5];
 
    B[0].N=&B[4];
    B[0].E=&B[2];
    B[0].S=&B[1];
    B[0].W=&B[3];
    B[0].B=&B[5];
 
NOW=&B[0];
up=A[0].data;
front=A[0].S->data;
 
while(1){
    for(i=0;i<4;i++){
        if(NOW->S->data==front){break;}
        NOW=turn(NOW,'S');
        }
    if(i==4){NOW=turn(NOW,'E');}else{break;}
    }
for(i=0;i<4;i++){
    if(NOW->data==up){break;}
    NOW=turn(NOW,'E');
    }
    if(dice_check(NOW,&A[0])!=0){printf("No\n");return 0;}
 
    }
}
printf("Yes\n");
return 0;
}
 
struct DICE *turn(struct DICE *NOW,char com){
    struct DICE *TEMP;
    TEMP=NOW;
    switch(com){
    case 'N':
        NOW=NOW->S;
        NOW->N=TEMP;
        NOW->S=TEMP->B;
        NOW->E=TEMP->E;
        NOW->W=TEMP->W;
        NOW->B=TEMP->N;
        break;
    case 'S':
        NOW=NOW->N;
        NOW->N=TEMP->B;
        NOW->S=TEMP;
        NOW->E=TEMP->E;
        NOW->W=TEMP->W;
        NOW->B=TEMP->S;
        break;
    case 'E':
        NOW=NOW->W;
        NOW->N=TEMP->N;
        NOW->S=TEMP->S;
        NOW->E=TEMP;
        NOW->W=TEMP->B;
        NOW->B=TEMP->E;
        break;
    case 'W':
        NOW=NOW->E;
        NOW->N=TEMP->N;
        NOW->S=TEMP->S;
        NOW->E=TEMP->B;
        NOW->W=TEMP;
        NOW->B=TEMP->W;
        break;
    }
    return(NOW);
}
int dice_check(struct DICE *NOW,struct DICE *A){
 
    if(NOW->data==A->data && NOW->S->data==A->S->data && NOW->N->data==A->N->data && NOW->E->data==A->E->data && NOW->W->data==A->W->data && NOW->B->data==A->B->data){return 1;}else{return 0;}
 
}

Compiler output:
main.c: In function 'main':
main.c:25:11: error: 'c' undeclared (first use in this function)
   25 | for(k=0;k<c-1;k++){
      |           ^
main.c:25:11: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <iostream>
#include <vector>

using namespace std;

class Dice
{
  public:
    vector<int> diceNum;
    Dice(vector<int>& inputs);
    void toW();
    void toS();
    void ParallelRotation();
};

Dice::Dice(vector<int>& inputs)
{
  diceNum=inputs;
}

void Dice::toW()
{
  swap(diceNum[0],diceNum[3]);
  swap(diceNum[0],diceNum[5]);
  swap(diceNum[0],diceNum[2]);
}

void Dice::toS()
{
  swap(diceNum[0],diceNum[1]);
  swap(diceNum[0],diceNum[5]);
  swap(diceNum[0],diceNum[4]);
}

void Dice::ParallelRotation()
{
  swap(diceNum[1],diceNum[2]);
  swap(diceNum[2],diceNum[4]);
  swap(diceNum[4],diceNum[3]);
}

bool Judge(Dice& dice1,Dice& dice2)
{
  int count=0;
  for(int i=0;i<6;i++)
  {
    if(dice1.diceNum[i]==dice2.diceNum[i]) count++;
  }
  if(count==6)return true;
  else return false;
    
}

bool preJudge(Dice& dice1,Dice& dice2)
{
  int count=0;
  bool flag=false;
  while(1)
  {
    dice2.toS();
    for(int j=0;j<4;j++)
    {
      dice2.ParallelRotation();
      flag=Judge(dice1,dice2);
      if(flag==true) break;
    }
    if(flag==true) break;
    dice2.toW();
    for(int j=0;j<4;j++)
    {
      dice2.ParallelRotation();
      flag=Judge(dice1,dice2);
      if(flag==true) break;
    }
    count++;
    if(flag==true) break;
    if(count==3)break;
  } 
  return flag;
}

int main(int argc,char* argv[])
{
  vector<int> inputs(6);
  int number;
  int count =0;
  cin >> number;
  bool flag=false;
  
  vector<Dice> Dices;
  for(int i=0;i<number;i++)
  {
    for(int j=0;j<6;j++)
    {
      cin >> inputs[j];
    }
    Dices.push_back(Dice(inputs));
  }
  for(int i=0;i<number-1;i++)
  {
    for(int j=i+1;j<number;j++)
    {
      flag = preJudge(Dices[i],Dices[j]);
      if(flag==true) break;
    }
    if(flag==true) break;
  }
  if(flag==true) cout << "No" << endl;
  else if(flag==false) cout << "Yes" << endl;
}

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

#include<stdio.h>
#include<string.h>
int main(void){
    int f = 0, i,o, j, l, z, q, k[6], s[100][6], n[6], n2[6];
    char c;
    scanf("%d",&q);
    for (z = 0; z < q; z++){
        for (i = 0; i < 6; i++){
            scanf("%d", &s[z][i]);
            n[i] = i;
        }
    }
    for (i = 0; i < q; i++){
        for (z = 0; z < q; z++){
            if (i != z){
                for (j = 0; j < 19; j++){
                    if (j%6<3　&&　j% 5 == 4){
                        n2[0] = n[1]; 
                        n2[1] = n[5]; 
                        n2[3] = n[3]; 
                        n2[4] = n[0]; 
                        n2[2] = n[2]; 
                        n2[5] = n[4];
                    }
                    else {
                        n2[0] = n[3]; 
                        n2[1] = n[1]; 
                        n2[3] = n[5]; 
                        n2[4] = n[4]; 
                        n2[2] = n[0]; 
                        n2[5] = n[2];
                    }
                    for (o = 0; o < 6; o++){
                        n[o] = n2[o];
                    }
                    for (l = 0; l < 6; l++){
                        if (s[i][l] != s[z][n[l]])break;
   
                    }
                    if (l == 6){ 
                        f = 1; 
                        break;
                    }
   
                }
            }
            if (f == 1)break;
        }
        if (f == 1)break;
    }
        if (f == 1)printf("No\n");
        else printf("Yes\n");
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:17:30: error: stray '\343' in program
   17 |                     if (j%6<3<U+3000>&&<U+3000>j% 5 == 4){
      |                              ^~~~~~~~
main.c:17:34: error: stray '\343' in program
   17 |                     if (j%6<3<U+3000>&&<U+3000>j% 5 == 4){
      |                                        ^~~~~~~~
Language: C

#include<stdio.h>
#include<string.h>
int main(void){
    int f = 0, i,o, j, l, z, q, k[6], s[100][6], n[6], n2[6];
    char c;
    scanf("%d",&q);
    for (z = 0; z < q; z++){
        for (i = 0; i < 6; i++){
            scanf("%d", &s[z][i]);
            n[i] = i;
        }
    }
    for (i = 0; i < q; i++){
        for (z = 0; z < q; z++){
            if (i != z){
                for (j = 0; j < 5000; j++){
                    if (j % 6 < 3　&&　j % 5 == 4){
                        n2[0] = n[1]; 
                        n2[1] = n[5]; 
                        n2[3] = n[3]; 
                        n2[4] = n[0]; 
                        n2[2] = n[2]; 
                        n2[5] = n[4];
                    }
                    else {
                        n2[0] = n[3]; 
                        n2[1] = n[1]; 
                        n2[3] = n[5]; 
                        n2[4] = n[4]; 
                        n2[2] = n[0]; 
                        n2[5] = n[2];
                    }
                    for (o = 0; o < 6; o++){
                        n[o] = n2[o];
                    }
                    for (l = 0; l < 6; l++){
                        if (s[i][l] != s[z][n[l]])break;
   
                    }
                    if (l == 6){ 
                        f = 1; 
                        break;
                    }
   
                }
            }
            if (f == 1)break;
        }
        if (f == 1)break;
    }
        if (f == 1)printf("No\n");
        else printf("Yes\n");
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:17:34: error: stray '\343' in program
   17 |                     if (j % 6 < 3<U+3000>&&<U+3000>j % 5 == 4){
      |                                  ^~~~~~~~
main.c:17:38: error: stray '\343' in program
   17 |                     if (j % 6 < 3<U+3000>&&<U+3000>j % 5 == 4){
      |                                            ^~~~~~~~
Language: C

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

int main(int argc, const char * argv[])
{
    int m[100][6];
    int tmp, n;
    int flag = 0;
    int count = 0;
    int i, j, k;
    int ii, jj, kk;

    scanf("%d", &n);

    for(i = 0; i < n; i++){
        scanf("%d %d %d %d %d %d", &m[i][0], &m[i][1], &m[i][2], &m[i][3], &m[i][4], &m[i][5]);
    }

    for(ii = n; ii > 1; ii--){
        for(jj = count+1; jj < ii; jj++){

        

            for(i = 0; i < 4; i++){
                tmp = m[jj][0];
                m[jj][0] = m[jj][4];
                m[jj][4] = m[jj][5];
                m[jj][5] = m[jj][1];
                m[jj][1] = tmp;

                for(j = 0; j < 4; j++){        
                    tmp = m[jj][0];
                    m[jj][0] = m[jj][2];
                    m[jj][2] = m[jj][5];
                    m[jj][5] = m[jj][3];
                    m[jj][3] = tmp;

                    for(k = 0; k < 4; k++){
                        tmp = m[jj][0];
                        m[jj][0] = m[jj][4];
                        m[jj][4] = m[jj][5];
                        m[jj][5] = m[jj][1];
                        m[jj][1] = tmp;

                        if(memcmp(m[count], m[jj], sizeof(int) * 6) == 0 ){
                    `        flag = 1;
                        }
                    }
                }
            }
        }
        count++;
    }

    if(flag){
        printf("No\n");
    }else{
        printf("Yes\n");
    }

    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:47:21: error: stray '`' in program
   47 |                     `        flag = 1;
      |                     ^
Language: C

#include <stdio.h>
int main(void){
   int n,i,j,k,l;
   int dice[24][6];
   int label[24][6]={{1,2,3,4,5,6},{1,3,5,2,4,6},{1,4,2,5,3,6},{1,5,4,3,2,6},{2,1,4,3,6,5},{2,3,1,6,4,5},
   {2,4,6,1,3,5},{2,6,3,4,1,5},{3,1,2,5,6,4},{3,2,6,1,5,4},{3,5,1,6,2,4},{3,6,5,2,1,4},{4,1,5,2,6,3},
   {4,2,1,6,5,3},{4,5,6,1,2,3},{4,6,2,5,1,3},{5,1,3,4,6,2},{5,3,6,1,4,2},{5,4,1,6,3,2},{5,6,4,3,1,2},
   {6,2,4,3,5,1},{6,3,2,5,4,1},{6,4,5,2,3,1},{6,5,3,4,2,1}};
   
   scanf("%d",&n);
   int dices[n][6];
   
   for(i=0;i<n;i++){
       for(j=0;j<6;j++) scanf("%d",&dices[i][j]);
   }
   
   /*for(i=0;i<n;i++){
       for(j=0;j<6;j++) {
           printf("%d",dices[i][j]);
       }
       putchar('\n');
   }*/
   
   for(i=0;i<n-1;i++){
       for(j=i+1;j<n;j++){
           
           for(k=0;k<24;k++){
               for(l=0;l<6;l++) dice[k][l]=dices[j][label[k][l]-1];
           }
           
          /* for(k=0;k<24;k++){
               for(l=0;l<6;l++) {
                   printf("%d",dice[k][l]);
               }
               putchar('\n');
           }*/
           
           for(k=0;k<24;k++){
               for(l=0;l<6;l++) {
                   if(dice[k][l]!=dices[i][l]) {
                       break;
                   }
               }
               if(l==6){
                    printf("No\n");
                    return 0;
               }else{
                   tem=0;
               }
           }
       }
   }
   
   printf("Yes\n");
   return 0;
}



Compiler output:
main.c: In function 'main':
main.c:48:20: error: 'tem' undeclared (first use in this function)
   48 |                    tem=0;
      |                    ^~~
main.c:48:20: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
 
int main(void) {
  int dice[101][6],subdice[6],i,j,k,l,n,a[6],b[6],subA,subB;
  scanf("%d",&n);
  for(i = 0; i < n; i++)for(j = 0; j < 6; j++)scanf("%d",&dice[i][j]);

  for(i = 0; i < n; i++){
    for(j = i + 1; j < n; j++){
      if(dice[i][0] == dice[j][0]);
      else if(dice[i][0] == dice[j][1] || dice[i][0] == dice[j][4]){
        for(k = 0; k < 6; k++){
          subdice[0] = dice[j][4];
          subdice[4] = dice[j][5];
          subdice[5] = dice[j][1];
          subdice[1] = dice[j][0];
          subdice[2] = dice[j][2];
          subdice[3] = dice[j][3];
          for(l = 0; l < 6; l++)dice[j][l] = subdice[l];
          if(dice[i][0] == dice[j][0])break;
        }
      }
       else(dice[i][0] == dice[j][2] || dice[i][0] == dice[j][3] || dice[i][0] == dice[j][5]){
        for(k = 0; k < 6; k++){
          subdice[0] = dice[j][2];
          subdice[2] = dice[j][5];
          subdice[5] = dice[j][3];
          subdice[3] = dice[j][0];
          subdice[1] = dice[j][1];
          subdice[4] = dice[j][4];
          for(l = 0; l < 6; l++)dice[j][l] = subdice[l];
          if(dice[i][0] == dice[j][0])break;
        }
      }
      for(k = 0; k < 4; k++){
        subdice[1] = dice[j][2];
        subdice[2] = dice[j][4];
        subdice[4] = dice[j][3];
        subdice[3] = dice[j][1];
        for(l = 1; l < 5; l++)dice[j][l] = subdice[l];
        if(dice[i][1] == dice[j][1]){
          if(dice[i][2] == dice[j][2] && dice[i][3] == dice[j][3] && dice[i][4] == dice[j][4] && dice[i][5] == dice[j][5]){
            printf("No\n");
            return 0;
          }
        }
      }
    }
  }
  if(i == n && j == n)printf("Yes\n");
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:23:94: error: expected ';' before '{' token
   23 |        else(dice[i][0] == dice[j][2] || dice[i][0] == dice[j][3] || dice[i][0] == dice[j][5]){
      |                                                                                              ^
      |                                                                                              ;
Language: C++

#include<iostream>
using namespace std;

class Dice{
  private:
    int* num;
  public:
    Dice(){
      num = new int[6];
    };
    ~Dice(){
      delete[] num;
    };
    void DiceSet(int index, int x){
      num[index] = x;
    };
    void DiceRoll(char x){
      switch(x){
        case 'E':
	  SwapFour(num[0],num[2],num[5],num[3]);
	  break;
	case 'S':
	  SwapFour(num[0],num[1],num[5],num[4]);
	  break;
	case 'W':
	  SwapFour(num[0],num[3],num[5],num[2]);
	  break;
	case 'N':
	  SwapFour(num[0],num[4],num[5],num[1]);
	  break;
      }
    };
    int DicePutTop(){
      return num[0];
    }
    int DicePutX(int x){
      return num[x];
    }
  private:
    // a->b->c->d->a
    void SwapFour(int &a, int &b, int &c, int &d){
      a ^= b; b ^= a; a ^= b;
      a ^= c; c ^= a; a ^= c;
      a ^= d; d ^= a; a ^= d;
    }
};

bool DiceIsSame(Dice d_1, Dice d_2){
  if(d_1.DicePutX(2) == d_2.DicePutX(0)) d_1.DiceRoll('W');
  if(d_1.DicePutX(3) == d_2.DicePutX(0)) d_1.DiceRoll('E');
  for(int i=0;i<4;i++){
    d_1.DiceRoll('N');
    if(d_1.DicePutX(0) == d_2.DicePutX(0)){
      for(int j=0;j<4;j++){
        d_1.DiceRoll('E'); d_1.DiceRoll('N'); d_1.DiceRoll('W');
	if(d_1.DicePutX(1) == d_2.DicePutX(1)){
	  for(int k=0;k<6;k++){
	    if(d_1.DicePutX(k) != d_2.DicePutX(k)){
	      return false;
	    }
	  }
	  return true;
	}
      }
    }
  }
  return false;
}

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

  Dice* dices = Dice[n];
  for(int i=0;i<n;i++){
    for(int j=0;j<6;j++){
      int x;
      cin >> x;
      dices[i].DiceSet(j, x);
    }
  }

  for(int i=1;i<n;i++){
    if(DiceIsSame(dices[0], dices[i])){
      cout << "No" << endl;
      break;
    }
    else if(i == n-1)
      cout << "Yes" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:74:21: error: expected primary-expression before '[' token
   74 |   Dice* dices = Dice[n];
      |                     ^
Language: C++

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

class DICE
{
private:
	const int dice_tem[4][6] = { { 3,2,6,1,5,4 },{ 2,6,3,4,1,5 },
	{ 5,1,3,4,6,2 },{ 4,2,1,6,5,3 } };
	const int sort_num[6] = { 1,4,2,5,3 ,6 };
	static int top;
	static int front;
	const int n = 6;
	int dice_i[6] = { 0 };
	int dice_j[6] = { 0 };
	int ee[6];
	int p;

	void setup() {
		for (int i = 0; i < n; i++) {
			cin >> dice[i];
			dice_i[i] = dice[i];
			ee[i] = dice[i];
		}
		sort(ee, ee + n);
		for (int i = 0, o = 0; i < n && o < 2; i++) {
			ee[o] = ee[i];
			if (ee[m] != ee[i])o++;
		}
		if (m == 0) {

			top = ee[0];
			front = ee[1];
		}
	}

	void dice_sort() {
		for (int d = 0; dice_i[0] != top; d++) {
			for (int i = 0; i < n; i++) {
				dice_j[i] = dice_i[dice_tem[d % 2][i] - 1];
			}
			for (int i = 0; i < n; i++)dice_i[i] = dice_j[i];
		}
		for (p = 0; p < 4; p++) {
			for (int i = 0; i < n; i++) {
				dice_j[i] = dice_i[dice_tem[p][i] - 1];
			}
			if (front == dice_j[0]) break;
		}
		int a = p == 0 ? 3 : p == 1 ? 0 : p == 2 ? 2 : p == 3 ? 1 : -1;
		if (a == 0) {
			for (int i = 0; i < n; i++)sort_dice[i] = dice_i[i];
		}
		else {
			for (int q = 0; q < a; q++) {
				for (int i = 0; i < n; i++) sort_dice[i] = dice_i[sort_num[i] - 1];
				for (int i = 0; i < n; i++) dice_i[i] = sort_dice[i];
			}
		}
	}

public:
	int dice[6];
	int sort_dice[6];
	static int m;
	DICE() {
		setup();
		dice_sort();
		m++;
	}
};
int DICE::m = 0;
int DICE::top = 0;
int DICE::front = 0;
int main() {
	const int n = 6;
	bool flag = true;
	int num;
	cin >> num;
	DICE corr;

	for (int i = 0; i < num - 1 && flag == true; i++) {
		DICE che;
		int w = 0;
		for (w = 0; w < n; w++) {
			if (corr.sort_dice[w] != che.sort_dice[w]) {
				break;
			}
		}
		if (w == n)flag = false;
	}

	if (flag == true) {
		cout << "Yes" << endl;
	}
	else if (flag == false) {
		cout << "No" << endl;

	return 0;
}



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

#include<iostream>
using namespace std;

class dice{
    public:
    int num[6], new_num[6];
    void refresh();
    void turnN();
    void turnS();
    void turnE();
    void turnW();
};
void dice::refresh(){
    for(int i=0;i<6;i++){
        num[i] = new_num[i];
    }
}

void dice::turnN(){
    new_num[0] = num[1];
    new_num[1] = num[5];
    new_num[2] = num[2];
    new_num[3] = num[3];
    new_num[4] = num[0];
    new_num[5] = num[4];
    
}

void dice::turnS(){
    new_num[0] = num[4];
    new_num[1] = num[0];
    new_num[2] = num[2];
    new_num[3] = num[3];
    new_num[4] = num[5];
    new_num[5] = num[1];
}

void dice::turnE(){
    new_num[0] = num[3];
    new_num[1] = num[1];
    new_num[2] = num[0];
    new_num[3] = num[5];
    new_num[4] = num[4];
    new_num[5] = num[2];
}

void dice::turnW(){
    new_num[0] = num[2];
    new_num[1] = num[1];
    new_num[2] = num[5];
    new_num[3] = num[0];
    new_num[4] = num[4];
    new_num[5] = num[3];
}


int main(){
    
    int n;
    
    cin >> n;
    
    dice a[n];
    bool flag = false;
    
    //input
    for(int i=0;i<n;i++){
        for(int j=0;j<6;j++){
            cin >> a[i].num[j];
        }
    }
    
    for(int m=0;m<n-1;m++){
        for(int l=m+1;l<n;l++){
            for(int k=0;k<4;k++){
                for(int j=0;j<4;j++){
                    for(int i=0;i<4;i++){
                        if(a[m].num[1]==a[l].num[1] && a[m].num[2]==a[l].num[2] && a[m].num[3]==a[l].num[3] && a[m].num[4]==a[l].num[4] && a[m].num[5]==a[l].num[5] && a[m].num[0]==a[l].num[0]){
                            flag = true;
                        }
                        a.turnW();
                        a.refresh();
                    }
                    a.turnS();
                    a.refresh();
                }
                a.turnW();
                a.refresh();
            }
        }
    }

    if(flag == false){
        cout << "Yes" << endl;
    }else{
        cout << "No" <<endl;
    }
    
    return 0;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:81:27: error: request for member 'turnW' in 'a', which is of non-class type 'dice [n]'
   81 |                         a.turnW();
      |                           ^~~~~
a.cc:82:27: error: request for member 'refresh' in 'a', which is of non-class type 'dice [n]'
   82 |                         a.refresh();
      |                           ^~~~~~~
a.cc:84:23: error: request for member 'turnS' in 'a', which is of non-class type 'dice [n]'
   84 |                     a.turnS();
      |                       ^~~~~
a.cc:85:23: error: request for member 'refresh' in 'a', which is of non-class type 'dice [n]'
   85 |                     a.refresh();
      |                       ^~~~~~~
a.cc:87:19: error: request for member 'turnW' in 'a', which is of non-class type 'dice [n]'
   87 |                 a.turnW();
      |                   ^~~~~
a.cc:88:19: error: request for member 'refresh' in 'a', which is of non-class type 'dice [n]'
   88 |                 a.refresh();
      |                   ^~~~~~~
Language: C++

#include <bits/stdc++.h>
#define _USE_MATH_DEFINES
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, n) FOR(i, 0, n)

using namespace std;

class Dice
{
public:
    int label[6], tmp;

    void in()
    {
        rep(i, 6) scanf("%d", &label[i]);
    }

    void rollS()
    {
        tmp = label[0];
        label[0] = label[4];
        label[4] = label[5];
        label[5] = label[1];
        label[1] = tmp;
    }

    void rollN()
    {
        tmp = label[0];
        label[0] = label[1];
        label[1] = label[5];
        label[5] = label[4];
        label[4] = tmp;
    }

    void rollE()
    {
        tmp = label[0];
        label[0] = label[3];
        label[3] = label[5];
        label[5] = label[2];
        label[2] = tmp;
    }

    void rollW()
    {
        tmp = label[0];
        label[0] = label[2];
        label[2] = label[5];
        label[5] = label[3];
        label[3] = tmp;
    }

    void sideturn()
    {
        tmp = label[1];
        label[1] = label[2];
        label[2] = label[4];
        label[4] = label[3];
        label[3] = tmp;
    }
};

bool check2(Dice d1, Dice d2)
{
    bool c = true;
    FOR(i, 1, 5)
    {
        c = c && d1.label[i] == d2.label[i];
    }

    return c;
}

bool check1(Dice d1, Dice d2)
{
    bool b = false;

    if (d1.label[0] == d2.label[0] && d1.label[5] == d2.label[5])
    {
        rep(i, 4)
        {
            b = b || check2(d1, d2);
            d2.sideturn();
        }
    }
    return b;
}

bool isSame(Dice d1, Dice d2)
{
    bool a = false;

    a = a || check1(d1, d2);
    d2.rollN();
    a = a || check1(d1, d2);
    d2.rollE();
    a = a || check1(d1, d2);
    d2.rollE();
    a = a || check1(d1, d2);
    d2.rollE();
    a = a || check1(d1, d2);
    d2.rollN();
    a = a || check1(d1, d2);

    return a;
}

int main()
{
    int n;
    bool ans = false;
    scanf("%d", &n);
    Dice dice[n];
    rep(i, n) dice[i].in;

    rep(i, n)
    {
        FOR(j, i + 1, n)
        {
            ans = ans || isSame(dice[i], dice[j]);
        }
    }

    if (ans)
        printf("No\n");
    else
        printf("Yes\n");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:115:23: error: invalid use of non-static member function 'void Dice::in()'
  115 |     rep(i, n) dice[i].in;
      |               ~~~~~~~~^~
a.cc:13:10: note: declared here
   13 |     void in()
      |          ^~
Language: C++

#include<iostream>
using namespace std;

class Dice {
    public:
	int f[7];
	Dice() {}
	void roll_x() { roll(1, 4, 6, 3); } // to E
	void roll_y() { roll(1, 2, 6, 5); } // to N
	void roll_z() { roll(2, 3, 5, 4); } // 上から見て時計回り
	void roll(int i, int j, int k, int l) {
		int t = f[i]; f[i] = f[j]; f[j] = f[k]; f[k] = f[l]; f[l] = t;
	}
};

bool judge(Dice c1, Dice c2) {
	for (int i = 1; i <= 6; i++) {
		if (c1.f[i] != c2.f[i]) return false;
	}
	return true;
}


bool getRight(Dice c1, Dice c2) {
	for (int i = 0; i < 6; i++) {
		for (int j = 0; j < 4; j++) {
			if (judge(c1, c2)) return true;
			c1.roll_z();
		}
		if (i % 2 == 0) c1.roll_x();
		else c1.roll_y();
	}
	return false;
}

Dice D[100]; int n;

bool check(){
    for(int i=0;i<n-1;i++){
        for(int j=i+1;j<n;j++){
            if(getRight(D[i],D[j])) return false;
        }
    }
    return true;
}

int main() {
    cin >> n;
    
    for(int i=0;i<n;i++){
        for(int j=1;j<=6;j++){
            cin >> D[i].f[j];
        }
    }

	if(cheak()) cout << "Yes" << endl;
    else cout << "No" << endl;
	return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:56:12: error: 'cheak' was not declared in this scope; did you mean 'check'?
   56 |         if(cheak()) cout << "Yes" << endl;
      |            ^~~~~
      |            check
Language: C++

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

// http://www.prefield.com/algorithm/misc/dice.html
enum FACE { TOP, BOTTOM, FRONT, BACK, LEFT, RIGHT };
class dice {
public:
	dice(int top,int front,int right,int left,int back,int bottom) {
		id[TOP] = top; id[FRONT] = front; id[RIGHT] = right;
		id[LEFT] = left; id[BACK] = back; id[BOTTOM] = bottom;
	}
	int& operator[] (FACE f) { return id[f]; }
	const int& operator[] (FACE f) const { return id[f]; }
	bool operator==(const dice &b) const {
		const dice &a = *this;
		return a[TOP] == b[TOP] && a[BOTTOM] == b[BOTTOM] &&
			a[FRONT] == b[FRONT] && a[BACK] == b[BACK] &&
			 a[LEFT] == b[LEFT] && a[RIGHT] == b[RIGHT];
	}
	void roll_north() { roll(TOP, FRONT, BOTTOM, BACK); }
	void roll_south() { roll(TOP, BACK, BOTTOM, FRONT); }
	void roll_east() { roll(TOP, LEFT, BOTTOM, RIGHT); }
	void roll_west() { roll(TOP, RIGHT, BOTTOM, LEFT); }
	void roll_right() { roll(FRONT, LEFT, BACK, RIGHT); }
	void roll_left() { roll(FRONT, RIGHT, BACK, LEFT); }
	void all_rolls(set<long long> &s){
		for (int k = 0; k < 6; (k&1?roll_east():roll_north()),++k)
			for (int i = 0; i < 4; roll_right(), ++i)
				s.insert(((long long)id[TOP]<<40) | ((long long)id[FRONT]<<32) | (id[RIGHT]<<24) | (id[LEFT]<<16) | (id[BACK]<<8) | (id[BOTTOM]<<0));
	}
private:
	void roll(FACE a, FACE b, FACE c, FACE d){
		int tmp = id[a];
		id[a] = id[b]; id[b] = id[c];
		id[c] = id[d]; id[d] = tmp;
	}
	int id[6];
};

int main(){
	int n,d[6];
	cin>>n;
	int i,j;
	set<long long>s;
	for(r=i=0;i<n;i++){
		for(j=0;j<6;j++)cin>>d[j];
		long long x=((long long)d[0]<<40) | ((long long)d[1]<<32) | (d[2]<<24) | (d[3]<<16) | (d[4]<<8) | (d[5]<<0);
		if(s.find(x)!=s.end()){
			cout<<"No"<<endl;
		else{
			dice di(d[0],d[1],d[2],d[3],d[4],d[5]);
			di.all_rolls(s);
		}
	}
	cout<<"Yes"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:47:13: error: 'r' was not declared in this scope
   47 |         for(r=i=0;i<n;i++){
      |             ^
a.cc:52:17: error: expected '}' before 'else'
   52 |                 else{
      |                 ^~~~
a.cc:50:39: note: to match this '{'
   50 |                 if(s.find(x)!=s.end()){
      |                                       ^
Language: C++

#include<vector>
#include<iostream>
using namespace std;
template <class data_t>
class dice{
	int comp_dice_spin(dice<data_t> d2);
public:
	vector<data_t> field;
	dice(){cout << "faild\n";exit(1);}
	dice(vector<data_t> v);
	void roll(char ch);
	data_t top(){return field[0];}
	int comp_dice_type(dice<data_t> d2);
	int comp_dice(dice<data_t> d2);
	void levorotation_spin(){roll('W');roll('N');roll('E');}
};
template <class data_t>
dice<data_t>::dice(vector<data_t> v){
	typename vector<data_t>::iterator vi = v.begin();
	while(vi!=v.end()){
		field.push_back(*vi);
		vi++;
	}
}
template <class data_t>
void dice<data_t>::roll(char ch){
	data_t tmp;
	switch(ch){
		case 'E':
			tmp = field[0];
			field[0] = field[3];
			field[3] = field[5];
			field[5] = field[2];
			field[2] = tmp;
			break;
		case 'N':
			tmp = field[0];
			field[0] = field[1];
			field[1] = field[5];
			field[5] = field[4];
			field[4] = tmp;
			break;
		case 'S':
			tmp = field[0];
			field[0] = field[4];
			field[4] = field[5];
			field[5] = field[1];
			field[1] = tmp;
			break;
		case 'W':
			tmp = field[0];
			field[0] = field[2];
			field[2] = field[5];
			field[5] = field[3];
			field[3] = tmp;
			break;
	}
	return;
}
template <class data_t>
int dice<data_t>::comp_dice(dice<data_t> d2){
	int c;
	for(c=0;c<6;c++){
		if(field[c] != d2.field[c]){
			return field[c] - d2.field[c];
		}
	}
	return 0;
}
template <class data_t>
int dice<data_t>::comp_dice_type(dice<data_t> d2){
	if(comp_dice_spin(d2) == 0)return 0;
	roll('N');
	if(comp_dice_spin(d2) == 0)return 0;
	roll('E');
	if(comp_dice_spin(d2) == 0)return 0;
	roll('E');
	if(comp_dice_spin(d2) == 0)return 0;
	roll('E');
	if(comp_dice_spin(d2) == 0)return 0;
	roll('N');
	if(comp_dice_spin(d2) == 0)return 0;
	return -1;
}
template <class data_t>
int dice<data_t>::comp_dice_spin(dice<data_t> d2){
	int i;
	for(i=0;i<4;i++){
		if(comp_dice(d2) == 0)
			return 0;
		levorotation_spin();
	}
	return -1;
}
int main(){
	int i, j, n;
	bool not_i_differ_all;
	vector<int> v(6);
	cin >> n;
	vector<dice<int> > dv;
	for(i=0;i<n;i++){
		cin >> v[0] >> v[1] >> v[2] >> v[3] >> v[4]>> v[5];
		dv.push_back(v);
	}
	for(i=0;i<n-1;i++){
		for(j=i+1;j<n;j++){
			if(dv[i].comp_dice_type(dv[j]) == 0){
				i=j=n;
				not_i_differ_all++;
			}
		}
	}
	if(not_i_differ_all){
		cout << "No\n";
	}else{
		cout << "Yes\n";
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:109:33: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
  109 |                                 not_i_differ_all++;
      |                                 ^~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
using namespace std;

class Dice
{
public:
	long top, front, right, left, back, bottom;
	Dice(long top, long front, long right, long left, long back, long bottom);
	void north();
	void south();
	void west();
	void east();
	void adjustTop(long top);
	void rotateRight();
};

Dice::Dice(long top, long front, long right, long left, long back, long bottom){
	this->top = top;
	this->front = front;
	this->right = right;
	this->left = left;
	this->back = back;
	this->bottom = bottom;
}

void Dice::north(){
	long sv[6];
	sv[0] = this->front;
	sv[1] = this->bottom;
	sv[2] = this->right;
	sv[3] = this->left;
	sv[4] = this->top;
	sv[5] = this->back;

	this->top = sv[0];
	this->front = sv[1];
	this->right = sv[2];
	this->left = sv[3];
	this->back = sv[4];
	this->bottom = sv[5];
}

void Dice::south(){
	long sv[6];
	sv[0] = this->back;
	sv[1] = this->top;
	sv[2] = this->right;
	sv[3] = this->left;
	sv[4] = this->bottom;
	sv[5] = this->front;

	this->top = sv[0];
	this->front = sv[1];
	this->right = sv[2];
	this->left = sv[3];
	this->back = sv[4];
	this->bottom = sv[5];
}

void Dice::west(){
	long sv[6];
	sv[0] = this->right;
	sv[1] = this->front;
	sv[2] = this->bottom;
	sv[3] = this->top;
	sv[4] = this->back;
	sv[5] = this->left;

	this->top = sv[0];
	this->front = sv[1];
	this->right = sv[2];
	this->left = sv[3];
	this->back = sv[4];
	this->bottom = sv[5];
}

void Dice::east(){
	long sv[6];
	sv[0] = this->left;
	sv[1] = this->front;
	sv[2] = this->top;
	sv[3] = this->bottom;
	sv[4] = this->back;
	sv[5] = this->right;

	this->top = sv[0];
	this->front = sv[1];
	this->right = sv[2];
	this->left = sv[3];
	this->back = sv[4];
	this->bottom = sv[5];
}

void Dice::adjustTop(long top){
	if (top == this->front) Dice::north();
	else if (top == this->right) Dice::west();
	else if (top == this->left) Dice::east();
	else if (top == this->back) Dice::south();
	else if (top == this->bottom) for (long i = 0; i < 2; i++) Dice::north();
}

void Dice::rotateRight(){
	long sv[4];
	sv[0] = this->front;
	sv[1] = this->right;
	sv[2] = this->left;
	sv[3] = this->back;

	this->front = sv[1];
	this->right = sv[0];
	this->left = sv[3];
	this->back = sv[2];
}

int main(){
	long n;
	cin >> n;
	long top1, front1, right1, left1, back1, bottom1;
	cin >> top1 >> front1 >> right1 >> left1 >> back1 >> bottom1;
	Dice *dice;
	long top, front, right, left, back, bottom;
	while (cin >> top >> front >> right >> left >> back >> bottom){
		dice = new Dice(top, front, right, left, back, bottom);
		dice->adjustTop(top1);
		for (long i = 0; i < 3; i++){
			if (d->front != front1) d->rotateRight();
		}
		if (d->top == top1 && d->front == front1 && d->right == right1){
			cout << "Yes" << endl;
		}
		else cout << "No" << endl;
		delete dice;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:126:29: error: 'd' was not declared in this scope
  126 |                         if (d->front != front1) d->rotateRight();
      |                             ^
a.cc:128:21: error: 'd' was not declared in this scope
  128 |                 if (d->top == top1 && d->front == front1 && d->right == right1){
      |                     ^
Language: C++

#include <iostream>
using namespace std;

class Dice
{
public:
	long top, front, right, left, back, bottom;
	Dice(long top, long front, long right, long left, long back, long bottom);
	void north();
	void south();
	void west();
	void east();
	void adjustTop(long top);
	void rotateRight();
};

Dice::Dice(long top, long front, long right, long left, long back, long bottom){
	this->top = top;
	this->front = front;
	this->right = right;
	this->left = left;
	this->back = back;
	this->bottom = bottom;
}

void Dice::north(){
	long sv[6];
	sv[0] = this->front;
	sv[1] = this->bottom;
	sv[2] = this->right;
	sv[3] = this->left;
	sv[4] = this->top;
	sv[5] = this->back;

	this->top = sv[0];
	this->front = sv[1];
	this->right = sv[2];
	this->left = sv[3];
	this->back = sv[4];
	this->bottom = sv[5];
}

void Dice::south(){
	long sv[6];
	sv[0] = this->back;
	sv[1] = this->top;
	sv[2] = this->right;
	sv[3] = this->left;
	sv[4] = this->bottom;
	sv[5] = this->front;

	this->top = sv[0];
	this->front = sv[1];
	this->right = sv[2];
	this->left = sv[3];
	this->back = sv[4];
	this->bottom = sv[5];
}

void Dice::west(){
	long sv[6];
	sv[0] = this->right;
	sv[1] = this->front;
	sv[2] = this->bottom;
	sv[3] = this->top;
	sv[4] = this->back;
	sv[5] = this->left;

	this->top = sv[0];
	this->front = sv[1];
	this->right = sv[2];
	this->left = sv[3];
	this->back = sv[4];
	this->bottom = sv[5];
}

void Dice::east(){
	long sv[6];
	sv[0] = this->left;
	sv[1] = this->front;
	sv[2] = this->top;
	sv[3] = this->bottom;
	sv[4] = this->back;
	sv[5] = this->right;

	this->top = sv[0];
	this->front = sv[1];
	this->right = sv[2];
	this->left = sv[3];
	this->back = sv[4];
	this->bottom = sv[5];
}

void Dice::adjustTop(long top){
	if (top == this->front) Dice::north();
	else if (top == this->right) Dice::west();
	else if (top == this->left) Dice::east();
	else if (top == this->back) Dice::south();
	else if (top == this->bottom) for (long i = 0; i < 2; i++) Dice::north();
}

void Dice::rotateRight(){
	long sv[4];
	sv[0] = this->front;
	sv[1] = this->right;
	sv[2] = this->left;
	sv[3] = this->back;

	this->front = sv[1];
	this->right = sv[0];
	this->left = sv[3];
	this->back = sv[2];
}

int main(){
	long n;
	cin >> n;
	long top1, front1, right1, left1, back1, bottom1;
	cin >> top1 >> front1 >> right1 >> left1 >> back1 >> bottom1;
	Dice *dice;
	long top, front, right, left, back, bottom;
	while (cin >> top >> front >> right >> left >> back >> bottom){
		dice = new Dice(top, front, right, left, back, bottom);
		dice->adjustTop(top1);
		for (long i = 0; i < 3; i++){
			if (dice->front != front1) d->rotateRight();
		}
		if (dice->top == top1 && dice->front == front1 && dice->right == right1){
			cout << "Yes" << endl;
		}
		else cout << "No" << endl;
		delete dice;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:126:52: error: 'd' was not declared in this scope
  126 |                         if (dice->front != front1) d->rotateRight();
      |                                                    ^
Language: C++

#include <iostream>
using namespace std;


int D[100][6];
//?????¢?????????
void spin(int n,char c)
{
    if(c=='E'){
        swap(D[n][0],D[n][3]);swap(D[n][3],D[n][5]);swap(D[n][5],D[n][2]);
    }
    else if(c=='W'){
        swap(D[n][0],D[n][2]);swap(D[n][2],D[n][5]);swap(D[n][5],D[n][3]);
    }
    else if(c=='S'){
        swap(D[n][0],D[n][1]);swap(D[n][0],D[n][4]);swap(D[n][4],D[n][5]);
    }
    else if(c=='N'){
        swap(D[n][0],D[n][1]);swap(D[n][1],D[n][5]);swap(D[n][5],D[n][4]);
    }
}

int main() {
    //?????????????????¬??§??\???
    int ans = 0;
    int n;
    cin >> n;
    for (int i = 0; i < n ; i++) {
        for (int j = 0; j < 6; j++) {
            cin >> D[i][j];
        }
    }
    for (int i = 0; i < n ; i++) {
        for (int j = i + 1; j <= n; j++) {
            //i????????????????????¨j???????????????????????????
            //?????¢???????????¢???????????????
            char SWS[7]={"SSSWSSS"};
            for(int k=0; k<7; k++){
                if(D[i][1] == D[j][1]) break;
                spin(j, SWS[k]);
            }
            //?????¢???????????¢???????????????
            for(int k=0; k<4; k++){
                if(D[i][0] == D[j][0]){
                    if(D[i][1] == D[j][1] && D[i][2] == D[j][2] && D[i][3] == D[j][3] && D[i][4] == D[j][4] && D[i][5] == D[j][5])
                        ans++;
                }
                spin(j, 'W');
            }
        }
    }
    //??????

    if (ans == 0) cout << "Yes" << endl;
    else cout << "No" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:26: error: initializer-string for 'char [7]' is too long [-fpermissive]
   37 |             char SWS[7]={"SSSWSSS"};
      |                          ^~~~~~~~~
Language: C++

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

class Dice{
public:
    long r[6];
    Dice();
    void roll(long s[]){
        swap(r[s[0]], r[s[1]]);
        swap(r[s[1]], r[s[2]]);
        swap(r[s[2]], r[s[3]]);
    }
    void spinW(){roll(0, 2, 5, 3);}
    void spinN(){roll(0, 1, 5, 4);}
};

int main() {
    int ans = 0;
    int n;
    cin >> n;
    vector<Dice> D(n);
    for (int i = 0; i < n ; i++) {
        for (int j = 0; j < 6; j++) cin >> d[i].r[j];
    }
    for (int i = 0; i < n ; i++) {
        for (int j = i + 1 ; j <= n ; j++) {
            char SWS[8]={"NNNWNNN"};
            for (int k = 0; k < 8; k++){
                if (D[i].r[1] == D[j].r[1]) break;
                if (SWS[k] == 'W') D[j].spinW();
                else D[j].spinN();
            }
            for (int k = 0; k < 4; k++){
                if (D[i].r[0] == D[j].r[0]){
                    if (D[i].r[1] == D[j].r[1] && D[i].r[2] == D[j].r[2] && D[i].r[3]==D[j].r[3] && D[i].r[4] == D[j].r[4] && D[i].r[5] == D[j].r[5])
                        ans++;
                }
                D[j].spinW();
            }
        }
    }

    if (ans == 0) cout << "Yes" << endl;
    else cout << "No" << endl;

    return 0;
}

Compiler output:
a.cc: In member function 'void Dice::spinW()':
a.cc:14:22: error: no matching function for call to 'Dice::roll(int, int, int, int)'
   14 |     void spinW(){roll(0, 2, 5, 3);}
      |                  ~~~~^~~~~~~~~~~~
a.cc:9:10: note: candidate: 'void Dice::roll(long int*)'
    9 |     void roll(long s[]){
      |          ^~~~
a.cc:9:10: note:   candidate expects 1 argument, 4 provided
a.cc: In member function 'void Dice::spinN()':
a.cc:15:22: error: no matching function for call to 'Dice::roll(int, int, int, int)'
   15 |     void spinN(){roll(0, 1, 5, 4);}
      |                  ~~~~^~~~~~~~~~~~
a.cc:9:10: note: candidate: 'void Dice::roll(long int*)'
    9 |     void roll(long s[]){
      |          ^~~~
a.cc:9:10: note:   candidate expects 1 argument, 4 provided
a.cc: In function 'int main()':
a.cc:24:44: error: 'd' was not declared in this scope
   24 |         for (int j = 0; j < 6; j++) cin >> d[i].r[j];
      |                                            ^
Language: C++

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

class Dice{
public:
    long r[6];
    Dice();
    void roll(long s[]){
        swap(r[s[0]], r[s[1]]);
        swap(r[s[1]], r[s[2]]);
        swap(r[s[2]], r[s[3]]);
    }
    void spinW(){roll({0, 2, 5, 3});}
    void spinN(){roll({0, 1, 5, 4});}
};

int main() {
    int ans = 0;
    int n;
    cin >> n;
    vector<Dice> D(n);
    for (int i = 0; i < n ; i++) {
        for (int j = 0; j < 6; j++) cin >> d[i].r[j];
    }
    for (int i = 0; i < n ; i++) {
        for (int j = i + 1 ; j <= n ; j++) {
            char SWS[8]={"NNNWNNN"};
            for (int k = 0; k < 8; k++){
                if (D[i].r[1] == D[j].r[1]) break;
                if (SWS[k] == 'W') D[j].spinW();
                else D[j].spinN();
            }
            for (int k = 0; k < 4; k++){
                if (D[i].r[0] == D[j].r[0]){
                    if (D[i].r[1] == D[j].r[1] && D[i].r[2] == D[j].r[2] && D[i].r[3]==D[j].r[3] && D[i].r[4] == D[j].r[4] && D[i].r[5] == D[j].r[5])
                        ans++;
                }
                D[j].spinW();
            }
        }
    }

    if (ans == 0) cout << "Yes" << endl;
    else cout << "No" << endl;

    return 0;
}

Compiler output:
a.cc: In member function 'void Dice::spinW()':
a.cc:14:22: error: cannot convert '<brace-enclosed initializer list>' to 'long int*'
   14 |     void spinW(){roll({0, 2, 5, 3});}
      |                  ~~~~^~~~~~~~~~~~~~
a.cc:9:20: note:   initializing argument 1 of 'void Dice::roll(long int*)'
    9 |     void roll(long s[]){
      |               ~~~~~^~~
a.cc: In member function 'void Dice::spinN()':
a.cc:15:22: error: cannot convert '<brace-enclosed initializer list>' to 'long int*'
   15 |     void spinN(){roll({0, 1, 5, 4});}
      |                  ~~~~^~~~~~~~~~~~~~
a.cc:9:20: note:   initializing argument 1 of 'void Dice::roll(long int*)'
    9 |     void roll(long s[]){
      |               ~~~~~^~~
a.cc: In function 'int main()':
a.cc:24:44: error: 'd' was not declared in this scope
   24 |         for (int j = 0; j < 6; j++) cin >> d[i].r[j];
      |                                            ^