Language: C++

#include<iostream>
using namespace std;
 
struct Dice {
    int top;
    int north;
    int east;
    int south;
    int west;
    int bottom;
};
 
void rotn(Dice& d);
void rote(Dice& d);
//void rots(Dice& d);
//void rotw(Dice& d);
void rotc(Dice& d);
bool judge(Dice& d1, Dice& d2);
bool isdifferent(Dice& d1, Dice& d2);
 
int tmp;
 
int main() {
    int i, j, n;
    Dice d[100];
    cin >> n;
    for (i = 0; i < n; i++) {
        cin >> d[i].top >> d[i].south >> d[i].east >> d[i].west >> d[i].north >> d[i].bottom;
    }
    for (i = 0; i < n - 1; i++) {
        for (j = i + 1; j < n; j++) {
            if (isdifferent(d[i], d[j]) == false) {
                cout << "No\n";
                return 0;
            }
        }
    }
    cout << "Yes\n";
    return 0;
}
 
 
 
void rotn(Dice& d) {
    tmp = d.top;
    d.top = d.south;
    d.south = d.bottom;
    d.bottom = d.north;
    d.north = tmp;
}
 
void rote(Dice& d) {
    tmp = d.top;
    d.top = d.west;
    d.west = d.bottom;
    d.bottom = d.east;
    d.east = tmp;
}
 
/*
void rots(Dice& d) {
    tmp = d.top;
    d.top = d.north;
    d.north = d.bottom;
    d.bottom = d.south;
    d.south = tmp;
}
 
void rotw(Dice& d) {
    tmp = d.top;
    d.top = d.east;
    d.east = d.bottom;
    d.bottom = d.west;
    d.west = tmp;
}
 
*/
 
void rotc(Dice& d) {
    tmp = d.north;
    d.north = d.west;
    d.west = d.south;
    d.south = d.east;
    d.east = tmp;
}
 
bool judge(Dice& d1, Dice& d2) {
    if (d1.top == d2.top && d1.north == d2.north && d1.east == d2.east
        && d1.south == d2.south && d1.west == d2.west && d1.bottom == d2.bottom)return true;
    else return false;
}
 
bool isdifferent(Dice &d1, Dice &d2) {
    int i, j;
    for (i = 0; i < 4; i++) {
        for (j = 0; j < 4; j++) {
            if (judge(d1, d2) == true) {
                return false;
            } else {
                rotc(d2);
            }
        }
        rotn(d2);
    }
    rote(d2);
    for (j = 0; j < 4; j++) {
        if (judge(d1, d2) == true) {
            return false;
        } else {
            rotc(d2);
        }
    }
    rote(d2); rote(d2);
    for (j = 0; j < 4; j++) {
        if (judge(d1, d2) == true) {
            return false;
        } else {
            rotc(d2);
        }
    }
    return true;
}


Compiler output:
a.cc:3:1: error: extended character   is not valid in an identifier
    3 |  
      | ^
a.cc:5:1: error: extended character   is not valid in an identifier
    5 |     int top;
      | ^
a.cc:5:1: error: extended character   is not valid in an identifier
a.cc:5:1: error: extended character   is not valid in an identifier
a.cc:5:1: error: extended character   is not valid in an identifier
a.cc:6:1: error: extended character   is not valid in an identifier
    6 |     int north;
      | ^
a.cc:6:1: error: extended character   is not valid in an identifier
a.cc:6:1: error: extended character   is not valid in an identifier
a.cc:6:1: error: extended character   is not valid in an identifier
a.cc:7:1: error: extended character   is not valid in an identifier
    7 |     int east;
      | ^
a.cc:7:1: error: extended character   is not valid in an identifier
a.cc:7:1: error: extended character   is not valid in an identifier
a.cc:7:1: error: extended character   is not valid in an identifier
a.cc:8:1: error: extended character   is not valid in an identifier
    8 |     int south;
      | ^
a.cc:8:1: error: extended character   is not valid in an identifier
a.cc:8:1: error: extended character   is not valid in an identifier
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 |     int west;
      | ^
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 |     int bottom;
      | ^
a.cc:10:1: error: extended character   is not valid in an identifier
a.cc:10:1: error: extended character   is not valid in an identifier
a.cc:10:1: error: extended character   is not valid in an identifier
a.cc:12:1: error: extended character   is not valid in an identifier
   12 |  
      | ^
a.cc:20:1: error: extended character   is not valid in an identifier
   20 |  
      | ^
a.cc:22:1: error: extended character   is not valid in an identifier
   22 |  
      | ^
a.cc:24:1: error: extended character   is not valid in an identifier
   24 |     int i, j, n;
      | ^
a.cc:24:1: error: extended character   is not valid in an identifier
a.cc:24:1: error: extended character   is not valid in an identifier
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 |     Dice d[100];
      | ^
a.cc:25:1: error: extended character   is not valid in an identifier
a.cc:25:1: error: extended character   is not valid in an identifier
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 |     cin >> n;
      | ^
a.cc:26:1: error: extended character   is not valid in an identifier
a.cc:26:1: error: extended character   is not valid in an identifier
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 |     for (i = 0; i < n; i++) {
      | ^
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 |         cin >> d[i].top >> d[i].south >> d[i].east >> d[i].west >> d[i].north >> d[i].bottom;
      | ^
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: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: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:29:1: error: extended character   is not valid in an identifier
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 |     for (i = 0; i < n - 1; i++) {
      | ^
a.cc:30:1: error: extended character   is not valid in an identifier
a.cc:30:1: error: extended character   is not valid in an identifier
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 |         for (j = i + 1; j < n; j++) {
      | ^
a.cc:31:1: error: extended character   is not valid in an identifier
a.cc:31:1: error: extended character   is not valid in an identifier
a.cc:31:1: error: extended character   is not valid in an identifier
a.cc:31:1: error: extended character   is not valid in an identifier
a.cc:31:1: error: extended character   is not valid in an identifier
a.cc:31:1: error: extended character   is not valid in an identifier
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 |             if (isdifferent(d[i], d[j]) == false) {
      | ^
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: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: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: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 |                 cout << "No\n";
      | ^
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: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: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 |                 return 0;
      | ^
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: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: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: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: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 |             }
      | ^
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: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: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: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:36:1: error: extended character   is not valid in an identifier
a.cc:36:1: error: extended character   is not valid in an identifi