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

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

void turn(int *DICE,char com);

int main(void){
int i,j,q,top,front;
int DICE1[6],DICE2[6];
char com[105];
for(i=0;i<6;i++){scanf("%d",&DICE1[i]);}
for(i=0;i<6;i++){scanf("%d",&DICE2[i]);}
top=DICE1[0];front=DICE1[2];
i=0;
strcpy(com,"SSSSESSSS");
while(DICE2[2]!=front){
	if(com[i]=='\0'){printf("No\n");return 0;}
	turn(&DICE2[0],com[i]);
	i++;
	}
i=0;
strcpy(com,"EEEE)";
while(DICE2[2]!=top){
	if(com[i]=='\0'){printf("No\n");return 0;}
	turn(&DICE2[0],com[i]);
	i++;
	}
for(i=0;i<6;i++){if(DICE1[i]!=DICE2[i]){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:21:19: error: expected ')' before ';' token
   21 | strcpy(com,"EEEE)";
      |       ~           ^
      |                   )
main.c:29:10: error: expected ';' before '}' token
   29 | return 0;
      |          ^
      |          ;
   30 | }
      | ~
Language: C

void throwdice_N(int x[6]){
    int tmp;
    tmp = x[0];
    x[0] = x[1];
    x[1] = x[5];
    x[5] = x[4];
    x[4] = tmp;
}
void throwdice_E(int x[6]){
    int tmp;
    tmp = x[0];
    x[0] = x[3];
    x[3] = x[5];
    x[5] = x[2];
    x[2] = tmp;
}
void throwdice_S(int x[6]){
    int tmp;
    tmp = x[0];
    x[0] = x[4];
    x[4] = x[5];
    x[5] = x[1];
    x[1] = tmp;
}
void throwdice_W(int x[6]){
    int tmp;
    tmp = x[0];
    x[0] = x[2];
    x[2] = x[5];
    x[5] = x[3];
    x[3] = tmp;
}

#include <stdio.h>
int main(int argc, const char * argv[]) {
    int i, top, front, left, right, back, bottom, count=0;
    int top2, front2, left2, right2, back2, bottom2;
    int x[6], x2[6];
    for(i=0; i<6; i++) {
        scanf("%d",&x[i]);
    }
    back = x[4];
    top = x[0];
    right = x[2];
    left = x[3];
    bottom = x[5];
    front =x[1];
    
    for(i=0; i<6; i++) {
        scanf("%d",&x2[i]);
    }
    back2 = x2[4];
    top2 = x2[0];
    right2 = x2[2];
    left2 = x2[3];
    bottom2 = x2[5];
    front2 =x2[1];
    
    while (x2[1] != front) {
        if(x2[1] != back || x2[1] != top || x2[1] != right || x2[1] != left || x2[1] != bottom || x2[1] != front ){
            count++;
            break;
        }
        if (x2[2] == front2 || x2[3] == front2) {
            throwdice_E(x);
        }
        throwdice_N(x);
    }
    while (x2[0] != top) {
        if(count >= 1)break;
        throwdice_E(x);
    }
    back2 = x2[4];
    top2 = x2[0];
    right2 = x2[2];
    left2 = x2[3];
    bottom2 = x2[5];
    front2 =x2[1];
    
    if(back == back2 || top == top2 || right == right2 || left == left2 || bottom == bottom2 || front == front2){
        printf("Yes\n");
    }else{
        printf("No\n")
    }
    
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:83:23: error: expected ';' before '}' token
   83 |         printf("No\n")
      |                       ^
      |                       ;
   84 |     }
      |     ~
Language: C

#include <iostream>
#include <vector>
#include <map>
using namespace std;
 
class Dice{
public:
  vector<int> d;
  void spin(string s){
    if(s == "S"){
      swap(d[0],d[4]);
      swap(d[4],d[1]);
      swap(d[4],d[5]);
    }
    if(s == "E"){
      swap(d[0],d[3]);
      swap(d[2],d[3]);
      swap(d[3],d[5]);
    }
    if(s == "N"){
      swap(d[0],d[1]);
      swap(d[1],d[5]);
      swap(d[4],d[5]);
    }
    if(s == "W"){
      swap(d[0],d[2]);
      swap(d[2],d[5]);
      swap(d[3],d[5]);
    }
    if(s == "C"){
      swap(d[1],d[3]);
      swap(d[2],d[3]);
      swap(d[4],d[3]);
    }
  }
};
 
 
int main(){
 
  Dice sai1,sai2;
  vector<int> in(6);
  for(int i=0; i<6; i++){
    cin >> in[i];
  }
  sai1.d = in;
 
  for(int i=0; i<6; i++){
    cin >> in[i];
  }
  sai2.d = in;
   
  string s = "CCCCECCCCECCCCECCCCSCCCCSSCCCC";
  bool is_same = true;
  for(int i=0; i<s.size(); i++){
    is_same = true;
    for(int j=0; j<6; j++){
      if(sai1.d[j] != sai2.d[j]){
    is_same = false; break;
      }
    }
    if(is_same) break;
    sai1.spin(s.substr(i,1));
  }
  if(is_same) cout <<"Yes\n";
  else  cout <<"No\n";
 
}

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

#include<stdio.h>

int main(){
	
	int i,j=1,dice1[5],dice2[5];
	
	for(i=0;i<6;i++){
	scanf("%d",&dice1[i]);}
	
	for(i=0;i<6;i++){
	scanf("%d",&dice2[i]);}
	
	
	
	if((dice1[1]==dice2[1])&&(dice1[4]==dice2[4])){
		
	if(((dice1[0]==dice2[0])&&(dice1[5]==dice2[5]))||((dice1[0]==dice2[5])&&(dice1[5]==dice2[0]))){
	if(((dice1[2]==dice2[2])&&(dice1[3]==dice2[3]))||((dice1[2]==dice2[3])&&(dice1[3]==dice2[2]))){
	if(((dice1[0]==dice2[2])&&(dice1[2]==dice2[0]))||((dice1[3]==dice2[5])&&(dice1[5]==dice2[3]))){
		
		printf("Yes\n");
			}
		}
	}	
		else{
			printf("No\n");
		}
		return 0;

}
			
			

Compiler output:
main.c: In function 'main':
main.c:30:1: error: expected declaration or statement at end of input
   30 | }
      | ^
Language: C

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

typedef struct{
  int top,front,right,left,back,bottom;
}dice;

void diceroll(dice* d, char c);

int main(void){
  dice d1,d2;
  int i,j;
  cnt=0;
  scanf("%d %d %d %d %d %d", &d1.top, &d1.front, &d1.right, &d1.left, &d1.back,&d1.bottom);
  scanf("%d %d %d %d %d %d", &d2.top, &d2.front, &d2.right, &d2.left, &d2.back,&d2.bottom),diceroll(&d2,'b');
  
  
    if(d2.bottom==d1.top) diceroll(&d2,'B'),diceroll(&d2,'s'),diceroll(&d2,'b');
    else  if(d2.front==d1.top) diceroll(&d2,'N');
    else if(d2.back==d1.top) diceroll(&d2,'S'),diceroll(&d2,'s');
    else if(d2.right==d1.top) diceroll(&d2,'W'),diceroll(&d2,'L');
    else if(d2.left==d1.top) diceroll(&d2,'E'),diceroll(&d2,'R');

   for(i=0;i<4;i++){
        if(d1.top==d2.top&&
        d1.bottom==d2.bottom&&
        d1.right==d2.right&&
        d1.left==d2.left&&
        d1.back==d2.back){
            printf("Yes\n");
            return 0;
        }
        diceroll('E',&d2);
    }
 
    printf("No\n");
     
    return 0;
  }



void diceroll(dice* d, char c){
  int temp;

  switch(c){
  case 'E':
  temp=d->top;
  d->top=d->left;
  d->left=d->bottom;
  d->bottom=d->right;
  d->right=temp;
  break;
  case 'N':
  temp=d->top;
  d->top=d->front;
  d->front=d->bottom;
  d->bottom=d->back;
  d->back=temp;
  break;
  case 'S':
  temp=d->top;
  d->top=d->back;
  d->back=d->bottom;
  d->bottom=d->front;
  d->front=temp;
  break;
  case 'W':
  temp=d->top;
  d->top=d->right;
  d->right=d->bottom;
  d->bottom=d->left;
  d->left=temp;
  break;
  case 'R':
  temp=d->front;
  d->front=d->left;
  d->left=d->back;
  d->back=d->right;
  d->right=temp;
  break;
  case 'L':
  temp=d->front;
  d->front=d->right;
  d->right=d->back;
  d->back=d->left;
  d->left=temp;
  break;
 case 's':
   temp=d->right;
  d->right=d->left;
  d->left=temp;
  break;
 case 'b':
   temp=d->front;
  d->front=d->back;
  d->front=temp;
  break;
case 'B':
   temp=d->top;
  d->top=d->bottom;
  d->bottom=temp;
  break;
  default:
    break;
  }


}

Compiler output:
main.c: In function 'main':
main.c:13:3: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
   13 |   cnt=0;
      |   ^~~
      |   int
main.c:13:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:33:18: error: passing argument 1 of 'diceroll' makes pointer from integer without a cast [-Wint-conversion]
   33 |         diceroll('E',&d2);
      |                  ^~~
      |                  |
      |                  int
main.c:8:21: note: expected 'dice *' but argument is of type 'int'
    8 | void diceroll(dice* d, char c);
      |               ~~~~~~^
main.c:33:22: error: passing argument 2 of 'diceroll' makes integer from pointer without a cast [-Wint-conversion]
   33 |         diceroll('E',&d2);
      |                      ^~~
      |                      |
      |                      dice *
main.c:8:29: note: expected 'char' but argument is of type 'dice *'
    8 | void diceroll(dice* d, char c);
      |                        ~~~~~^
Language: C

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

int x[7],y[7],t,w,z = 1;

int N(){
    t = x[1];
    x[1] = x[2];
    x[2] = x[6];
    x[6] = x[5];
    x[5] = t;
    w = y[1];
    y[1] = y[2];
    y[2] = y[6];
    y[6] = y[5];
    y[5] = w;
    if(x[1]==y[a]) z = 0;
    return z;
}

int W(){
    t = x[1];
    x[1] = x[3];
    x[3] = x[6];
    x[6] = x[4];
    x[4] = t;
    w = y[1];
    y[1] = y[2];
    y[2] = y[6];
    y[6] = y[5];
    y[5] = w;
    if(x[1]==y[a]) z = 0;
    return z;
}

void input(){
    int i;
    for(i = 1;i <= 6;i++) scanf("%d",&x[i]);
    for(i = 1;i <= 6;i++) scanf("%d",&y[i]);
}

int comparison(){
    int a,b,c;
    
    for(a = 1;a <= 6;a++) if(x[1] == y[a]) break;
    if(x[6] != y[7-a]){
        z = 0;
        return z;
    }
    
    for(b = 1;b <= 6;b++) if(x[2] == y[b]) break;
    if(x[5] != y[7-b]){
        z = 0;printf("%d",z);
        return z;
    }
    
    for(c = 1;c <= 6;c++) if(x[3] == y[c]) break;
    if(x[4] != y[7-c]){
        z = 0;
        return z;
    }
    z = N();
    z = W();
    if (z == 0) return z;
    z = 1;
    return z;
}

int main(void){
    int as;
    input();
    as = comparison();
    if(as==0) printf("No\n");
    else if(as==1) printf("Yes\n");
}


Compiler output:
main.c: In function 'N':
main.c:17:16: error: 'a' undeclared (first use in this function)
   17 |     if(x[1]==y[a]) z = 0;
      |                ^
main.c:17:16: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'W':
main.c:32:16: error: 'a' undeclared (first use in this function)
   32 |     if(x[1]==y[a]) z = 0;
      |                ^
Language: C

#include <stdio.h>

void north (int *d) {
    int tmp;

    tmp=d[0];
    d[0]=d[1];
    d[1]=d[5];
    d[5]=d[4];
    d[4]=tmp;
}

void east (int *d) {
    int tmp;

    tmp=d[0];
    d[0]=d[3];
    d[3]=d[5];
    d[5]=d[2];
    d[2]=tmp;
}

void curl (int *d) {
    int tmp;

    tmp=d[1];
    d[1]=d[2];
    d[2]=d[4];
    d[4]=d[3];
    d[3]=tmp;
}

int main(void) {
    int d1[6], d2[6];
    int i, j, n=0;

    scanf("%d %d %d %d %d %d", &d1[0], &d1[1], &d1[2], &d1[3], &d1[4], &d1[5]);
    scanf("%d %d %d %d %d %d", &d2[0], &d2[1], &d2[2], &d2[3], &d2[4], &d2[5]);
    for (i=0;i<6;i++) {
        for (j=0;j<6;j++) if (d1[i]==d2[j]) n++;
    }
    if (n!=6) {
        printf("No\n");
        return 0;
    }
    while (d1[0]!=d2[0]) {
        north(d2);
        if (d1[0]==d2[0]) {
            break;
        } else {
            east(d2);
        }
    }
    while (d1[1]!=d2[1]) curl(d2);
    n=0;
    for (i=0;i<6;i++) {
        if (d1[i]==d2[i]) m++;
    }
    if (m==6) {
        printf("Yes\n");
    } else {
        printf("No\n");
    }

    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:57:27: error: 'm' undeclared (first use in this function)
   57 |         if (d1[i]==d2[i]) m++;
      |                           ^
main.c:57:27: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
 
int main(void) {
  int diceA[6],diceB[6],i,j,a,subdice[6],diceside[8];
  for(i = 0; i < 6; i++)scanf("%d",&diceA[i]);
  for(i = 0; i < 6; i++)scanf("%d",&diceB[i]);
  if(diceA[0] == diceB[1] || diceA == diceB[4] || diceA[0] == diceB[5]){
    while(diceA[0] != diceB[0]){
      subdice[0] = diceB[1];
      subdice[1] = diceB[5];
      subdice[5] = diceB[4];
      subdice[4] = diceB[0];
      for(j = 0; i < 6; i++)dice[i] = subdice[i];
    }
  }
  else{
    while(diceA[0] != diceB[0]){
      subdice[0] = diceB[3];
      subdice[2] = diceB[2];
      subdice[3] = diceB[5];
      for(i = 0; i < 6; i++)diceB[i] = subdice[i];
    }
  }
  if(diceB[5] != diceA[5])goto no;

  for(j = 0; j < 2; j++){
    diceside[0 + j] = diceA[1];
    diceside[1 + j] = diceA[2];
    diceside[2 + j] = diceA[4];
    diceside[3 + j] = diceA[3];
  }
  for(j = 0; j < 4; j++){
    if(diceside[0] == diceB[1] && diceside[1] == diceB[2] && diceside[2] == diceB[4] && diceside[3] == diceB[3])goto yes;
    for(k = 0; k < 4; k++)diceside[k] = diceside[k + 1];
  }
  goto no;

  yes:
  printf("Yes\n");
  return 0;
  no:
  printf("No\n");
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:36: warning: comparison between pointer and integer
    7 |   if(diceA[0] == diceB[1] || diceA == diceB[4] || diceA[0] == diceB[5]){
      |                                    ^~
main.c:13:29: error: 'dice' undeclared (first use in this function); did you mean 'diceB'?
   13 |       for(j = 0; i < 6; i++)dice[i] = subdice[i];
      |                             ^~~~
      |                             diceB
main.c:13:29: note: each undeclared identifier is reported only once for each function it appears in
main.c:34:9: error: 'k' undeclared (first use in this function)
   34 |     for(k = 0; k < 4; k++)diceside[k] = diceside[k + 1];
      |         ^
Language: C++

#include <map>
#include <iostream>

using namespace std;

class Dice
{

	const static int NUM_S = 6;
	int a[NUM_S];

public:
	Dice(void) {}

	void set(int _a[]) {
		a[0] = _a[0];
		a[1] = _a[1];
		a[2] = _a[2];
		a[3] = _a[3];
		a[4] = _a[4];
		a[5] = _a[5];
	}

	bool isEqual(int _a[]) {
		return a[0] == _a[0] && a[1] == _a[1] &&
			a[2] == _a[2] && a[3] == _a[3] &&
			a[4] == _a[4] && a[5] == _a[5];
	}

	int rs(void) {
		int tmp = a[1];
		a[1] = a[0]; a[0] = a[4];
		a[4] = a[5]; a[5] = tmp;
		return a[0];
	}

	int re(void) {
		int tmp = a[0];
		a[0] = a[3]; a[3] = a[5];
		a[5] = a[2]; a[2] = tmp;
		return a[0];
	}

	int rn(void) {
		int tmp = a[1];
		a[1] = a[5]; a[5] = a[4];
		a[4] = a[0]; a[0] = tmp;
		return a[0];
	}

	int rw(void) {
		int tmp = a[0];
		a[0] = a[2]; a[2] = a[5];
		a[5] = a[3]; a[3] = tmp;
		return a[0];
	}

};

int main()
{
	Dice dc;
	int st[6];
	cin >> st[0] >> st[1] >> st[2] >> st[3] >> st[4] >> st[5];
	dc.set(st);

	cin >> st[0] >> st[1] >> st[2] >> st[3] >> st[4] >> st[5];
	bool ans = false;

	ans = dc.isEqual(st);
	if ( ! ans) {
		dc.re()
		ans = dc.isEqual(st);
	}
	if ( ! ans) {
		dc.re()
		ans = dc.isEqual(st);
	}
	if ( ! ans) {
		dc.re()
		ans = dc.isEqual(st);
	}
	if ( ! ans) {
		dc.rn()
		ans = dc.isEqual(st);
	}
	if ( ! ans) {
		dc.rn()
		ans = dc.isEqual(st);
	}
	if ( ! ans) {
		dc.rn()
		ans = dc.isEqual(st);
	}

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

	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:72:24: error: expected ';' before 'ans'
   72 |                 dc.re()
      |                        ^
      |                        ;
   73 |                 ans = dc.isEqual(st);
      |                 ~~~     
a.cc:76:24: error: expected ';' before 'ans'
   76 |                 dc.re()
      |                        ^
      |                        ;
   77 |                 ans = dc.isEqual(st);
      |                 ~~~     
a.cc:80:24: error: expected ';' before 'ans'
   80 |                 dc.re()
      |                        ^
      |                        ;
   81 |                 ans = dc.isEqual(st);
      |                 ~~~     
a.cc:84:24: error: expected ';' before 'ans'
   84 |                 dc.rn()
      |                        ^
      |                        ;
   85 |                 ans = dc.isEqual(st);
      |                 ~~~     
a.cc:88:24: error: expected ';' before 'ans'
   88 |                 dc.rn()
      |                        ^
      |                        ;
   89 |                 ans = dc.isEqual(st);
      |                 ~~~     
a.cc:92:24: error: expected ';' before 'ans'
   92 |                 dc.rn()
      |                        ^
      |                        ;
   93 |                 ans = dc.isEqual(st);
      |                 ~~~
Language: C++

#include <iostream>
#include <vector>

std::vector<int> getInput(int n) {
  std::vector<int> input;
  for (int i = 0; i < n; i++) {
    int buf;
    std::cin >> buf;
    input.push_back(buf);
  }
  return input;
}

int getIndex(const std::vector<int> &vec, const int element) {
  for (int i = 0; i < vec.size(); i++) {
    if (vec[i] == element) return i;
  }
  return -1;
}

std::vector<int> getLabels(const std::vector<int> &mapping,
                           const std::vector<int> &labels) {
  auto newLabels = mapping;
  std::transform(mapping.begin(), mapping.end(), newLabels.begin(),
                 [&](int e) { return labels[e - 1]; });
  return newLabels;
}

bool isSame(const std::vector<int> &first, const std::vector<int> &second) {
  int secondStartIndex = getIndex(second, first[0]);
  std::vector<int> alignedSecond;
  for (int i = secondStartIndex; i < secondStartIndex + 4; i++) {
    alignedSecond.push_back(second[i % 4]);
  }
  return first == alignedSecond;
}

bool isSame(const std::vector<std::vector<int>> &dice,
            const std::vector<int> &first, const std::vector<int> &second) {
  for (int i = 0; i < dice.size(); i++) {
    auto firstLabels = getLabels(dice[i], first);

    int secondIndex = getIndex(second, first[i]);
    if (secondIndex == -1) return false;
    auto secondLabels = getLabels(dice[secondIndex], second);
    if (isSame(firstLabels, secondLabels)) return true;
  }
  return false;
}

int main() {
  std::vector<std::vector<int>> dice = {{5, 3, 2, 4}, {1, 3, 6, 4},
                                        {1, 5, 6, 2}, {1, 2, 6, 5},
                                        {1, 4, 6, 3}, {5, 4, 2, 3}};

  std::vector<int> first = getInput(6), second = getInput(6);

  if (isSame(dice, first, second)) {
    std::cout << "Yes" << std::endl;
  } else {
    std::cout << "No" << std::endl;
  }
  return 0;
}



Compiler output:
a.cc: In function 'std::vector<int> getLabels(const std::vector<int>&, const std::vector<int>&)':
a.cc:24:8: error: 'transform' is not a member of 'std'
   24 |   std::transform(mapping.begin(), mapping.end(), newLabels.begin(),
      |        ^~~~~~~~~
Language: C++

// aoj.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#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 p;

	void setup() {
		for (int i = 0; i < n; i++) {
			cin >> dice[i];
			dice_i[i] = dice[i];
		}
		if (m == 0) {
			top = dice_i[0];
			front = dice_i[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];
		}
		cout << top << ":::" << front << endl;

		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;
		}
		for (int i = 0; i < n; i++) {
			cout << " " << dice_i[i];
		} cout << endl;
		int a = p == 0 ? 3 : p == 1 ? 0 : p == 2 ? 2 : p == 3 ? 1 : -1;
			cout << "::::::::"<<a << endl;
		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];
					cout << " " <<sort_dice[i];
				}cout << endl;
				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;
	DICE i = DICE();
	DICE j = DICE();
	for (int w = 0; w < n; w++) {
		if (i.sort_dice[w] != j.sort_dice[w])flag = false;
	}
	if (flag == true) {
		cout << "Yes" << endl;
	}
	else if (flag == false) {
		cout << "No" << endl;
	}
	cout << "i.sort_dice[p]" << endl;
	for (int p = 0; p < 6; p++) {
		cout << i.sort_dice[p] << " ";
	}cout << endl;
	cout << "j.dice[p]" << endl;
	cout << "j.sort_dice[p]" << endl;
	for (int p = 0; p < 6; p++) {
		cout << j.sort_dice[p] << " ";
	}cout << endl;
	return 0;
}



Compiler output:
a.cc:4:10: fatal error: stdafx.h: No such file or directory
    4 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
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(){
    
    dice a, b;
    bool flag = false;
    
    for(int i=0;i<6;i++){
        cin >> a.num[i];
    }
    for(int i=0;i<6;i++){
        cin >> b.num[i];
    }
    for(int j=0;j<4;j++){
        for(int i=0;i<4;i++){
            if(a.num[1]==b.num[1] && a.num[2]==b.num[2] && a.num[3]==b.num[3] && a.num[4]==b.num[4] && a.num[5]==b.num[5] && a.num[6]==b.num[6]){
                flag = true;
            }
            a.turnW();
            a.refresh();
        }
        a.turnS();
        a.refresh();
    }
    a.turnW();
    a.refresh();
    a.turnS();
    a.refresh();
    for(int j=0;j<4;j++){
        for(int i=0;i<4;i++){
            if(a.num[1]==b.num[1] && a.num[2]==b.num[2] && a.num[3]==b.num[3] && a.num[4]==b.num[4] && a.num[5]==b.num[5] && a.num[6]==b.num[6]){
                flag = true;
            }
            a.turnW();
            a.refresh();
        }
        a.turnS();
        a.refresh();
    }
    
    if(flag == true){
        cout << "Yes" << endl;
    }else{
        cout << "No" <<endl;
    }
    
    return 0;
    
}


Compiler output:
a.cc:12:2: error: expected ';' after class definition
   12 | }
      |  ^
      |  ;
Language: C++

#include<iostream>
using namespace std;

class Dice{
    public:
    int f[6];
    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;
    }
    void move(char ch){
        if(ch == 'E') roll_x();
        if(ch == 'S') for(int i=0;i<3;i++) roll_y();
        if(ch == 'W') for(int i=0;i<3;i++) roll_x();
        if(ch == 'N') roll_y();
    }
};

bool judge(Dice d1,Dice t1){
    for(int i=0;i<6;i++){
         if(d1.f[i]==t1.f[i]) return true;
         else return false;
    }
}

string getRight(Dice d2,Dice t2){
    for(int i=0;i<6;i++){
        for(int j=0;j<4;j++){
            if(judge(d2,t2)) return "Yes";
            roll_z();
        }
        if(i%2==0) roll_x();
        else roll_y();
    }
    return "No";
}

int main(){
    Dice d;
    Dice t;
    int n,x,y;
    for(int i=1;i<=6;i++) cin >> d.f[i];
    for(int i=1;i<=6;i++) cin >> t.f[i];

        cout << getRight(d,t) << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'std::string getRight(Dice, Dice)':
a.cc:33:13: error: 'roll_z' was not declared in this scope
   33 |             roll_z();
      |             ^~~~~~
a.cc:35:20: error: 'roll_x' was not declared in this scope
   35 |         if(i%2==0) roll_x();
      |                    ^~~~~~
a.cc:36:14: error: 'roll_y' was not declared in this scope
   36 |         else roll_y();
      |              ^~~~~~
a.cc: At global scope:
a.cc:50:5: error: expected unqualified-id before 'return'
   50 |     return 0;
      |     ^~~~~~
a.cc:51:1: error: expected declaration before '}' token
   51 | }
      | ^
a.cc: In function 'bool judge(Dice, Dice)':
a.cc:27:1: warning: control reaches end of non-void function [-Wreturn-type]
   27 | }
      | ^
Language: C++

#include<iostream>
using namespace std;

class Dice{
    public:
    int f[6];
    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;
    }
    void move(char ch){
        if(ch == 'E') roll_x();
        if(ch == 'S') for(int i=0;i<3;i++) roll_y();
        if(ch == 'W') for(int i=0;i<3;i++) roll_x();
        if(ch == 'N') roll_y();
    }
};

bool judge(Dice d1,Dice t1){
    for(int i=0;i<6;i++){
         if(d1.f[i]==t1.f[i]) return true;
         else return false;
    }
}

string getRight(Dice d2,Dice t2){
    for(int i=0;i<6;i++){
        for(int j=0;j<4;j++){
            if(judge(d2,t2)) return "Yes";
            d2.roll_z();
        }
        if(i%2==0) d2.roll_x();
        else d2.roll_y();
    }
    return "No";
}

int main(){
    Dice d;
    Dice t;
    int n,x,y;
    for(int i=1;i<=6;i++) cin >> d.f[i];
    for(int i=1;i<=6;i++) cin >> t.f[i];

        cout << getRight(d,t) << endl;
    }
    return 0;
}


Compiler output:
a.cc:50:5: error: expected unqualified-id before 'return'
   50 |     return 0;
      |     ^~~~~~
a.cc:51:1: error: expected declaration before '}' token
   51 | }
      | ^
a.cc: In function 'bool judge(Dice, Dice)':
a.cc:27:1: warning: control reaches end of non-void function [-Wreturn-type]
   27 | }
      | ^
Language: C++

#include<iostream>
using namespace std;

class Dice{
    public:
    int f[6];
    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;
    }
    void move(char ch){
        if(ch == 'E') roll_x();
        if(ch == 'S') for(int i=0;i<3;i++) roll_y();
        if(ch == 'W') for(int i=0;i<3;i++) roll_x();
        if(ch == 'N') roll_y();
    }
};

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

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;
}

int main(){
    Dice c1,c2;
    int n,x,y;
    for(int i=1;i<=6;i++) cin >> d.f[i];
    for(int i=1;i<=6;i++) cin >> t.f[i];

    if(getRight(c1,c2)) cout << "Yes" << endl;
    else cout << "No" << endl;
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:44:34: error: 'd' was not declared in this scope
   44 |     for(int i=1;i<=6;i++) cin >> d.f[i];
      |                                  ^
a.cc:45:34: error: 't' was not declared in this scope
   45 |     for(int i=1;i<=6;i++) cin >> t.f[i];
      |                                  ^
a.cc: In function 'bool judge(Dice, Dice)':
a.cc:27:1: warning: control reaches end of non-void function [-Wreturn-type]
   27 | }
      | ^
Language: C++

  void moveN(){
    sus=_1;
    _1=_2;
    _2=_6;
    _6=_5;
    _5=sus;
  }

  void moveE(){
    sus=_1;
    _1=_4;
    _4=_6;
    _6=_3;
    _3=sus;
  }

  void moveW(){
    sus=_1;
    _1=_3;
    _3=_6;
    _6=_4;
    _4=sus;
  }

  void moveS(){
    sus=_1;
    _1=_5;
    _5=_6;
    _6=_2;
    _2=sus;
  }

Compiler output:
a.cc: In function 'void moveN()':
a.cc:2:5: error: 'sus' was not declared in this scope
    2 |     sus=_1;
      |     ^~~
a.cc:2:9: error: '_1' was not declared in this scope
    2 |     sus=_1;
      |         ^~
a.cc:3:8: error: '_2' was not declared in this scope
    3 |     _1=_2;
      |        ^~
a.cc:4:8: error: '_6' was not declared in this scope
    4 |     _2=_6;
      |        ^~
a.cc:5:8: error: '_5' was not declared in this scope
    5 |     _6=_5;
      |        ^~
a.cc: In function 'void moveE()':
a.cc:10:5: error: 'sus' was not declared in this scope
   10 |     sus=_1;
      |     ^~~
a.cc:10:9: error: '_1' was not declared in this scope
   10 |     sus=_1;
      |         ^~
a.cc:11:8: error: '_4' was not declared in this scope
   11 |     _1=_4;
      |        ^~
a.cc:12:8: error: '_6' was not declared in this scope
   12 |     _4=_6;
      |        ^~
a.cc:13:8: error: '_3' was not declared in this scope
   13 |     _6=_3;
      |        ^~
a.cc: In function 'void moveW()':
a.cc:18:5: error: 'sus' was not declared in this scope
   18 |     sus=_1;
      |     ^~~
a.cc:18:9: error: '_1' was not declared in this scope
   18 |     sus=_1;
      |         ^~
a.cc:19:8: error: '_3' was not declared in this scope
   19 |     _1=_3;
      |        ^~
a.cc:20:8: error: '_6' was not declared in this scope
   20 |     _3=_6;
      |        ^~
a.cc:21:8: error: '_4' was not declared in this scope
   21 |     _6=_4;
      |        ^~
a.cc: In function 'void moveS()':
a.cc:26:5: error: 'sus' was not declared in this scope
   26 |     sus=_1;
      |     ^~~
a.cc:26:9: error: '_1' was not declared in this scope
   26 |     sus=_1;
      |         ^~
a.cc:27:8: error: '_5' was not declared in this scope
   27 |     _1=_5;
      |        ^~
a.cc:28:8: error: '_6' was not declared in this scope
   28 |     _5=_6;
      |        ^~
a.cc:29:8: error: '_2' was not declared in this scope
   29 |     _6=_2;
      |        ^~
Language: C++

#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import time
import sys
import io
import re
import math
import itertools
#sys.stdin=file('input.txt')
#sys.stdout=file('output.txt','w')
#10**9+7
mod=1000000007
#mod=1777777777
pi=3.141592653589
xy=[(1,0),(-1,0),(0,1),(0,-1)]
bs=[(-1,-1),(-1,1),(1,1),(1,-1)]
#start = time.clock()
ans=chk=0
a=[0,2,5,3]
b=[0,1,5,4]

def rolling(word,dice):
    if word=='S':
        dice[0],dice[1],dice[5],dice[4]=dice[4],dice[0],dice[1],dice[5]
    elif word=='N':
        dice[0],dice[1],dice[5],dice[4]=dice[1],dice[5],dice[4],dice[0]
    elif word=='W':
        dice[0],dice[2],dice[5],dice[3]=dice[2],dice[5],dice[3],dice[0]
    else:
        dice[0],dice[2],dice[5],dice[3]=dice[3],dice[0],dice[2],dice[5]
    return dice

def sortdice(dice1,dice2,p):
    for i in range(4):
        dice1[p[0]],dice1[p[1]],dice1[p[2]],dice1[p[3]]=dice1[p[1]],dice1[p[2]],dice1[p[3]],dice1[p[0]]
        if dice1==dice2:
            print 'Yes'
            exit()
    return 0

l1=map(int,raw_input().split())
l2=map(int,raw_input().split())
sortdice(l1,l2,a)
sortdice(l1,l2,b)
print 'No'

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #!/usr/bin/env python
      |  ^
a.cc:2:3: error: invalid preprocessing directive #-
    2 | # -*- coding: UTF-8 -*-
      |   ^
a.cc:9:2: error: invalid preprocessing directive #sys
    9 | #sys.stdin=file('input.txt')
      |  ^~~
a.cc:10:2: error: invalid preprocessing directive #sys
   10 | #sys.stdout=file('output.txt','w')
      |  ^~~
a.cc:11:4: error: "*" is not a valid filename
   11 | #10**9+7
      |    ^
a.cc:13:2: error: invalid preprocessing directive #mod
   13 | #mod=1777777777
      |  ^~~
a.cc:17:2: error: invalid preprocessing directive #start
   17 | #start = time.clock()
      |  ^~~~~
a.cc:37:19: warning: multi-character character constant [-Wmultichar]
   37 |             print 'Yes'
      |                   ^~~~~
a.cc:45:7: warning: multi-character character constant [-Wmultichar]
   45 | print 'No'
      |       ^~~~
a.cc:3:1: error: 'import' does not name a type
    3 | import time
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include <iostream>
#include <ctime>
#include <cstdlib>
using namespace std;

class Dice
{
	
private:
	int pips[6];
	
public:
	Dice(const int*);
	int get_top();
	void roll_north();
	void roll_south();
	void roll_east();
	void roll_west();
	bool compare(const Dice*);
};

///////////////////////////////////////
Dice::Dice(const int* pips)
{
	for(int i = 0; i < 6; ++i)
	{
		this->pips[i] = pips[i];
	}
	
	srand( time(NULL) );
}

///////////////////////////////////////
int Dice::get_top()
{
	return pips[0];
}

////////////////////////////////////////
void Dice::roll_north()
{
	int temp;
	temp = pips[0];
    pips[0] = pips[1];
    pips[1] = pips[5];
    pips[5] = pips[4];
    pips[4] = temp;
}

////////////////////////////////////////
void Dice::roll_south()
{
	int temp;
	temp = pips[0];
    pips[0] = pips[4];
    pips[4] = pips[5];
    pips[5] = pips[1];
    pips[1] = temp;
}

////////////////////////////////////////
void Dice::roll_east()
{
	int temp;
	temp = pips[0];
    pips[0] = pips[3];
    pips[3] = pips[5];
    pips[5] = pips[2];
    pips[2] = temp;
}

////////////////////////////////////////
void Dice::roll_west()
{
	int temp;
	temp = pips[0];
    pips[0] = pips[2];
    pips[2] = pips[5];
    pips[5] = pips[3];
    pips[3] = temp;
}

//////////////////////////////////////////
bool Dice::compare(const Dice* other)
{
	for(int i = 0; i < 6; ++i){
		if(i < 4) roll_north();
		if(i == 4) roll_east(); roll_south;
		if(i == 5) roll_north(); roll_north();
		
		for(int j = 0; j < 4; ++j){
			roll_east();
			
			for(int k = 0; k < 6; ++k){
				if(pips[k] != other->pips[k]) break;
				if(k == 5) return true;
			}}}
	
	return false;
}





int main()
{
	
	int pips[6];
	
	
	for(int i = 0; i < 6; ++i)
	{
		cin >> pips[i];
	}
	Dice diceA(pips);
	
	
	for(int i = 0; i < 6; ++i)
	{
		cin >> pips[i];
	}
	Dice diceB(pips);
	
	
	if(diceA.compare(&diceB)) cout << "Yes" << endl;
	else cout << "No" << endl;
	
	return 0;
}

Compiler output:
a.cc: In member function 'bool Dice::compare(const Dice*)':
a.cc:88:41: error: invalid use of non-static member function 'void Dice::roll_south()'
   88 |                 if(i == 4) roll_east(); roll_south;
      |                                         ^~~~~~~~~~
a.cc:51:6: note: declared here
   51 | void Dice::roll_south()
      |      ^~~~
Language: C++

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

void north(int* faces) {
	int tmp[7];

	//top(1) to back(5)
	tmp[5] = faces[1];

	//front(2) to top(1)
	tmp[1] = faces[2];

	//right(3) to right(3)
	tmp[3] = faces[3];

	//left(4) to left(4)
	tmp[4] = faces[4];

	//back(5) to bottom(6)
	tmp[6] = faces[5];

	//bottom(6) to front(2)
	tmp[2] = faces[6];

	memcpy(faces, tmp, sizeof(tmp));

}
void west(int* faces) {
	int tmp[7];

	//top(1) to left(4)
	tmp[4] = faces[1];

	//front(2) to front(2)
	tmp[2] = faces[2];

	//right(3) to top(1)
	tmp[1] = faces[3];

	//left(4) to bottom(6)
	tmp[6] = faces[4];

	//back(5) to back(5)
	tmp[5] = faces[5];

	//bottom(6) to right(3)
	tmp[3] = faces[6];

	memcpy(faces, tmp, sizeof(tmp));

}
bool check(int* faces, int* taget, int frontNum) {
	
	int tmp[7];
	for (int i = 1; i < 7; i++)
	{
		tmp[i] = faces[i];
	}
	
	tmp[frontNum] = INT32_MAX;
	

	if (frontNum == 3 || frontNum == 4) west(tmp);

	while (true)
	{
		north(tmp);
		if (tmp[2] == INT32_MAX)break;
	}
	tmp[2] = faces[frontNum];

	for (int i = 1; i < 7; i++)
	{
		if (tmp[i] != taget[i]) break;
		if (i == 6) return true;
	}

	if (tmp[1] != taget[6] || tmp[6] != taget[1]) return false;
	else if (tmp[3] != taget[4] || tmp[4] != taget[3]) return false;

	return true;
}

bool dice(int *faces, int *taget, int front) {
	//int i,j;

	for (int i = 1; i < 7; i++)
	{
		if (faces[i] == front) {
			
			if (check(faces, taget, i)) return true;
		}
	}


	/*
	for (i = 1; i < 7; i++)
	{
		if (faces[i] == front) {
			if (i == 3) {
				west(faces);
				i = 1;
			}

			else if (i == 4) {
				west(faces);
				i = 6;
			}
			goto NEXT_1;
		}
		if (i == 6) return false;
	}
	
NEXT_1:
	for (j = 1; j < 7; j++)
	{
		if (faces[j] == right && j != i) {
			goto NEXT_2;
		}
		if (j == 6) return false;
	}

NEXT_2:
	if (i == 1 && j == 6) return false;
	else if (i == 6 && j == 1) return false;
	else if (i == 2 && j == 5) return false;
	else if (i == 5 && j == 2) return false;
	else if (i == 3 && j == 4) return false;
	else if (i == 4 && j == 3) return false;

	while (true)
	{
		north(faces);
		if (faces[2] == front)break;
	}

	while (true)
	{
		west(faces);
		if (faces[3] == right)break;
	}
	*/

	return false;
}


int main() {
	int faces_1[7],faces_2[7];

	for (int i = 1; i < 7; i++) cin >> faces_1[i];

	for (int i = 1; i < 7; i++) cin >> faces_2[i];
	
	if (dice(faces_2, faces_1, faces_1[2])) {
		cout << "Yes" << endl;
		return 0;
	}

	/*
	for (int i = 1; i < 7; i++)
	{
		
		if (faces_1[i] != faces_2[i]) {
			cout << "No" << endl;
			return 0;
		}
	}
	*/
	cout << "No" << endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'bool check(int*, int*, int)':
a.cc:64:25: error: 'INT32_MAX' was not declared in this scope
   64 |         tmp[frontNum] = INT32_MAX;
      |                         ^~~~~~~~~
a.cc:6:1: note: 'INT32_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    5 | #include <vector>
  +++ |+#include <cstdint>
    6 | using namespace std;
Language: C++

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

void north(int* faces) {
	int tmp[7];

	//top(1) to back(5)
	tmp[5] = faces[1];

	//front(2) to top(1)
	tmp[1] = faces[2];

	//right(3) to right(3)
	tmp[3] = faces[3];

	//left(4) to left(4)
	tmp[4] = faces[4];

	//back(5) to bottom(6)
	tmp[6] = faces[5];

	//bottom(6) to front(2)
	tmp[2] = faces[6];

	memcpy(faces, tmp, sizeof(tmp));

}
void west(int* faces) {
	int tmp[7];

	//top(1) to left(4)
	tmp[4] = faces[1];

	//front(2) to front(2)
	tmp[2] = faces[2];

	//right(3) to top(1)
	tmp[1] = faces[3];

	//left(4) to bottom(6)
	tmp[6] = faces[4];

	//back(5) to back(5)
	tmp[5] = faces[5];

	//bottom(6) to right(3)
	tmp[3] = faces[6];

	memcpy(faces, tmp, sizeof(tmp));

}
bool check(int* faces, int* taget, int frontNum) {
	
	int tmp[7];
	for (int i = 1; i < 7; i++)
	{
		tmp[i] = faces[i];
	}
	
	tmp[frontNum] = INT32_MAX;
	

	if (frontNum == 3 || frontNum == 4) west(tmp);

	while (true)
	{
		north(tmp);
		if (tmp[2] == INT32_MAX)break;
	}
	tmp[2] = faces[frontNum];

	for (int i = 1; i < 7; i++)
	{
		if (tmp[i] != taget[i]) break;
		if (i == 6) return true;
	}

	if (tmp[1] != taget[6] || tmp[6] != taget[1]) return false;
	else if (tmp[3] != taget[4] || tmp[4] != taget[3]) return false;

	return true;
}

bool dice(int *faces, int *taget, int front) {

	for (int i = 1; i < 7; i++)
	{
		if (faces[i] == front) {
			
			if (check(faces, taget, i)) return true;
		}
	}



	return false;
}


int main() {
	int faces_1[7],faces_2[7];

	for (int i = 1; i < 7; i++) cin >> faces_1[i];

	for (int i = 1; i < 7; i++) cin >> faces_2[i];
	
	if (dice(faces_2, faces_1, faces_1[2])) {
		cout << "Yes" << endl;
		return 0;
	}

	cout << "No" << endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'bool check(int*, int*, int)':
a.cc:64:25: error: 'INT32_MAX' was not declared in this scope
   64 |         tmp[frontNum] = INT32_MAX;
      |                         ^~~~~~~~~
a.cc:6:1: note: 'INT32_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    5 | #include <vector>
  +++ |+#include <cstdint>
    6 | using namespace std;
Language: C++

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

void north(int* faces) {
	int tmp[7];

	//top(1) to back(5)
	tmp[5] = faces[1];

	//front(2) to top(1)
	tmp[1] = faces[2];

	//right(3) to right(3)
	tmp[3] = faces[3];

	//left(4) to left(4)
	tmp[4] = faces[4];

	//back(5) to bottom(6)
	tmp[6] = faces[5];

	//bottom(6) to front(2)
	tmp[2] = faces[6];

	memcpy(faces, tmp, sizeof(tmp));

}
void west(int* faces) {
	int tmp[7];

	//top(1) to left(4)
	tmp[4] = faces[1];

	//front(2) to front(2)
	tmp[2] = faces[2];

	//right(3) to top(1)
	tmp[1] = faces[3];

	//left(4) to bottom(6)
	tmp[6] = faces[4];

	//back(5) to back(5)
	tmp[5] = faces[5];

	//bottom(6) to right(3)
	tmp[3] = faces[6];

	memcpy(faces, tmp, sizeof(tmp));

}
bool check(int* faces, int* taget, int frontNum) {
	
	int tmp[7];
	for (int i = 1; i < 7; i++)
	{
		tmp[i] = faces[i];
	}
	
	tmp[frontNum] = INT_MAX;
	

	if (frontNum == 3 || frontNum == 4) west(tmp);

	while (true)
	{
		north(tmp);
		if (tmp[2] == INT_MAX)break;
	}
	tmp[2] = faces[frontNum];

	for (int i = 1; i < 7; i++)
	{
		if (tmp[i] != taget[i]) break;
		if (i == 6) return true;
	}

	if (tmp[1] != taget[6] || tmp[6] != taget[1]) return false;
	else if (tmp[3] != taget[4] || tmp[4] != taget[3]) return false;

	return true;
}

bool dice(int *faces, int *taget, int front) {

	for (int i = 1; i < 7; i++)
	{
		if (faces[i] == front) {
			
			if (check(faces, taget, i)) return true;
		}
	}



	return false;
}


int main() {
	int faces_1[7],faces_2[7];

	for (int i = 1; i < 7; i++) cin >> faces_1[i];

	for (int i = 1; i < 7; i++) cin >> faces_2[i];
	
	if (dice(faces_2, faces_1, faces_1[2])) {
		cout << "Yes" << endl;
		return 0;
	}

	cout << "No" << endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'bool check(int*, int*, int)':
a.cc:64:25: error: 'INT_MAX' was not declared in this scope
   64 |         tmp[frontNum] = INT_MAX;
      |                         ^~~~~~~
a.cc:6:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    5 | #include <vector>
  +++ |+#include <climits>
    6 | using namespace std;
Language: C++

#include<iostream>
using namespace std;

class Cube{
public:
	int f[6];

	Cube(){}
	void roll_z(){ roll(1, 2, 4, 3); } //
	void roll_y(){ roll(0, 2, 5, 3); } // to W
	void roll_x(){ roll(0, 1, 5, 4); } // to N
	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 eq(Cube c1, Cube c2){
 for(int i = 0; i < 6; i++){ 
  if(c1.f[i] != c2.f[i] ) return false;
 return true;
}

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

int main(){
	Cube c1, c2;

	for (int i = 0; i < 6; i++) cin >> c1.f[i];
	for (int i = 0; i < 6; i++) cin >> c2.f[i];

        if(equal(c1, c2)) cout << "Yes" << endl;
        else cout << "No" << endl;

	return 0;
}

Compiler output:
a.cc: In function 'bool eq(Cube, Cube)':
a.cc:23:29: error: a function-definition is not allowed here before '{' token
   23 | bool equal(Cube c1, Cube c2){
      |                             ^
a.cc:36:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   36 | int main(){
      |         ^~
a.cc:36:9: note: remove parentheses to default-initialize a variable
   36 | int main(){
      |         ^~
      |         --
a.cc:36:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:36:11: error: a function-definition is not allowed here before '{' token
   36 | int main(){
      |           ^
a.cc:46:2: error: expected '}' at end of input
   46 | }
      |  ^
a.cc:17:26: note: to match this '{'
   17 | bool eq(Cube c1, Cube c2){
      |                          ^
a.cc:46:2: warning: control reaches end of non-void function [-Wreturn-type]
   46 | }
      |  ^
Language: C++

#include <iostream>
using namespace std;

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


int main() {
    //?????¢???????????????
    for (int i = 0; i < 6 ; ++i) {
        cin >> D[i];
    }
    int Dice[6];

    //?????????????????????
    for (int i = 0; i < 6 ; ++i) {
        cin >> Dice[i];
    }

    bool ans = 0;

    //?????¢???????????????
    char SWS[10]={"SSSSWSSSS"};
    for(int i=0;i<10;i++){
        if(D[1]==Dice[1])break;
        spin(SWS[i]);
    }
    //?????¢???????????????
    for(int j=0;j<4; ++j){
        if(D[0] == Dice[0]){
            if(D[2]==Dice[2] && D[3]==Dice[3] &&D[4]==Dice[4] && D[5]==Dice[5])
                ans = 1;
        }
        spin('W');
        }
    
    //??????
    if (ans == 1){
        cout << "Yes" <<endl;
    }else{
        cout << "No" << endl;
    }

    return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:58:14: error: expected '}' at end of input
   58 |     return 0;
      |              ^
a.cc:22:12: note: to match this '{'
   22 | int main() {
      |            ^
Language: C++

#include <string>
#include <vector>
#include <iostream>
using namespace std;
bool same(vector<int> a, vector<int> b) {
	for(int i = 0; i < 4; i++) {
		for(int j = 0; j < 4; j++) {
			for(int k = 0; k < 4; k++) {
				for(int l = 0; l < 4; l++) {
					string s;
					for(int m = 0; m < i; m++) s += 'N';
					for(int m = 0; m < j; m++) s += 'E';
					for(int m = 0; m < k; m++) s += 'S';
					for(int m = 0; m < l; m++) s += 'W';
					for(int i = 0; i < s.size(); i++) {
        				t = a[0];
        				switch(s[i]) {
        				case 'N':
            				a[0] = a[1];
            				a[1] = a[5];
        					a[5] = a[4];
        				    a[4] = t;
        				    break;
        				case 'E':
        				    a[0] = a[3];
        				    a[3] = a[5];
        				    a[5] = a[2];
        				    a[2] = t;
        				    break;
        				case 'S':
        				    a[0] = a[4];
        				    a[4] = a[5];
        				    a[5] = a[1];
        				    a[1] = t;
        				    break;
        				case 'W':
        				    a[0] = a[2];
        				    a[2] = a[5];
        				    a[5] = a[3];
    					    a[3] = t;
    					   	break;
	    				}
					}
					if(a == b) return true;
				}
			}
		}
	}
	return false;
}
vector<int> x, y;
int main() {
	x.resize(6); for(int i = 0; i < 6; i++) scanf("%d", &x[i]);
	y.resize(6); for(int i = 0; i < 6; i++) scanf("%d", &y[i]);
	printf("%s\n", same(x, y) ? "Yes" : "No");
	return 0;
}

Compiler output:
a.cc: In function 'bool same(std::vector<int>, std::vector<int>)':
a.cc:16:41: error: 't' was not declared in this scope
   16 |                                         t = a[0];
      |                                         ^