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


#include <iostream>
using namespace std;

int main(){
 int d1[6],d2[6],tmp;

 for(int i=0;i<6;i++){
  cin >> d1[i] ;
 }
 for(int i=0;i<6;i++){
  cin >> d2[i] ;
 }

  while(1){
   if(d1[1]==d2[1])break;
   tmp=d[0];
   d[0]=d[1];
   d[1]=d[5];
   d[5]=d[4];
   d[4]=tmp;
   if(j==4){
    tmp=d[0];
    d[0]=d[3];
    d[3]=d[5];
    d[5]=d[2];
    d[2]=tmp;
   }
  j++;
  }
  while(1){
   if(d1[0]==d1[0])break;
   tmp=d[0];
   d[0]=d[2];
   d[2]=d[5];
   d[5]=d[3];
   d[3]=tmp;
  }

 for(int i=0;i<6;i++){
  if(d1[i]==d2[i])cnt++;
 }
 if(cnt==6)cout << "Yes" << endl ;
 else cout << "No" << endl ;

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:8: error: 'd' was not declared in this scope; did you mean 'd2'?
   17 |    tmp=d[0];
      |        ^
      |        d2
a.cc:22:7: error: 'j' was not declared in this scope
   22 |    if(j==4){
      |       ^
a.cc:29:3: error: 'j' was not declared in this scope
   29 |   j++;
      |   ^
a.cc:33:8: error: 'd' was not declared in this scope; did you mean 'd2'?
   33 |    tmp=d[0];
      |        ^
      |        d2
a.cc:41:19: error: 'cnt' was not declared in this scope; did you mean 'int'?
   41 |   if(d1[i]==d2[i])cnt++;
      |                   ^~~
      |                   int
a.cc:43:5: error: 'cnt' was not declared in this scope; did you mean 'int'?
   43 |  if(cnt==6)cout << "Yes" << endl ;
      |     ^~~
      |     int
Language: C++

#include <iostream>
using namespace std;

int main(){
 int d1[6],d2[6],tmp,cnt=0;

 for(int i=0;i<6;i++){
  cin >> d1[i] ;
 }
 for(int i=0;i<6;i++){
  cin >> d2[i] ;
 }

  while(1){
   if(d1[1]==d2[1])break;
   tmp=d[0];
   d[0]=d[1];
   d[1]=d[5];
   d[5]=d[4];
   d[4]=tmp;
   if(j==4){
    tmp=d[0];
    d[0]=d[3];
    d[3]=d[5];
    d[5]=d[2];
    d[2]=tmp;
   }
  j++;
  }
  while(1){
   if(d1[0]==d1[0])break;
   tmp=d[0];
   d[0]=d[2];
   d[2]=d[5];
   d[5]=d[3];
   d[3]=tmp;
  }

 for(int i=0;i<6;i++){
  if(d1[i]==d2[i])cnt++;
 }
 if(cnt==6)cout << "Yes" << endl ;
 else cout << "No" << endl ;

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:8: error: 'd' was not declared in this scope; did you mean 'd2'?
   16 |    tmp=d[0];
      |        ^
      |        d2
a.cc:21:7: error: 'j' was not declared in this scope
   21 |    if(j==4){
      |       ^
a.cc:28:3: error: 'j' was not declared in this scope
   28 |   j++;
      |   ^
a.cc:32:8: error: 'd' was not declared in this scope; did you mean 'd2'?
   32 |    tmp=d[0];
      |        ^
      |        d2
Language: C++

#include <iostream>
using namespace std;

int main(){
 int d1[6],d2[6],tmp,cnt=0;

 for(int i=0;i<6;i++){
  cin >> d1[i] ;
 }
 for(int i=0;i<6;i++){
  cin >> d2[i] ;
 }

  while(1){
   if(d1[1]==d2[1])break;
   tmp=d2[0];
   d2[0]=d2[1];
   d2[1]=d2[5];
   d2[5]=d2[4];
   d2[4]=tmp;
   if(j==4){
    tmp=d2[0];
    d2[0]=d2[3];
    d2[3]=d2[5];
    d2[5]=d2[2];
    d2[2]=tmp;
   }
  j++;
  }
  while(1){
   if(d1[0]==d2[0])break;
   tmp=d2[0];
   d2[0]=d2[2];
   d2[2]=d2[5];
   d2[5]=d2[3];
   d2[3]=tmp;
  }

 for(int i=0;i<6;i++){
  if(d1[i]==d2[i])cnt++;
 }
 if(cnt==6)cout << "Yes" << endl ;
 else cout << "No" << endl ;

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:7: error: 'j' was not declared in this scope
   21 |    if(j==4){
      |       ^
a.cc:28:3: error: 'j' was not declared in this scope
   28 |   j++;
      |   ^
Language: C++

#include <iostream>
using namespace std;

int main(){
 int d1[6],d2[6],tmp,cnt,j=0;

 for(int i=0;i<6;i++){
  cin >> d1[i] ;
 }
 for(int i=0;i<6;i++){
  cin >> d2[i] ;
 }

 for(int i=0;i<4;i++){
  for(int k=0;k<4;k++){
   for(int l=0;l<4;l++){
    for(int m=0;m<4;m++){
     cnt=0;
     for(j=0;j<6;j++)if(d1[i]==d2[i])cnt++;
     if(cnt==6)break;

     d[0]=d[3];
     d[3]=d[5];
     d[5]=d[2];
     d[2]=tmp;
    }
    tmp=d[0];
    d[0]=d[1];
    d[1]=d[5];
    d[5]=d[4];
    d[4]=tmp;
   }
   tmp=d[0];
   d[0]=d[4];
   d[4]=d[5];
   d[5]=d[1];
   d[1]=tmp;
  }
  tmp=d[0];
  d[0]=d[2];
  d[2]=d[5];
  d[5]=d[3];
  d[3]=tmp;
 }
 if(cnt==6)cout << "Yes" << endl ;
 else cout << "No" << endl ;

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:6: error: 'd' was not declared in this scope
   22 |      d[0]=d[3];
      |      ^
a.cc:27:9: error: 'd' was not declared in this scope
   27 |     tmp=d[0];
      |         ^
a.cc:33:8: error: 'd' was not declared in this scope
   33 |    tmp=d[0];
      |        ^
a.cc:39:7: error: 'd' was not declared in this scope
   39 |   tmp=d[0];
      |       ^
Language: C++

#include <iostream>
using namespace std;

int main(){
 int d1[6],d2[6],tmp,cnt,j;

 for(int i=0;i<6;i++){
  cin >> d1[i] ;
 }
 for(int i=0;i<6;i++){
  cin >> d2[i] ;
 }

 for(int i=0;i<5;i++){
  for(int k=0;k<5;k++){
   cnt=0;
   for(j=0;j<6;j++)if(d1[j]==d2[j])cnt++;
   if(cnt==6)break;
   tmp=d2[1];
   d2[1]=d2[3];
   d2[3]=d2[4];
   d2[4]=d2[2];
   d2[2]=tmp;
  }
  tmp=d2[0];
  d2[0]=d2[1];
  d2[1]=d2[5];
  d2[5]=d2[4];
  d2[4]=tmp;
 }
 
   cnt=0;
   for(j=0;j<6;j++)if(d1[j]==d2[j])cnt++;
   if(cnt==6)break;

  tmp=d2[0]; 
  d2[0]=d2[3];
  d2[3]=d2[5];
  d2[5]=d2[2];
  d2[2]=tmp;

  for(int k=0;k<5;k++){
   cnt=0;
   for(j=0;j<6;j++)if(d1[j]==d2[j])cnt++;
   if(cnt==6)break;
   tmp=d2[1];
   d2[1]=d2[3];
   d2[3]=d2[4];
   d2[4]=d2[2];
   d2[2]=tmp;
  }
 
   cnt=0;
   for(j=0;j<6;j++)if(d1[j]==d2[j])cnt++;
   if(cnt==6)break;

  tmp=d2[0]; 
  d2[0]=d2[3];
  d2[3]=d2[5];
  d2[5]=d2[2];
  d2[2]=tmp;
  tmp=d2[0]; 
  d2[0]=d2[3];
  d2[3]=d2[5];
  d2[5]=d2[2];
  d2[2]=tmp;

  for(int k=0;k<5;k++){
   cnt=0;
   for(j=0;j<6;j++)if(d1[j]==d2[j])cnt++;
   if(cnt==6)break;
   tmp=d2[1];
   d2[1]=d2[3];
   d2[3]=d2[4];
   d2[4]=d2[2];
   d2[2]=tmp;
  }

 if(cnt==6)cout << "Yes" << endl ;
 else cout << "No" << endl ;

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:14: error: break statement not within loop or switch
   34 |    if(cnt==6)break;
      |              ^~~~~
a.cc:55:14: error: break statement not within loop or switch
   55 |    if(cnt==6)break;
      |              ^~~~~
Language: C++

#include <iostream>
using namespace std;

void check(int* a){
   int cnt=0;
   for(int j=0;j<6;j++)if(d1[j]==d2[j])cnt++;
   if(cnt==6) *a *= 0 ;
}

int main(){
 int d1[6],d2[6],tmp,a=1;

 for(int i=0;i<6;i++){
  cin >> d1[i] ;
 }
 for(int i=0;i<6;i++){
  cin >> d2[i] ;
 }

 check(&a);

 while(a){
 for(int i=0;i<5;i++){
  for(int k=0;k<4;k++){
 check(&a);
   tmp=d2[1];
   d2[1]=d2[3];
   d2[3]=d2[4];
   d2[4]=d2[2];
   d2[2]=tmp;
  }
 check(&a);
  tmp=d2[0];
  d2[0]=d2[1];
  d2[1]=d2[5];
  d2[5]=d2[4];
  d2[4]=tmp;
 }
 
 check(&a);

  tmp=d2[0]; 
  d2[0]=d2[3];
  d2[3]=d2[5];
  d2[5]=d2[2];
  d2[2]=tmp;

  for(int k=0;k<4;k++){
 check(&a);
   tmp=d2[1];
   d2[1]=d2[3];
   d2[3]=d2[4];
   d2[4]=d2[2];
   d2[2]=tmp;
  }
 
 check(&a);

  tmp=d2[0]; 
  d2[0]=d2[3];
  d2[3]=d2[5];
  d2[5]=d2[2];
  d2[2]=tmp;
  tmp=d2[0]; 
  d2[0]=d2[3];
  d2[3]=d2[5];
  d2[5]=d2[2];
  d2[2]=tmp;

  for(int k=0;k<4;k++){
 check(&a);
   tmp=d2[1];
   d2[1]=d2[3];
   d2[3]=d2[4];
   d2[4]=d2[2];
   d2[2]=tmp;
  }
 check(&a);
 a=0;
 }

 if(cnt==6)cout << "Yes" << endl ;
 else cout << "No" << endl ;

 return 0;
}

Compiler output:
a.cc: In function 'void check(int*)':
a.cc:6:27: error: 'd1' was not declared in this scope
    6 |    for(int j=0;j<6;j++)if(d1[j]==d2[j])cnt++;
      |                           ^~
a.cc:6:34: error: 'd2' was not declared in this scope
    6 |    for(int j=0;j<6;j++)if(d1[j]==d2[j])cnt++;
      |                                  ^~
a.cc: In function 'int main()':
a.cc:82:5: error: 'cnt' was not declared in this scope; did you mean 'int'?
   82 |  if(cnt==6)cout << "Yes" << endl ;
      |     ^~~
      |     int
Language: C++

#include <iostream>
using namespace std;

void check(int& cnt,int d1[],int d2[]){
   cnt=0;
   for(int j=0;j<6;j++)if(d1[j]==d2[j])cnt++;
}

int main(){
 int d1[6],d2[6],tmp,a=1;

 for(int i=0;i<6;i++){
  cin >> d1[i] ;
 }
 for(int i=0;i<6;i++){
  cin >> d2[i] ;
 }

   check(cnt,d1,d2);
   if(cnt==6)a=0;

 while(a){
 for(int i=0;i<5;i++){
  for(int k=0;k<4;k++){
   check(cnt,d1,d2);
   if(cnt==6)break;
   tmp=d2[1];
   d2[1]=d2[3];
   d2[3]=d2[4];
   d2[4]=d2[2];
   d2[2]=tmp;
  }
   check(cnt,d1,d2);
   if(cnt==6)break;
  tmp=d2[0];
  d2[0]=d2[1];
  d2[1]=d2[5];
  d2[5]=d2[4];
  d2[4]=tmp;
 }
 
   check(cnt,d1,d2);
   if(cnt==6)break;

  tmp=d2[0]; 
  d2[0]=d2[3];
  d2[3]=d2[5];
  d2[5]=d2[2];
  d2[2]=tmp;

  for(int k=0;k<4;k++){
   check(cnt,d1,d2);
   if(cnt==6)break;
   tmp=d2[1];
   d2[1]=d2[3];
   d2[3]=d2[4];
   d2[4]=d2[2];
   d2[2]=tmp;
  }
 
   check(cnt,d1,d2);
   if(cnt==6)break;

  tmp=d2[0]; 
  d2[0]=d2[3];
  d2[3]=d2[5];
  d2[5]=d2[2];
  d2[2]=tmp;
  tmp=d2[0]; 
  d2[0]=d2[3];
  d2[3]=d2[5];
  d2[5]=d2[2];
  d2[2]=tmp;

  for(int k=0;k<4;k++){
   check(cnt,d1,d2);
   if(cnt==6)break;
   tmp=d2[1];
   d2[1]=d2[3];
   d2[3]=d2[4];
   d2[4]=d2[2];
   d2[2]=tmp;
  }
   check(cnt,d1,d2);
   if(cnt==6)break;
 a=0;
 }

 if(cnt==6)cout << "Yes" << endl ;
 else cout << "No" << endl ;

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:10: error: 'cnt' was not declared in this scope; did you mean 'int'?
   19 |    check(cnt,d1,d2);
      |          ^~~
      |          int
Language: C++

#include <iostream>
using namespace std;

#define check cnt=0;for(j=0;j<6;j++)if(d1[j]==d2[j])cnt++;
#define r tmp=d2[1];d2[1]=d2[3];d2[3]=d2[4];d2[4]=d2[2];d2[2]=tmp;
#define y tmp=d2[0];d2[0]=d2[3];d2[3]=d2[5];d2[5]=d2[2];d2[2]=tmp;

bool same(){int d1[],int d2[]);
 int tmp,cnt,j,a=1,i,k;
 check
   if(cnt==6)a=0;

 while(a){
  for(i=0;i<5;i++){
   for(k=0;k<4;k++){
    check
    if(cnt==6)break;
    r
   }
   check
   if(cnt==6)break;
   tmp=d2[0];
   d2[0]=d2[1];
   d2[1]=d2[5];
   d2[5]=d2[4];
   d2[4]=tmp;
  }
  if(cnt==6)break;
  y
  for(k=0;k<4;k++){
   check
   if(cnt==6)break;
   r
  }
  if(cnt==6)break;
  y
  y
  for(k=0;k<4;k++){
   check
   if(cnt==6)break;
   r
  }
  a=0;
 }

 if(cnt==6)return true;
 return false;

}


int main(){
 int d1[6],d2[6],tmp,cnt,j,a=1,i,k,judge;

 for(int i=0;i<6;i++){
  cin >> d1[i] ;
 }
 for(int i=0;i<6;i++){
  cin >> d2[i] ;
 }

Compiler output:
a.cc: In function 'bool same()':
a.cc:8:17: error: storage size of 'd1' isn't known
    8 | bool same(){int d1[],int d2[]);
      |                 ^~
a.cc:8:22: error: expected unqualified-id before 'int'
    8 | bool same(){int d1[],int d2[]);
      |                      ^~~
a.cc:4:47: error: 'd2' was not declared in this scope
    4 | #define check cnt=0;for(j=0;j<6;j++)if(d1[j]==d2[j])cnt++;
      |                                               ^~
a.cc:10:2: note: in expansion of macro 'check'
   10 |  check
      |  ^~~~~
a.cc:4:47: error: 'd2' was not declared in this scope
    4 | #define check cnt=0;for(j=0;j<6;j++)if(d1[j]==d2[j])cnt++;
      |                                               ^~
a.cc:16:5: note: in expansion of macro 'check'
   16 |     check
      |     ^~~~~
a.cc:5:15: error: 'd2' was not declared in this scope
    5 | #define r tmp=d2[1];d2[1]=d2[3];d2[3]=d2[4];d2[4]=d2[2];d2[2]=tmp;
      |               ^~
a.cc:18:5: note: in expansion of macro 'r'
   18 |     r
      |     ^
a.cc:4:47: error: 'd2' was not declared in this scope
    4 | #define check cnt=0;for(j=0;j<6;j++)if(d1[j]==d2[j])cnt++;
      |                                               ^~
a.cc:20:4: note: in expansion of macro 'check'
   20 |    check
      |    ^~~~~
a.cc:22:8: error: 'd2' was not declared in this scope
   22 |    tmp=d2[0];
      |        ^~
a.cc:6:15: error: 'd2' was not declared in this scope
    6 | #define y tmp=d2[0];d2[0]=d2[3];d2[3]=d2[5];d2[5]=d2[2];d2[2]=tmp;
      |               ^~
a.cc:29:3: note: in expansion of macro 'y'
   29 |   y
      |   ^
a.cc: In function 'int main()':
a.cc:60:3: error: expected '}' at end of input
   60 |  }
      |   ^
a.cc:52:11: note: to match this '{'
   52 | int main(){
      |           ^
Language: C++

#include <iostream>
using namespace std;

#define check cnt=0;for(j=0;j<6;j++)if(d1[j]==d2[j])cnt++;
#define r tmp=d2[1];d2[1]=d2[3];d2[3]=d2[4];d2[4]=d2[2];d2[2]=tmp;
#define y tmp=d2[0];d2[0]=d2[3];d2[3]=d2[5];d2[5]=d2[2];d2[2]=tmp;

bool same(){int d1[],int d2[]);
 int tmp,cnt,j,a=1,i,k;
 check
   if(cnt==6)a=0;

 while(a){
  for(i=0;i<5;i++){
   for(k=0;k<4;k++){
    check
    if(cnt==6)break;
    r
   }
   check
   if(cnt==6)break;
   tmp=d2[0];
   d2[0]=d2[1];
   d2[1]=d2[5];
   d2[5]=d2[4];
   d2[4]=tmp;
  }
  if(cnt==6)break;
  y
  for(k=0;k<4;k++){
   check
   if(cnt==6)break;
   r
  }
  if(cnt==6)break;
  y
  y
  for(k=0;k<4;k++){
   check
   if(cnt==6)break;
   r
  }
  a=0;
 }

 if(cnt==6)return true;
 return false;

}


int main(){
 int d1[6],d2[6],tmp,cnt,j,a=1,i,k,judge;

 for(int i=0;i<6;i++){
  cin >> d1[i] ;
 }
 for(int i=0;i<6;i++){
  cin >> d2[i] ;
 }

 if(same(d1,d2))judge=1;
 else judge=0;

 if(judge==1)cout << "Yes" << endl ;
 else cout << "No" << endl ;

 return 0;
}

Compiler output:
a.cc: In function 'bool same()':
a.cc:8:17: error: storage size of 'd1' isn't known
    8 | bool same(){int d1[],int d2[]);
      |                 ^~
a.cc:8:22: error: expected unqualified-id before 'int'
    8 | bool same(){int d1[],int d2[]);
      |                      ^~~
a.cc:4:47: error: 'd2' was not declared in this scope
    4 | #define check cnt=0;for(j=0;j<6;j++)if(d1[j]==d2[j])cnt++;
      |                                               ^~
a.cc:10:2: note: in expansion of macro 'check'
   10 |  check
      |  ^~~~~
a.cc:4:47: error: 'd2' was not declared in this scope
    4 | #define check cnt=0;for(j=0;j<6;j++)if(d1[j]==d2[j])cnt++;
      |                                               ^~
a.cc:16:5: note: in expansion of macro 'check'
   16 |     check
      |     ^~~~~
a.cc:5:15: error: 'd2' was not declared in this scope
    5 | #define r tmp=d2[1];d2[1]=d2[3];d2[3]=d2[4];d2[4]=d2[2];d2[2]=tmp;
      |               ^~
a.cc:18:5: note: in expansion of macro 'r'
   18 |     r
      |     ^
a.cc:4:47: error: 'd2' was not declared in this scope
    4 | #define check cnt=0;for(j=0;j<6;j++)if(d1[j]==d2[j])cnt++;
      |                                               ^~
a.cc:20:4: note: in expansion of macro 'check'
   20 |    check
      |    ^~~~~
a.cc:22:8: error: 'd2' was not declared in this scope
   22 |    tmp=d2[0];
      |        ^~
a.cc:6:15: error: 'd2' was not declared in this scope
    6 | #define y tmp=d2[0];d2[0]=d2[3];d2[3]=d2[5];d2[5]=d2[2];d2[2]=tmp;
      |               ^~
a.cc:29:3: note: in expansion of macro 'y'
   29 |   y
      |   ^
a.cc: In function 'int main()':
a.cc:62:9: error: too many arguments to function 'bool same()'
   62 |  if(same(d1,d2))judge=1;
      |     ~~~~^~~~~~~
a.cc:8:6: note: declared here
    8 | bool same(){int d1[],int d2[]);
      |      ^~~~
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);}
  void roll_x(){ roll(0, 1, 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 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_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 'int main()':
a.cc:40:21: error: expected ';' before 'cout'
   40 |   if ( equal(c1, c2) cout << "Yes" << endl;
      |                     ^~~~~
      |                     ;
a.cc:41:3: error: expected primary-expression before 'else'
   41 |   else cout << "No" << endl;
      |   ^~~~
a.cc:40:44: error: expected ')' before 'else'
   40 |   if ( equal(c1, c2) cout << "Yes" << endl;
      |      ~                                     ^
      |                                            )
   41 |   else cout << "No" << endl;
      |   ~~~~
Language: C++

#include <iostream>

using namespace std;

struct Dise
{
  int top;
  int bottom;
  int north;
  int east;
  int south;
  int west;
  void toNorth()
  {
    int t = top, b = bottom, n = north, s = south;
    top = s, bottom = n, north = t, south = b;
  }
  void toEast()
  {
    int t = top, b = bottom, e = east, w = west;
    top = w, bottom = e, east = t, west = b;
  }
  void toSouth()
  {
    int t = top, b = bottom, n = north, s = south;
    top = n, bottom = s, north = b, south = t;
  }
  void toWest()
  {
    int t = top, b = bottom, e = east, w = west;
    top = e, bottom = w, west = t, east = b;
  }
  void toTop(int a)
  {
    if (a == north)
      toSouth();
    else if (a == east)
      toWest();
    else if (a == south)
      toNorth();
    else if (a == west)
      toEast();
    else if (a == bottom)
    {
      toNorth();
      toNorth();
    }
  }
  void spin()
  {
    int n = north, e = east, s = south, w = west;
    north = w, east = n, south = e, west = s;
  }
} d1, d2;

int main()
{
  int n[2][6];
  for (int i = 0; i < 2; i++)
    for (int j = 0; j < 6; j++)
    {
      cin >> n[i][j];
    }
  d1.top = n[0][0], d1.south = n[0][1], d1.east = n[0][2],
  d1.west = n[0][3], d1.north = n[0][4], d1.bottom = n[0][5];
  d2.top = n[1][0], d2.south = n[1][1], d2.east = n[1][2],
  d2.west = n[1][3], d2.north = n[1][4], d2.bottom = n[1][5];

  // ??°?????????????§???????
  sort(n[0], n[0] + 6);
  sort(n[1], n[1] + 6);
  for (int i = 0; i < 6; i++)
    if (n[0][i] != n[1][i])
    {
      cout << "No" << endl;
      return 0;
    }

  d2.toTop(d1.top);
  while (d2.south != d1.south)
  {
    d2.spin();
  }

  if (d1.north == d2.north && d1.east == d2.east && d1.west == d2.west)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:70:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   70 |   sort(n[0], n[0] + 6);
      |   ^~~~
      |   short
Language: C++

d,e=[[s for s in input().split()]for _ in range(2)];e[3],e[4]=e[4],e[3]
t=0
for p in('012345','152304','215043','310542','402351','513240'):
 f=[d[int(j)]for j in p];f[3],f[4]=f[4],f[3]
 if f[0]==e[0]:
  f=f[1:5]*2
  for j in range(4):
   if f[j:j+4]==e[1:5]:t=1
print(('No','Yes')[t])


Compiler output:
a.cc:3:10: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    3 | for p in('012345','152304','215043','310542','402351','513240'):
      |          ^~~~~~~~
a.cc:3:19: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    3 | for p in('012345','152304','215043','310542','402351','513240'):
      |                   ^~~~~~~~
a.cc:3:28: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    3 | for p in('012345','152304','215043','310542','402351','513240'):
      |                            ^~~~~~~~
a.cc:3:37: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    3 | for p in('012345','152304','215043','310542','402351','513240'):
      |                                     ^~~~~~~~
a.cc:3:46: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    3 | for p in('012345','152304','215043','310542','402351','513240'):
      |                                              ^~~~~~~~
a.cc:3:55: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    3 | for p in('012345','152304','215043','310542','402351','513240'):
      |                                                       ^~~~~~~~
a.cc:9:8: warning: multi-character character constant [-Wmultichar]
    9 | print(('No','Yes')[t])
      |        ^~~~
a.cc:9:13: warning: multi-character character constant [-Wmultichar]
    9 | print(('No','Yes')[t])
      |             ^~~~~
a.cc:1:1: error: 'd' does not name a type
    1 | d,e=[[s for s in input().split()]for _ in range(2)];e[3],e[4]=e[4],e[3]
      | ^
a.cc:1:53: error: 'e' does not name a type
    1 | d,e=[[s for s in input().split()]for _ in range(2)];e[3],e[4]=e[4],e[3]
      |                                                     ^
a.cc:4:26: error: 'f' does not name a type
    4 |  f=[d[int(j)]for j in p];f[3],f[4]=f[4],f[3]
      |                          ^
Language: C++

#include<iostream>
#include<cstdio>
#include<cmath>
#include<string>
#include<cstring>
#include<cctype>
using namespace std;
 
class dice {
public:
    int face[7];
    int get;
 
    dice(int x[]) {
        for (int i = 1; i <= 6; i++)
            face[i] = x[i];
    }
 
    void round(string x) {
        for (int i = 0; i < x.size(); i++) {
            switch (x[i]) {
            case 'E':
                get = face[1];
                face[1] = face[4];
                face[4] = face[6];
                face[6] = face[3];
                face[3] = get;
                break;
            case 'W':
                get = face[1];
                face[1] = face[3];
                face[3] = face[6];
                face[6] = face[4];
                face[4] = get;
                break;
            case 'N':
                get = face[1];
                face[1] = face[2];
                face[2] = face[6];
                face[6] = face[5];
                face[5] = get;
                break;
            case 'S':
                get = face[1];
                face[1] = face[5];
                face[5] = face[6];
                face[6] = face[2];
                face[2] = get;
                break;
            }
        }
    }
};
 
int main() {
    int facef[7], i, ident=0;
    string operate="EEENEEENEEESEEESEEENEEEN";
 
    for (int i = 1; i <= 6; i++) {
        cin >> facef[i];
    }
 
    dice dice1(facef);
 
    for (int i = 1; i <= 6; i++) {
        cin >> facef[i];
    }

    dice dice2(facef);
 
    for(i=0;i<operate.size();i++){
        dice2.round(operate[i]);
        if(dice1.face[1]==dice2.face[1] && dice1.face[2]==dice2.face[2] && dice1.face[3]==dice2.face[3] && dice1.face[4]==dice2.face[4] && dice1.face[5]==dice2.face[5] && dice1.face[6]==dice2.face[6]  ){
            ident=1;
            break;
        }
    } 
    if(ident=1){
        cout << Yes << endl;
    }else{
        cout << No << endl;
    }

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:72:20: error: cannot convert '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   72 |         dice2.round(operate[i]);
      |         ~~~~~~~~~~~^~~~~~~~~~~~
a.cc:19:23: note:   initializing argument 1 of 'void dice::round(std::string)'
   19 |     void round(string x) {
      |                ~~~~~~~^
a.cc:79:17: error: 'Yes' was not declared in this scope
   79 |         cout << Yes << endl;
      |                 ^~~
a.cc:81:17: error: 'No' was not declared in this scope
   81 |         cout << No << endl;
      |                 ^~
Language: C++

#include <stdio.h>
#include <string.h>
#define rep(i, n) for(int i = 0; i < n; ++i)

class dice {
  private:
    int f[6];
  public:
    dice(int *a){
      int i;
      rep(i, 6) f[i] = a[i];
    }
    void n(){
      int t;
      t = f[0];
      f[0] = f[1];
      f[1] = f[5];
      f[5] = f[4];
      f[4] = t;
    }
    void s() {
      int t;
      t = f[0];
      f[0] = f[4];
      f[4] = f[5];
      f[5] = f[1];
      f[1] = t;
    }
    void w() {
      int t;
      t = f[0];
      f[0] = f[2];
      f[2] = f[5];
      f[5] = f[3];
      f[3] = t;
    }
    void e() {
      int t;
      t = f[0];
      f[0] = f[3];
      f[3] = f[5];
      f[5] = f[2];
      f[2] = t;
    }
    void r() {
      int t;
      t = f[1];
      f[1] = f[2];
      f[2] = f[4];
      f[4] = f[3];
      f[3] = t;
    }
    void l() {
      int t;
      t = f[1];
      f[1] = f[3];
      f[3] = f[4];
      f[4] = f[2];
      f[2] = t;
    }
    int print(int num) {
      return f[num];
    }
};

int main(void) {
  int a[6], i, j, b[6];
  rep(i, 6) scanf("%d", &a[i]);
  rep(i, 6) scanf("&d", &b[i]);
  dice d1(a), d2(b);
  if(d1.print(1) == d2.print(0)) d1.n();
  else if(d1.print(2) == d2.print(0)) d1.w();
  else if(d1.print(3) == d2.print(0)) d1.e();
  else if(d1.print(4) == d2.print(0)) d1.s();
  else if(d1.print(5) == d2.print(0)) d1.n(), d1.n();
  else if(d.print(2) == d2.print(1)) d1.r();
  else if(d.print(3) == d2.print(1)) d1.l();
  else if(d.print(4) == d2.print(1)) d1.r(), d1.r();
  int s = 0;
  rep(i, 6) if(d1.print(i) != d2.print(i)) s = 1;
  if(s) printf("No\n");
  else printf("Yes\n");
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:76:11: error: 'd' was not declared in this scope; did you mean 'd2'?
   76 |   else if(d.print(2) == d2.print(1)) d1.r();
      |           ^
      |           d2
Language: C++

import java.util.Arrays;
import java.util.Scanner;

public class Main {
	static String[] a;
	static String[] b;
	static String temp;

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		a = scanner.nextLine().split(" ");
		b = scanner.nextLine().split(" ");
		char[] c = { 'E', 'E', 'E', 'N', 'W', 'W', 'W', 'S' };
		
		boolean flag = false;
		for(int i=0;i<3;i++){
			for(char d:c){
				roll(d);
				if(Arrays.equals(a, b)){
					flag=true;
					break;
				}
			}
		}
		if(flag)
			System.out.println("Yes");
		else
			System.out.println("No");
	}

	public static void roll(char c) {
		switch (c) {
		case 'E':
			temp = a[0];
			a[0] = a[3];
			a[3] = a[5];
			a[5] = a[2];
			a[2] = temp;
			break;
		case 'N':
			temp = a[0];
			a[0] = a[1];
			a[1] = a[5];
			a[5] = a[4];
			a[4] = temp;
			break;
		case 'W':
			temp = a[0];
			a[0] = a[2];
			a[2] = a[5];
			a[5] = a[3];
			a[3] = temp;
			break;
		default:
			temp = a[0];
			a[0] = a[4];
			a[4] = a[5];
			a[5] = a[1];
			a[1] = temp;
			break;
		}
	}

}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Arrays;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.util.Scanner;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
    4 | public class Main {
      | ^~~~~~
Language: C++

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

int a[7];
int e=0;

void move(char i){
int b[7];
for(int n=1;n<7;n++){b[n]=a[n];}

if(i=='W'){
a[6]=b[4];
a[4]=b[1];
a[1]=b[3];
a[3]=b[6];
}

if(i=='N'){
a[6]=b[5];
a[5]=b[1];
a[1]=b[2];
a[2]=b[6];
}

if(i=='E'){
a[6]=b[3];
a[3]=b[1];
a[1]=b[4];
a[4]=b[6];
}

if(i=='S'){
a[6]=b[2];
a[2]=b[1];
a[1]=b[5];
a[5]=b[6];
}

if(i=='R'){
a[3]=b[2];
a[2]=b[4];
a[4]=b[5];
a[5]=b[3];
}}





int main(){
int c[7];
string t="NWSWSWRRRRNNNEEESESWNRRRSREWNNNSERSRWNNWWWNNNNSRSREW"//52
for(int m=1;m<7;m++){cin>>a[m];}
for(int h=1;h<7;h++){cin>>c[h];}

for(int g=0;g<52;g++){
for(int l=1;l<7;l++){
if(l==6 && a[l]==c[l]){e=1;}
if(a[l]==c[l]){continue;}
break;
}
if(e==1){break;}
move(t[g]);
}

if(e==1){cout<<"Yes"<<endl;}
if(e==0){cout<<"No"<<endl;}

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:53:1: error: expected ',' or ';' before 'for'
   53 | for(int m=1;m<7;m++){cin>>a[m];}
      | ^~~
a.cc:53:13: error: 'm' was not declared in this scope
   53 | for(int m=1;m<7;m++){cin>>a[m];}
      |             ^
Language: C++

set_first = [
    [1,2,3,4,5,6],
    [5,1,3,4,6,2],
    [4,2,1,6,5,3],
    [3,2,6,1,5,4],
    [2,6,3,4,1,5],
    [6,5,3,4,2,1]]

set_rotate = [
    ['dummy'],
    [1,2,3,4,5,6],
    [1,4,2,5,3,6],
    [1,3,5,2,4,6],
    [1,5,4,3,2,6]]

rotate = lambda dice, order: [dice[order[i]-1] for i in range(6)]

def set_dice(dice):
    i = dice.index(min(dice))
    ret = rotate(dice, set_first[i])
    j = ret.index(min(ret[1:]))
    if j == 5:
        j = ret.index(min(ret[1:5]))
    ret = rotate(ret, set_rotate[j])
    return '-'.join(map(str,ret))
   
dice_1 = list(map(int, input().split()))
dice_1s = set_dice(dice_1)

dice_2 = list(map(int, input().split()))
dice_2s = set_dice(dice_2)

if dice_1s == dice_2s:
    print('Yes')
else:
    print('No')


Compiler output:
a.cc:10:6: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   10 |     ['dummy'],
      |      ^~~~~~~
a.cc:34:11: warning: multi-character character constant [-Wmultichar]
   34 |     print('Yes')
      |           ^~~~~
a.cc:36:11: warning: multi-character character constant [-Wmultichar]
   36 |     print('No')
      |           ^~~~
a.cc:1:1: error: 'set_first' does not name a type
    1 | set_first = [
      | ^~~~~~~~~
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:44:2: error: expected '}' at end of input
   44 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | class Cube{
      |           ^
a.cc: In constructor 'Cube::Cube()':
a.cc:8:16: error: a function-definition is not allowed here before '{' token
    8 |   void roll_z(){roll(1,2,4,3);} //
      |                ^
a.cc:9:16: error: a function-definition is not allowed here before '{' token
    9 |   void roll_y(){roll(0,2,5,3);} // to W
      |                ^
a.cc:10:16: error: a function-definition is not allowed here before '{' token
   10 |   void roll_x(){roll(0,1,5,4);} // to N
      |                ^
a.cc:11:41: error: a function-definition is not allowed here before '{' token
   11 |   void roll( int i, int j, int k, int l){
      |                                         ^
a.cc: In member function 'bool Cube::equal(Cube, Cube)':
a.cc:26:17: error: 'class Cube' has no member named 'roll_z'
   26 |              c1.roll_z;
      |                 ^~~~~~
a.cc:28:32: error: 'class Cube' has no member named 'roll_y'
   28 |           if (i % 2 == 0 ) c1. roll_y();
      |                                ^~~~~~
a.cc:29:19: error: 'class Cube' has no member named 'roll_x'
   29 |           else c1.roll_x();
      |                   ^~~~~~
a.cc: At global scope:
a.cc:44:2: error: expected unqualified-id at end of input
   44 | }
      |  ^
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 equal(Cube, Cube)':
a.cc:26:17: error: invalid use of non-static member function 'void Cube::roll_z()'
   26 |              c1.roll_z;
      |              ~~~^~~~~~
a.cc:8:8: note: declared here
    8 |   void roll_z(){roll(1,2,4,3);} //
      |        ^~~~~~
Language: Java


public class Main{

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		 Dice3 di3 = new Dice3();		//Dice3のインスタンス

		int n = scan.nextInt();		//回数n

		int[] dice1 = new int[6];		//dice1作成
		for(int i=0; i<6; i++) {
			dice1[i] = scan.nextInt();
		}

		int[] answer2 = new int[6]; 	//確認した後の配列
		boolean flag = false;			//最終判定

		int[] dice2 = new int[6];		//dice2作成

		//n-1回サイコロを作成し確認
		for(int i=0; i<n-1; i++) {

			for(int j=0; j<6; j++) {
				dice2[j] = scan.nextInt();
			}


			answer2 = di3.check(dice1, dice2);		//総当たりで確認


			if(Arrays.equals(dice1, answer2)) {
				flag = true;
				break;
			}
		}

		if(flag) {		//既に算出済み
			System.out.println("No");
		}else
			System.out.println("Yes");
	}
}



class Dice3{
	static int top = 0;
	static int side1 = 0;
	
	static int[] answer = new int[6]; //動かすサイコロの形

	//command（特定の文字が入力された際、その方向に転がす）
	int[] command(int[] dice, char com) {
	    	top = dice[0];	//dice[0]を覚えておく
	    	side1 = dice[1];	//dice[1]を覚えておく

	    	switch (com) {

	    	case 'N':
	    		dice[0] = dice[1];
	    		dice[1] = dice[5];
	    		dice[5] = dice[4];
	    		dice[4] = top;
	    		break;

	    	case 'W':
	    		dice[0] = dice[2];
	    		dice[2] = dice[5];
	    		dice[5] = dice[3];
	    		dice[3] = top;
	    		break;


	    	case 'R':
	    		dice[1] = dice[3];
	    		dice[3] = dice[4];
	    		dice[4] = dice[2];
	    		dice[2] = side1;
	    		break;
	    	}
		return dice; 		//配列を返す
	 }


	//check（全ての面で配列d2を横回転させ配列d１と比較）
	int[] check(int[] d1 ,int[] d2) {

		//N方向回転
		for(int k=0; k<4; k++) {

			if(Arrays.equals(d1, answer)) {		//配列の比較はArraysから
				break;
			}
			answer = command(d2, 'N');

			//横回転
			for(int l=0; l<4; l++) {

				if(Arrays.equals(d1, answer)) {
					break;
				}
				answer = command(d2, 'R');
			}
		}

		//W方向回転
		for(int k=0; k<4; k++) {

			if(Arrays.equals(d1, answer)){
				break;
			}
			answer = command(d2, 'W');

			//横回転
			for(int l=0; l<4; l++) {

				if(Arrays.equals(d1, answer)) {
					break;
				}
				answer = command(d2, 'R');
			}
		}
		return answer;
	}
}


Compiler output:
Main.java:6: error: cannot find symbol
		Scanner scan = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:6: error: cannot find symbol
		Scanner scan = new Scanner(System.in);
		                   ^
  symbol:   class Scanner
  location: class Main
Main.java:32: error: cannot find symbol
			if(Arrays.equals(dice1, answer2)) {
			   ^
  symbol:   variable Arrays
  location: class Main
Main.java:92: error: cannot find symbol
			if(Arrays.equals(d1, answer)) {		//??????Arrays??
			   ^
  symbol:   variable Arrays
  location: class Dice3
Main.java:100: error: cannot find symbol
				if(Arrays.equals(d1, answer)) {
				   ^
  symbol:   variable Arrays
  location: class Dice3
Main.java:110: error: cannot find symbol
			if(Arrays.equals(d1, answer)){
			   ^
  symbol:   variable Arrays
  location: class Dice3
Main.java:118: error: cannot find symbol
				if(Arrays.equals(d1, answer)) {
				   ^
  symbol:   variable Arrays
  location: class Dice3
7 errors
Language: Java

import java.util.*

public class Main{

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		 Dice3 di3 = new Dice3();		//Dice3のインスタンス

		int n = scan.nextInt();		//回数n

		int[] dice1 = new int[6];		//dice1作成
		for(int i=0; i<6; i++) {
			dice1[i] = scan.nextInt();
		}

		int[] answer2 = new int[6]; 	//確認した後の配列
		boolean flag = false;			//最終判定

		int[] dice2 = new int[6];		//dice2作成

		//n-1回サイコロを作成し確認
		for(int i=0; i<n-1; i++) {

			for(int j=0; j<6; j++) {
				dice2[j] = scan.nextInt();
			}


			answer2 = di3.check(dice1, dice2);		//総当たりで確認


			if(Arrays.equals(dice1, answer2)) {
				flag = true;
				break;
			}
		}

		if(flag) {		//既に算出済み
			System.out.println("No");
		}else
			System.out.println("Yes");
	}
}



class Dice3{
	static int top = 0;
	static int side1 = 0;
	
	static int[] answer = new int[6]; //動かすサイコロの形

	//command（特定の文字が入力された際、その方向に転がす）
	int[] command(int[] dice, char com) {
	    	top = dice[0];	//dice[0]を覚えておく
	    	side1 = dice[1];	//dice[1]を覚えておく

	    	switch (com) {

	    	case 'N':
	    		dice[0] = dice[1];
	    		dice[1] = dice[5];
	    		dice[5] = dice[4];
	    		dice[4] = top;
	    		break;

	    	case 'W':
	    		dice[0] = dice[2];
	    		dice[2] = dice[5];
	    		dice[5] = dice[3];
	    		dice[3] = top;
	    		break;


	    	case 'R':
	    		dice[1] = dice[3];
	    		dice[3] = dice[4];
	    		dice[4] = dice[2];
	    		dice[2] = side1;
	    		break;
	    	}
		return dice; 		//配列を返す
	 }


	//check（全ての面で配列d2を横回転させ配列d１と比較）
	int[] check(int[] d1 ,int[] d2) {

		//N方向回転
		for(int k=0; k<4; k++) {

			if(Arrays.equals(d1, answer)) {		//配列の比較はArraysから
				break;
			}
			answer = command(d2, 'N');

			//横回転
			for(int l=0; l<4; l++) {

				if(Arrays.equals(d1, answer)) {
					break;
				}
				answer = command(d2, 'R');
			}
		}

		//W方向回転
		for(int k=0; k<4; k++) {

			if(Arrays.equals(d1, answer)){
				break;
			}
			answer = command(d2, 'W');

			//横回転
			for(int l=0; l<4; l++) {

				if(Arrays.equals(d1, answer)) {
					break;
				}
				answer = command(d2, 'R');
			}
		}
		return answer;
	}
}


Compiler output:
Main.java:1: error: ';' expected
import java.util.*
                  ^
1 error
Language: Java

import java.util.Arrays;
import java.util.Scanner;

public class Main {
	static String str;
	static Scanner scan = new Scanner(System.in);
	public static void main(String[] args) {
		int n = Integer.parseInt(scan.nextLine());
		//???????????????????????°???dice???????´?
		str = scan.nextLine();
		String[] dice1 = str.split(" ");
		str = scan.nextLine();
		String[] dice2 = str.split(" ");
		int i = 0;

		
		for (int i = 0; i < n-2; i++) {
			if(!(sort(dice1, dice2))){
				str = scan.nextLine();
				dice2 = str.split(" ");
			}else{
				System.out.println("No");
				return;
			}
		}
	       System.out.println("Yes");
		
	}

	/**
	 * ?????????????????¢????????????????±???????????????????
	 * @param dice
	 * @param diceOrigin
	 * @return bool
	 */
	private static boolean sort(String[] dice, String[] diceOrigin){
		boolean bool = false;
		for(int i = 0; i < 4; i++){
			for(int j = 0; j < 4; j++){
				for (int h = 0; h < 4; h++) {
					String[] direction = new String[i+j+(h*3)];
					String[] dice2 = Arrays.copyOf(dice, dice.length);
					//??????????????¢?????????
					for (int k = 0; k < i; k++) {
						direction[k] = "N";
					}
					//?¨????????????¢?????????
					for (int l = 0; l < j; l++) {
						direction[i+l] = "E";
					}
					//?????????????????????
					for (int f = 0; f < h; f++) {
						int num = f * 3;
						direction[i+j+num] = "W";
						direction[i+j+(num+1)] = "S";
						direction[i+j+(num+2)] = "E";
					}
					
					//move????????????
					bool = move(dice2, direction, diceOrigin);
					if(bool){
						return true;
					}
				}
			}
		}
		return bool;
	}
	
	/**
	 * ??????????????????????????????????????????
	 * @param dice
	 * @param direction
	 * @param diceOrigin
	 * @return diceCheck
	 */
	private static boolean move(String[] dice, String[] direction, String[] diceOrigin) {
		for (int i = 0; i < direction.length; i++) {
			if(direction[i].equals("E")){
				str = dice[0];
				dice[0] = dice[3];
				dice[3] = dice[5];
				dice[5] = dice[2];
				dice[2] = str;
			}else if(direction[i].equals("W")){
				str = dice[0];
				dice[0] = dice[2];
				dice[2] = dice[5];
				dice[5] = dice[3];
				dice[3] = str;
			}else if(direction[i].equals("S")){
				str = dice[0];
				dice[0] = dice[4];
				dice[4] = dice[5];
				dice[5] = dice[1];
				dice[1] = str;
			}else if(direction[i].equals("N")){
				str = dice[0];
				dice[0] = dice[1];
				dice[1] = dice[5];
				dice[5] = dice[4];
				dice[4] = str;
			}
		}
		
		/*
		 * ????????????????????????????????¢??¨?????????????????????????????¢???????????????
		 * ??¢????????£???????????°true??????????????§????????°false?????????
		 */
		boolean diceCheck = true;
		for (int i = 0; i < diceOrigin.length; i++) {
			for (int j = 0; j < diceOrigin.length; j++) {
				if(!(diceOrigin[i].equals(dice[i]))){
					return false;
				}
			}
		}
		return diceCheck;	
	}
}

Compiler output:
Main.java:17: error: variable i is already defined in method main(String[])
		for (int i = 0; i < n-2; i++) {
		         ^
1 error
Language: Java

mport java.util.Scanner;
import java.util.Arrays;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        Dice dice = new Dice(sc, x);
        if(check(dice)){
            System.out.println("No");
        }else{
            System.out.println("Yes");
        }
    }
    
    public static boolean check(Dice dice) {
        char[] pat = {'N','N','E','E','E','N'};
        for(int j = 0; j < dice.data.length; j++){
            for(int k = 0; k < dice.data[j].length; k++){
                if(j == k){ break; }
                for(char p:pat){
                    if(Arrays.equals(dice.data[j], dice.data[k])){
                        return true;
                    }
                    dice.roll(0, p);
                    for(int i = 0; i < 4; i++){
                        if(Arrays.equals(dice.data[j], dice.data[k])){
                            return true;
                        }
                        dice.roll(0, 'Z');
                    }
                }
            }
        }
        return false;
    }
}

class Dice {
    static int[][] data;

    public Dice(Scanner sc, int x){
        data = new int[x][6];
        for(int i = 0; i < data.length; i++){
            for(int j = 0; j < data[i].length; j++){
            data[i][j] = sc.nextInt();
            }
        }
    }

    public static void roll(int n, char p) {
        int temp = data[n][0];
        switch(p){
            case 'E':
                data[n][0] = data[n][2];
                data[n][2] = data[n][5];
                data[n][5] = data[n][3];
                data[n][3] = temp; break;
            case 'W':
                data[n][0] = data[n][3];
                data[n][3] = data[n][5];
                data[n][5] = data[n][2];
                data[n][2] = temp; break;
            case 'S':
                data[n][0] = data[n][1];
                data[n][1] = data[n][5];
                data[n][5] = data[n][4];
                data[n][4] = temp; break;
            case 'N':
                data[n][0] = data[n][4];
                data[n][4] = data[n][5];
                data[n][5] = data[n][1];
                data[n][1] = temp; break;
            case 'Z':
                temp = data[n][1];
                data[n][1] = data[n][2];
                data[n][2] = data[n][4];
                data[n][4] = data[n][3];
                data[n][3] = temp; break;
            default:
        }
    }
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.Scanner;
^
Main.java:2: error: class, interface, enum, or record expected
import java.util.Arrays;
^
2 errors
Language: Java

import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);
	static boolean flag = false;

	public static void main(String[] args){
		
		int n = scan.nextInt();
		int[] d = new int[6];
		Dice[] dices = new Dice[n];

		for(int i = 0; i < n; i++){
			for(int j = 0; j < 6; j++){
				d[j] = scan.nextInt();
				Dice[i]._d[j] = d[j];
			}
		}

		for(int i = 0; i < n - 1; i++){
			for(int j = n - 1; j > i; j--){
				flag = checkSameDice(Dice[j], Dice[i]);
				if(flag == true)break;
			}
			if(flag == true)break;
		}
		System.out.println(flag? "No" : "Yes");
	}

	public static boolean checkSameDice(Dice diceA, Dice diceB){
		flag = false;
		for(int i = 0; i < 4; i++){
			for(int j = 0; j < 4; j++){
				flag = Arrays.equals(diceA._d, diceB._d);
				if(flag == true)break;
				diceB.rollEast();
			}
			for(int j = 0; j < 4; j++){
				flag = Arrays.equals(diceA._d, diceB._d);
				if(flag == true)break;
				diceB.rollSouth();
			}
			flag = Arrays.equals(diceA._d, diceB._d);
			if(flag == true)break;
			diceB.rollRight();
		}
		return flag;
	}
}

class Dice{

	int[] _d = new int[6];
	public static final int
		TOP = 0, SOUTH = 1, EAST = 2,
		WEST = 3, NORTH = 4, BOTTOM = 5; // ?????°

	public Dice(int[] d){ // ?????????????????????
		for(int i = 0; i < 6; i++){
			_d[i] = d[i];
		}
	}

	public void rollSouth(){
		int tmp = _d[TOP];
		_d[TOP] = _d[NORTH];
		_d[NORTH] = _d[BOTTOM];
		_d[BOTTOM] = _d[SOUTH];
		_d[SOUTH] = tmp;
	}

	public void rollNorth(){
		int tmp = _d[TOP];
		_d[TOP] = _d[SOUTH];
		_d[SOUTH] = _d[BOTTOM];
		_d[BOTTOM] = _d[NORTH];
		_d[NORTH] = tmp;
	}

	public void rollEast(){
		int tmp = _d[TOP];
		_d[TOP] = _d[WEST];
		_d[WEST] = _d[BOTTOM];
		_d[BOTTOM] = _d[EAST];
		_d[EAST] = tmp;
	}

	public void rollWest(){
		int tmp = _d[TOP];
		_d[TOP] = _d[EAST];
		_d[EAST] = _d[BOTTOM];
		_d[BOTTOM] = _d[WEST];
		_d[WEST] = tmp;
	}

	public void rollRight(){
		int tmp = _d[SOUTH];
		_d[SOUTH] = _d[WEST];
		_d[WEST] = _d[NORTH];
		_d[NORTH] = _d[EAST];
		_d[EAST] = tmp;
	}
}

Compiler output:
Main.java:16: error: cannot find symbol
				Dice[i]._d[j] = d[j];
				^
  symbol:   variable Dice
  location: class Main
Main.java:22: error: cannot find symbol
				flag = checkSameDice(Dice[j], Dice[i]);
				                     ^
  symbol:   variable Dice
  location: class Main
Main.java:22: error: cannot find symbol
				flag = checkSameDice(Dice[j], Dice[i]);
				                              ^
  symbol:   variable Dice
  location: class Main
3 errors
Language: Java

import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);
	static boolean flag = false;

	public static void main(String[] args){
		
		int n = scan.nextInt();
		int[] d = new int[6];
		Dice[] dices = new Dice[n];

		for(int i = 0; i < n; i++){
			for(int j = 0; j < 6; j++){
				d[j] = scan.nextInt();
				Dice[i]._d[j] = d[j];
			}
		}

		for(int i = 0; i < n - 1; i++){
			for(int j = n - 1; j > i; j--){
				flag = checkSameDice(Dice[j], Dice[j - 1]);
				if(flag == true)break;
			}
			if(flag == true)break;
		}
		System.out.println(flag? "No" : "Yes");
	}

	public static boolean checkSameDice(Dice diceA, Dice diceB){
		flag = false;
		for(int i = 0; i < 4; i++){
			for(int j = 0; j < 4; j++){
				flag = Arrays.equals(diceA._d, diceB._d);
				if(flag == true)break;
				diceB.rollEast();
			}
			for(int j = 0; j < 4; j++){
				flag = Arrays.equals(diceA._d, diceB._d);
				if(flag == true)break;
				diceB.rollSouth();
			}
			flag = Arrays.equals(diceA._d, diceB._d);
			if(flag == true)break;
			diceB.rollRight();
		}
		return flag;
	}
}

class Dice{

	int[] _d = new int[6];
	public static final int
		TOP = 0, SOUTH = 1, EAST = 2,
		WEST = 3, NORTH = 4, BOTTOM = 5; // ?????°

	public Dice(int[] d){ // ?????????????????????
		for(int i = 0; i < 6; i++){
			_d[i] = d[i];
		}
	}

	public void rollSouth(){
		int tmp = _d[TOP];
		_d[TOP] = _d[NORTH];
		_d[NORTH] = _d[BOTTOM];
		_d[BOTTOM] = _d[SOUTH];
		_d[SOUTH] = tmp;
	}

	public void rollNorth(){
		int tmp = _d[TOP];
		_d[TOP] = _d[SOUTH];
		_d[SOUTH] = _d[BOTTOM];
		_d[BOTTOM] = _d[NORTH];
		_d[NORTH] = tmp;
	}

	public void rollEast(){
		int tmp = _d[TOP];
		_d[TOP] = _d[WEST];
		_d[WEST] = _d[BOTTOM];
		_d[BOTTOM] = _d[EAST];
		_d[EAST] = tmp;
	}

	public void rollWest(){
		int tmp = _d[TOP];
		_d[TOP] = _d[EAST];
		_d[EAST] = _d[BOTTOM];
		_d[BOTTOM] = _d[WEST];
		_d[WEST] = tmp;
	}

	public void rollRight(){
		int tmp = _d[SOUTH];
		_d[SOUTH] = _d[WEST];
		_d[WEST] = _d[NORTH];
		_d[NORTH] = _d[EAST];
		_d[EAST] = tmp;
	}
}

Compiler output:
Main.java:16: error: cannot find symbol
				Dice[i]._d[j] = d[j];
				^
  symbol:   variable Dice
  location: class Main
Main.java:22: error: cannot find symbol
				flag = checkSameDice(Dice[j], Dice[j - 1]);
				                     ^
  symbol:   variable Dice
  location: class Main
Main.java:22: error: cannot find symbol
				flag = checkSameDice(Dice[j], Dice[j - 1]);
				                              ^
  symbol:   variable Dice
  location: class Main
3 errors