Language: C++

#include<iostream>
#include<string.h>
using namespace std;
  
int D[2][6];
void spin(int n,char c)
{
  if(c=='E'){
    swap(D[n][0],D[n][3]);swap(D[n][3],D[n][5]);swap(D[n][5],D[n][2]);
  }
  else if(c=='W'){
    swap(D[n][0],D[n][2]);swap(D[n][2],D[n][5]);swap(D[n][5],D[n][3]);
  }
  else if(c=='S'){
    swap(D[n][0],D[n][1]);swap(D[n][0],D[n][4]);swap(D[n][4],D[n][5]);
  } 
  else if(c=='N'){
    swap(D[n][0],D[n][1]);swap(D[n][1],D[n][5]);swap(D[n][5],D[n][4]);
  }
}
int main()
{
  char SWS[10]={"SSSSWSSSS"};
  for(int i=0;i<6;i++)cin>>D[0][i];
  for(int i=0;i<6;i++)cin>>D[1][i];
  for(int i=0;i<10;i++){
    if(D[0][1]==D[1][1])break;
    spin(1,SWS[i]);
  }
  if(D[0][1]!=D[1][1] || D[0][4]!=D[1][4])cout<<"No"<<endl;
  else{
    for(int i=0;i<4;i++){
      if(D[0][0]==D[1][0] &&D[0][2]==D[1][2] &&D[0][3]==D[1][3] &&D[0][5]==D[1][5]){
    cout<<"Yes"<<endl;
    break;
      }
      spin(1,'W');
      if(i==3)cout<<"No"<<endl;
    }
  }
  return 0;
}


Compiler output:
a.cc:4:1: error: extended character   is not valid in an identifier
    4 |   
      | ^
a.cc:4:1: error: extended character   is not valid in an identifier
a.cc:8:1: error: extended character   is not valid in an identifier
    8 |   if(c=='E'){
      | ^
a.cc:8:1: error: extended character   is not valid in an identifier
a.cc:9:1: error: extended character   is not valid in an identifier
    9 |     swap(D[n][0],D[n][3]);swap(D[n][3],D[n][5]);swap(D[n][5],D[n][2]);
      | ^
a.cc:9:1: error: extended character   is not valid in an identifier
a.cc:9:1: error: extended character   is not valid in an identifier
a.cc:9:1: error: extended character   is not valid in an identifier
a.cc:10:1: error: extended character   is not valid in an identifier
   10 |   }
      | ^
a.cc:10:1: error: extended character   is not valid in an identifier
a.cc:11:1: error: extended character   is not valid in an identifier
   11 |   else if(c=='W'){
      | ^
a.cc:11:1: error: extended character   is not valid in an identifier
a.cc:12:1: error: extended character   is not valid in an identifier
   12 |     swap(D[n][0],D[n][2]);swap(D[n][2],D[n][5]);swap(D[n][5],D[n][3]);
      | ^
a.cc:12:1: error: extended character   is not valid in an identifier
a.cc:12:1: error: extended character   is not valid in an identifier
a.cc:12:1: error: extended character   is not valid in an identifier
a.cc:13:1: error: extended character   is not valid in an identifier
   13 |   }
      | ^
a.cc:13:1: error: extended character   is not valid in an identifier
a.cc:14:1: error: extended character   is not valid in an identifier
   14 |   else if(c=='S'){
      | ^
a.cc:14:1: error: extended character   is not valid in an identifier
a.cc:15:1: error: extended character   is not valid in an identifier
   15 |     swap(D[n][0],D[n][1]);swap(D[n][0],D[n][4]);swap(D[n][4],D[n][5]);
      | ^
a.cc:15:1: error: extended character   is not valid in an identifier
a.cc:15:1: error: extended character   is not valid in an identifier
a.cc:15:1: error: extended character   is not valid in an identifier
a.cc:16:1: error: extended character   is not valid in an identifier
   16 |   }
      | ^
a.cc:16:1: error: extended character   is not valid in an identifier
a.cc:17:1: error: extended character   is not valid in an identifier
   17 |   else if(c=='N'){
      | ^
a.cc:17:1: error: extended character   is not valid in an identifier
a.cc:18:1: error: extended character   is not valid in an identifier
   18 |     swap(D[n][0],D[n][1]);swap(D[n][1],D[n][5]);swap(D[n][5],D[n][4]);
      | ^
a.cc:18:1: error: extended character   is not valid in an identifier
a.cc:18:1: error: extended character   is not valid in an identifier
a.cc:18:1: error: extended character   is not valid in an identifier
a.cc:19:1: error: extended character   is not valid in an identifier
   19 |   }
      | ^
a.cc:19:1: error: extended character   is not valid in an identifier
a.cc:23:1: error: extended character   is not valid in an identifier
   23 |   char SWS[10]={"SSSSWSSSS"};
      | ^
a.cc:23:1: error: extended character   is not valid in an identifier
a.cc:24:1: error: extended character   is not valid in an identifier
   24 |   for(int i=0;i<6;i++)cin>>D[0][i];
      | ^
a.cc:24:1: error: extended character   is not valid in an identifier
a.cc:25:1: error: extended character   is not valid in an identifier
   25 |   for(int i=0;i<6;i++)cin>>D[1][i];
      | ^
a.cc:25:1: error: extended character   is not valid in an identifier
a.cc:26:1: error: extended character   is not valid in an identifier
   26 |   for(int i=0;i<10;i++){
      | ^
a.cc:26:1: error: extended character   is not valid in an identifier
a.cc:27:1: error: extended character   is not valid in an identifier
   27 |     if(D[0][1]==D[1][1])break;
      | ^
a.cc:27:1: error: extended character   is not valid in an identifier
a.cc:27:1: error: extended character   is not valid in an identifier
a.cc:27:1: error: extended character   is not valid in an identifier
a.cc:28:1: error: extended character   is not valid in an identifier
   28 |     spin(1,SWS[i]);
      | ^
a.cc:28:1: error: extended character   is not valid in an identifier
a.cc:28:1: error: extended character   is not valid in an identifier
a.cc:28:1: error: extended character   is not valid in an identifier
a.cc:29:1: error: extended character   is not valid in an identifier
   29 |   }
      | ^
a.cc:29:1: error: extended character   is not valid in an identifier
a.cc:30:1: error: extended character   is not valid in an identifier
   30 |   if(D[0][1]!=D[1][1] || D[0][4]!=D[1][4])cout<<"No"<<endl;
      | ^
a.cc:30:1: error: extended character   is not valid in an identifier
a.cc:31:1: error: extended character   is not valid in an identifier
   31 |   else{
      | ^
a.cc:31:1: error: extended character   is not valid in an identifier
a.cc:32:1: error: extended character   is not valid in an identifier
   32 |     for(int i=0;i<4;i++){
      | ^
a.cc:32:1: error: extended character   is not valid in an identifier
a.cc:32:1: error: extended character   is not valid in an identifier
a.cc:32:1: error: extended character   is not valid in an identifier
a.cc:33:1: error: extended character   is not valid in an identifier
   33 |       if(D[0][0]==D[1][0] &&D[0][2]==D[1][2] &&D[0][3]==D[1][3] &&D[0][5]==D[1][5]){
      | ^
a.cc:33:1: error: extended character   is not valid in an identifier
a.cc:33:1: error: extended character   is not valid in an identifier
a.cc:33:1: error: extended character   is not valid in an identifier
a.cc:33:1: error: extended character   is not valid in an identifier
a.cc:33:1: error: extended character   is not valid in an identifier
a.cc:34:1: error: extended character   is not valid in an identifier
   34 |     cout<<"Yes"<<endl;
      | ^
a.cc:34:1: error: extended character   is not valid in an identifier
a.cc:34:1: error: extended character   is not valid in an identifier
a.cc:34:1: error: extended character   is not valid in an identifier
a.cc:35:1: error: extended character   is not valid in an identifier
   35 |     break;
      | ^
a.cc:35:1: error: extended character   is not valid in an identifier
a.cc:35:1: error: extended character   is not valid in an identifier
a.cc:35:1: error: extended character   is not valid in an identifier
a.cc:36:1: error: extended character   is not valid in an identifier
   36 |       }
      | ^
a.cc:36:1: error: extended character   is not valid in an identifier
a.cc:36:1: error: extended character   is not valid in an identifier
a.cc:36:1: error: extended character   is not valid in an identifier
a.cc:36:1: error: extended character   is not valid in an identifier
a.cc:36:1: error: extended character   is not valid in an identifier
a.cc:37:1: error: extended character   is not valid in an identifier
   37 |       spin(1,'W');
      | ^
a.cc:37:1: error: extended character   is not valid in an identifier
a.cc:37:1: error: extended character   is not valid in an identifier
a.cc:37:1: error: extended character   is not valid in an identifier
a.cc:37:1: error: extended character   is not valid in an identifier
a.cc:37:1: error: extended character   is not valid in an identifier
a.cc:38:1: error: extended character   is not valid in an identifier
   38 |       if(i==3)cout<<"No"<<endl;
      | ^
a.cc:38:1: error: extended character   is not valid in an identifier
a.cc:38:1: error: extended character   is not valid in an identifier
a.cc:38:1: error: extended character   is not valid in an identifier
a.cc:38:1: error: extended character   is not valid in an identifier
a.cc:38:1: error: extended character   is not valid in an identifier
a.cc:39:1: error: extended character   is not valid in an identifier
   39 |     }
      | ^
a.cc:39:1: error: extended character   is not valid in an identifier
a.cc:39:1: error: extended character   is not valid in an identifier
a.cc:39:1: error: extended character   is not valid in an identifier
a.cc:40:1: error: extended character   is not valid in an identifier
   40 |   }
      | ^
a.cc:40:1: error: extended character   is not valid in an identifier
a.cc:41:1: error: extended character   is not valid in an identifier
   41 |   return 0;
      | ^
a.cc:41:1: error: extended character   is not valid in an identifier
a.cc:4:1: error: '\U000000a0\U000000a0' does not name a type
    4 |   
      | ^~
a.cc: In function 'void spin(int, char)':
a.cc:8:1: error: '\U000000a0\U000000a0if' was not declared in this scope
    8 |   if(c=='E'){
      | ^~~~
a.cc:11:1: error: '\U000000a0\U000000a0else' was not declared in this scope
   11 |   else if(c=='W'){
      | ^~~~~~
a.cc:14:7: error: expected ';' before 'if'
   14 |   else if(c=='S'){
      |       ^~~
      |       ;
a.cc:17:7: error: expected ';' before 'if'
   17 |   else if(c=='N'){
      |       ^~~
      |       ;
a.cc: In function 'int main()':
a.cc:23:1: error: '\U000000a0\U000000a0char' was not declared in this scope
   23 |   char SWS[10]={"SSSSWSSSS"};
      | ^~~~~~
a.cc:24:7: error: expected primary-expression before 'int'
   24 |   for(int i=0;i<6;i++)cin>>D[0][i];
      |       ^~~
a.cc:24:15: error: 'i' was not declared in this scope
   24 |   for(int i=0;i<6;i++)cin>>D[0][i];
      |               ^
a.cc:25:7: error: expected primary-expression before 'int'
   25 |   for(int i=0;i<6;i++)cin>>D[1][i];
      |       ^~~
a.cc:26:7: error: expected primary-expression before 'int'
   26 |   for(int i=0;i<10;i++){
      |       ^~~
a.cc:30:6: error: 'D' was not declared in this scope
   30 |   if(D[0][1]!=D[1][1] || D[0][4]!=D[1][4])cout<<"No"<<endl;
      |      ^
a.cc:30:1: error: '\U000000a0\U000000a0if' was not declared in this scope
   30 |   if(D[0][1]!=D[1][1] || D[0][4]!=D[1][4])cout<<"No"<<endl;
      | ^~~~
a.cc:31:1: error: '\U000000a0\U000000a0else' was not declared in this scope
   31 |   else{
      | ^~~~~~
a.cc:41:1: error: '\U000000a0\U000000a0return' was not declared in this scope
   41 |   return 0;