Language: C++

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

int a[100][7];
int e=0;


//houkou,taishou
void move(char i,int o){
int b[100][7];
for(int n=1;n<7;n++){b[o][n]=a[o][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];
}}


//naniwouehe,taishou
void move2(int r,int p){
if(r==2){move('N',p);}
if(r==3){move('W',p);}
if(r==4){move('E',p);}
if(r==5){move('S',p);}
if(r==6){move('N',p); move('N',p);}
}


//nanito,naniga
void right(int o,int p){
for(int l=1;l<7;l++){
if(l==6 && a[o][l]==a[p][l]){e=1;}
if(a[l]==c[l]){continue;}
break;
}}




int main(){
int O;
cin>>O;
for(h=0;h<O;h++){
for(g=1;g<7;g++){
cin>>a[h][g];
}}




for(int P=0;p<O-1;P++){
for(int I=P+1;I<O;I++){


int da[7];
for(int h=1;h<7;h++){da[h]=a[P][h];}

for(int g=1;g<=7;g++){
for(int n=0;n<=4;n++){

right(P,I);

if(e==1){break;}
move('R',P);
}
if(e==1){break;}
for(int h=1;h<7;h++){a[P][h]=da[h];}
move2(g,P);
}


if(e==1){break;}
}
if(e==1){break;}
}

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

return 0;
}


Compiler output:
a.cc: In function 'void move(char, int)':
a.cc:14:5: error: invalid array assignment
   14 | a[6]=b[4];
      | ~~~~^~~~~
a.cc:15:5: error: invalid array assignment
   15 | a[4]=b[1];
      | ~~~~^~~~~
a.cc:16:5: error: invalid array assignment
   16 | a[1]=b[3];
      | ~~~~^~~~~
a.cc:17:5: error: invalid array assignment
   17 | a[3]=b[6];
      | ~~~~^~~~~
a.cc:21:5: error: invalid array assignment
   21 | a[6]=b[5];
      | ~~~~^~~~~
a.cc:22:5: error: invalid array assignment
   22 | a[5]=b[1];
      | ~~~~^~~~~
a.cc:23:5: error: invalid array assignment
   23 | a[1]=b[2];
      | ~~~~^~~~~
a.cc:24:5: error: invalid array assignment
   24 | a[2]=b[6];
      | ~~~~^~~~~
a.cc:28:5: error: invalid array assignment
   28 | a[6]=b[3];
      | ~~~~^~~~~
a.cc:29:5: error: invalid array assignment
   29 | a[3]=b[1];
      | ~~~~^~~~~
a.cc:30:5: error: invalid array assignment
   30 | a[1]=b[4];
      | ~~~~^~~~~
a.cc:31:5: error: invalid array assignment
   31 | a[4]=b[6];
      | ~~~~^~~~~
a.cc:35:5: error: invalid array assignment
   35 | a[6]=b[2];
      | ~~~~^~~~~
a.cc:36:5: error: invalid array assignment
   36 | a[2]=b[1];
      | ~~~~^~~~~
a.cc:37:5: error: invalid array assignment
   37 | a[1]=b[5];
      | ~~~~^~~~~
a.cc:38:5: error: invalid array assignment
   38 | a[5]=b[6];
      | ~~~~^~~~~
a.cc:42:5: error: invalid array assignment
   42 | a[3]=b[2];
      | ~~~~^~~~~
a.cc:43:5: error: invalid array assignment
   43 | a[2]=b[4];
      | ~~~~^~~~~
a.cc:44:5: error: invalid array assignment
   44 | a[4]=b[5];
      | ~~~~^~~~~
a.cc:45:5: error: invalid array assignment
   45 | a[5]=b[3];
      | ~~~~^~~~~
a.cc: In function 'void right(int, int)':
a.cc:63:10: error: 'c' was not declared in this scope
   63 | if(a[l]==c[l]){continue;}
      |          ^
a.cc: In function 'int main()':
a.cc:73:5: error: 'h' was not declared in this scope
   73 | for(h=0;h<O;h++){
      |     ^
a.cc:74:5: error: 'g' was not declared in this scope
   74 | for(g=1;g<7;g++){
      |     ^
a.cc:81:13: error: 'p' was not declared in this scope
   81 | for(int P=0;p<O-1;P++){
      |             ^