criyle/codenet-compile-errors huggingface dataset:
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_y();
      else c1.roll_x();
    }
    return false;
  }


bool check(){
  for (int i = 0; i < n-1; i++)
    for (int j = i+1; j < n; j++)
      if ( (equal(c[i], c[j])) ) return false;
      else return true;
    }

    //???????????????????????????????????¢??°????????£??????????????????????????????



int main(){
  int n;
  cin >> n;
  Cube c[100]; //???????????´??°?????\?????????????????????????????????

  for (int i = 0; i < n; i++)
    for (int j = 0; j < 6; j++) cin >> c[i].f[j];

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

return 0;
}

Compiler output:
a.cc: In function 'bool check()':
a.cc:36:23: error: 'n' was not declared in this scope
   36 |   for (int i = 0; i < n-1; i++)
      |                       ^
a.cc:38:19: error: 'c' was not declared in this scope
   38 |       if ( (equal(c[i], c[j])) ) return false;
      |                   ^
a.cc:40:5: warning: control reaches end of non-void function [-Wreturn-type]
   40 |     }
      |     ^
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
/*
NumnerOfDice?????????????????????????????§????????????????????????(No)????????????????????°??????(Yes)???????????????CheckConsistentDice_N
?????????????????????????????°???????????§?????????????????????CheckConsistentLabel
?????????????????????????????????????????¢????????????????????????TopFront
*/
class DICE
{
private:
	int Label[6];
public:
	DICE();
	void RotateDirection(std::string);
	void Rotate(int, int, int, int);
	 int GetLabel(int x) { return Label[x]; }
	void TopFront(int, int);
	bool CheckConsistentLabel(DICE AnotherDice);
};
DICE::DICE()
{
	for (int i = 0; i < 6; ++i)
	{
		std::cin >> Label[i];
	}
}
void DICE::RotateDirection(std::string s)
{
	if (s == "E") { Rotate(0, 3, 5, 2); }
	if (s == "N") { Rotate(0, 1, 5, 4); }
	if (s == "S") { Rotate(0, 4, 5, 1); }
	if (s == "W") { Rotate(0, 2, 5, 3); }
}
void DICE::Rotate(int a, int b, int c, int d)
{
	std::swap(Label[a], Label[b]);
	std::swap(Label[b], Label[c]);
	std::swap(Label[c], Label[d]);
}
void DICE::TopFront(int top, int front)
{
	const int size_str = 7;
	std::string str[size_str] = {"N","N","N","W","N","N","N"};
	for (unsigned int i = 0; i < size_str; ++i)
	{
		if (front == Label[1]) { break; }
		RotateDirection(str[i]);
	}
	{
		for (unsigned int i = 0; i < 4; ++i)
			if (top != Label[0]) break;
			RotateDirection("W");
		}
	}
}
bool DICE::CheckConsistentLabel( DICE AnotherDice) {
	int NumberLabel[101] = { 0 };
	for (int i = 0; i < 6; ++i) {
		++NumberLabel[Label[i]];
		--NumberLabel[AnotherDice.GetLabel(i)];
	}
	int i = 0;
	while (i <= 100) {
		if (NumberLabel[i] != 0) {
			return false;
		}
		++i;
	}
	return true;
}
bool CheckConsistentDice_N( std::vector<DICE >&dice) {
	const int LastNumberDice = 5;
	for (unsigned int i = 0; i < dice.size(); ++i) {
		for (unsigned int j = i + 1; j < dice.size(); ++j) {
			if (dice[i].CheckConsistentLabel(dice[j])) {
				dice[i].TopFront(dice[j].GetLabel(0), dice[j].GetLabel(1));
				for (int k = 0; k <= LastNumberDice; ++k)
				{
					if (dice[i].GetLabel(k) != dice[j].GetLabel(k)) {
						break;
					}
					else {
						if (k == LastNumberDice) {							
							return false;
						}
					}
				}
			}
		}
	}
	return true;
}
int main(void)
{
	int NumberOfDice;
	std::cin >> NumberOfDice;
	std::vector<DICE >dice(NumberOfDice);
	if (CheckConsistentDice_N(dice)) {
		std::cout << "Yes" << std::endl;
	}
	else {
		std::cout << "No" << std::endl;
	}	
	//system("pause");
	return 0;
}

Compiler output:
a.cc:57:1: error: expected declaration before '}' token
   57 | }
      | ^
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include <io.h>
#include <fcntl.h>
/*
NumnerOfDice?????????????????????????????§????????????????????????(No)????????????????????°??????(Yes)???????????????CheckConsistentDice_N
?????????????????????????????°???????????§?????????????????????CheckConsistentLabel
?????????????????????????????????????????¢????????????????????????TopFront
*/
class DICE
{
private:
	int Label[6];
public:
	DICE();
	void RotateDirection(std::string);
	void Rotate(int, int, int, int);
	 int GetLabel(int x) { return Label[x]; }
	void TopFront(int, int);
	bool CheckConsistentLabel(DICE AnotherDice);
};
DICE::DICE()
{
	for (int i = 0; i < 6; ++i)
	{
		std::cin >> Label[i];
	}
}
void DICE::RotateDirection(std::string s)
{
	if (s == "E") { Rotate(0, 3, 5, 2); }
	if (s == "N") { Rotate(0, 1, 5, 4); }
	if (s == "S") { Rotate(0, 4, 5, 1); }
	if (s == "W") { Rotate(0, 2, 5, 3); }
}
void DICE::Rotate(int a, int b, int c, int d)
{
	std::swap(Label[a], Label[b]);
	std::swap(Label[b], Label[c]);
	std::swap(Label[c], Label[d]);
}
void DICE::TopFront(int top, int front)
{
	const int size_str = 7;
	std::string str[size_str] = {"N","N","N","W","N","N","N"};
	for (unsigned int i = 0; i < size_str; ++i)
	{
		if (front == Label[1]) { break; }
		RotateDirection(str[i]);
	}
	while (top != Label[0])
	{
		RotateDirection("W");
	}
}
bool DICE::CheckConsistentLabel( DICE AnotherDice) {
	int NumberLabel[101] = { 0 };
	for (int i = 0; i < 6; ++i) {
		++NumberLabel[Label[i]];
		--NumberLabel[AnotherDice.GetLabel(i)];
	}
	int i = 0;
	while (i <= 100) {
		if (NumberLabel[i] != 0) {
			return false;
		}
		++i;
	}
	return true;
}
bool CheckConsistentDice_N( std::vector<DICE >&dice) {
	const int LastNumberDice = 5;
	for (unsigned int i = 0; i < dice.size(); ++i) {
		for (unsigned int j = i + 1; j < dice.size(); ++j) {
			if (dice[i].CheckConsistentLabel(dice[j])) {
				dice[i].TopFront(dice[j].GetLabel(0), dice[j].GetLabel(1));
				for (int k = 0; k <= LastNumberDice; ++k)
				{
					if (dice[i].GetLabel(k) != dice[j].GetLabel(k)) {
						break;
					}
					else {
						if (k == LastNumberDice) {							
							return false;
						}
					}
				}
			}
		}
	}
	return true;
}

int main(void)
{
    _setmode( _fileno( stdout ),  _O_BINARY );
	int NumberOfDice;
	std::cin >> NumberOfDice;
	std::vector<DICE >dice(NumberOfDice);
	if (CheckConsistentDice_N(dice)) {
		std::cout << "Yes" << std::endl;
	}
	else {
		std::cout << "No" << std::endl;
	}	
	//system("pause");
	return 0;
}

Compiler output:
a.cc:5:10: fatal error: io.h: No such file or directory
    5 | #include <io.h>
      |          ^~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include <io.h>
#include <fcntl.h>
/*
NumnerOfDice?????????????????????????????§????????????????????????(No)????????????????????°??????(Yes)???????????????CheckConsistentDice_N
?????????????????????????????°???????????§?????????????????????CheckConsistentLabel
?????????????????????????????????????????¢????????????????????????TopFront
*/
class DICE
{
private:
	int Label[6];
public:
	DICE();
	void RotateDirection(std::string);
	void Rotate(int, int, int, int);
	 int GetLabel(int x) { return Label[x]; }
	void TopFront(int, int);
	bool CheckConsistentLabel(DICE AnotherDice);
};
DICE::DICE()
{
	for (int i = 0; i < 6; ++i)
	{
		std::cin >> Label[i];
	}
}
void DICE::RotateDirection(std::string s)
{
	if (s == "E") { Rotate(0, 3, 5, 2); }
	if (s == "N") { Rotate(0, 1, 5, 4); }
	if (s == "S") { Rotate(0, 4, 5, 1); }
	if (s == "W") { Rotate(0, 2, 5, 3); }
}
void DICE::Rotate(int a, int b, int c, int d)
{
	std::swap(Label[a], Label[b]);
	std::swap(Label[b], Label[c]);
	std::swap(Label[c], Label[d]);
}
void DICE::TopFront(int top, int front)
{
	const int size_str = 7;
	std::string str[size_str] = {"N","N","N","W","N","N","N"};
	for (unsigned int i = 0; i < size_str; ++i)
	{
		if (front == Label[1]) { break; }
		RotateDirection(str[i]);
	}
	while (top != Label[0])
	{
		RotateDirection("W");
	}
}
bool DICE::CheckConsistentLabel( DICE AnotherDice) {
	int NumberLabel[101] = { 0 };
	for (int i = 0; i < 6; ++i) {
		NumberLabel[Label[i]] += 1;
		NumberLabel[AnotherDice.GetLabel(i)] -= 1;
	}
	int i = 0;
	while (i <= 100) {
		if (NumberLabel[i] != 0) {
			return false;
		}
		++i;
	}
	return true;
}
bool CheckConsistentDice_N( std::vector<DICE >&dice) {
	const int LastNumberDice = 5;
	for (unsigned int i = 0; i < dice.size(); ++i) {
		for (unsigned int j = i + 1; j < dice.size(); ++j) {
			if (dice[i].CheckConsistentLabel(dice[j])) {
				dice[i].TopFront(dice[j].GetLabel(0), dice[j].GetLabel(1));
				for (int k = 0; k <= LastNumberDice; ++k)
				{
					if (dice[i].GetLabel(k) != dice[j].GetLabel(k)) {
						break;
					}
					else {
						if (k == LastNumberDice) {							
							return false;
						}
					}
				}
			}
		}
	}
	return true;
}

int main(void)
{
    _setmode( _fileno( stdout ),  _O_BINARY );
	int NumberOfDice;
	std::cin >> NumberOfDice;
	std::vector<DICE >dice(NumberOfDice);
	if (CheckConsistentDice_N(dice)) {
		std::cout << "Yes" << std::endl;
	}
	else {
		std::cout << "No" << std::endl;
	}	
	//system("pause");
	return 0;
}

Compiler output:
a.cc:5:10: fatal error: io.h: No such file or directory
    5 | #include <io.h>
      |          ^~~~~~
compilation terminated.
Language: C++

#include <stdio.h>
int main(){

  int d[100][6],n,i,j,k,blank;

  scanf("%d",&n);
  
  for(i = 0; i < n; i++){

    for(j = 0; j < i6 j++){
      
      scanf("%d",&d[i][j]);
      
    }

  }

  for(i = 0; i < n; i++){

    for(j = 0; j < i; j++){ 
      
      for(k = 0; d[i][1] != d[j][1] && k < 3; k++){
	
	//3S
	blank=d[j][0];
	d[j][0]=d[j][4];
	d[j][4]=d[j][5];
	d[j][5]=d[j][1];
	d[j][1]=blank;
	
      }
      
      if(d[i][1] != d[j][1]){
	
	//1E
	blank=d[j][0];
	d[j][0]=d[j][3];
	d[j][3]=d[j][5];
	d[j][5]=d[j][2];
	d[j][2]=blank;
	
	for(k = 0; d[i][1] != d[j][1] && k < 3; k++){
	  
	  //3S
	  blank=d[j][0];
	  d[j][0]=d[j][4];
	  d[j][4]=d[j][5];
	  d[j][5]=d[j][1];
	  d[j][1]=blank;
	  
	}
	
      }
      
      for(k = 0; d[i][0] != d[j][0]; k++){
	
	//3E
	blank=d[j][0];
	d[j][0]=d[j][3];
	d[j][3]=d[j][5];
	d[j][5]=d[j][2];
	d[j][2]=blank;
	
      }
      
      if(d[i][2] == d[j][2] && d[i][3] == d[j][3] && d[i][4] == d[j][4] && d[i][5] == d[j][5]){
	
	printf("No\n");
	
	return 0;
	
      }

    }

  }

  printf("Yes\n");

  return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: 'i6' was not declared in this scope; did you mean 'i'?
   10 |     for(j = 0; j < i6 j++){
      |                    ^~
      |                    i
a.cc:10:22: error: expected ';' before 'j'
   10 |     for(j = 0; j < i6 j++){
      |                      ^~
      |                      ;
Language: C++

#include<iostream>                                        
using namespace std;                                      
                                                          
class Cube{                                               
public:                                                   
  int f[6];                                               
  Cube(){}                                                
  void roll_z(){ roll(1,2,4,3);} // ?°´????????????90????????¢    
  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;                                           
}   
}                                                         
                                                          
Cube c[100]; int n;                                       
                                                          
bool check(){                                             
  for(int i=0;i<n-1;i++)                                  
    for(int j=i+1;j<n;j++) if(equal(c[i],c[j])) return fa\
lse;                                                      
      return true;                                        
}                                                         
                                                          
int main(){                                               
  cin >> n;                                               
  for(int j=0;j<n;j++){                                   
    for(int i=0;i<6;i++) cin >> c[j].f[i];                
  }                                                       
  if(check() ) cout << "Yes" << endl;                     
  else cout << "No" << endl;                              
                                                          
  return 0;                                               
} 

Compiler output:
a.cc:34:1: error: expected declaration before '}' token
   34 | }
      | ^
Language: C++

#include<iostream>
 
using namespace std;
 
 
class DICE {
    enum {
        Top,
        Front,
        Right,
        Left,
        Rear,
        Bottom
    };
 
    void Roll(const char*Directions) {
        for (int i = 0; Directions[i] != '\0'; i++) {
            Roll(Directions[i]);
        }
    }
 
    void Roll(const char Direction) {
        int tmpTop = Num[Top];
 
        switch (Direction) {
        case'E':
            Num[Top] = Num[Left];
            Num[Left] = Num[Bottom];
            Num[Bottom] = Num[Right];
            Num[Right] = Num[tmpTop];
            break;
        case'N':
            Num[Top] = Num[Front];
            Num[Front] = Num[Bottom];
            Num[Bottom] = Num[Rear];
            Num[Rear] = tmpTop;
            break;
        case'S':
            Num[Top] = Num[Rear];
            Num[Rear] = Num[Bottom];
            Num[Bottom] = Num[Front];
            Num[Front] = tmpTop;
            break;
        case'W':
            Num[Top] = Num[Right];
            Num[Right] = Num[Bottom];
            Num[Bottom] = Num[Left];
            Num[Left] = tmpTop;
            break;
        }
    }
 
    bool SameDiceDirectionFlag(DICE Dice) {
        for (int i = 0; i < 6; i++) {
            if (Num[i] != Dice.Num[i])return false;
        }
        return true;
    }
 
public:
    int Num[6];
 
    bool SameDiceNoneDirectionFlag(DICE Dice) {
        const char Directions[][3] = { "N","N","N","NW","WW","\0" };
 
        for (int i = 0; i < 6; i++) {
            if (Num[Top] == Dice.Num[Top]) {
                for (int j = 0; j < 4; j++) {
                    if (SameDiceDirectionFlag(Dice))return true;
 
                    int tmpFront = Dice.Num[Front];
                    Dice.Num[Front] = Dice.Num[Right];
                    Dice.Num[Right] = Dice.Num[Rear];
                    Dice.Num[Rear] = Dice.Num[Left];
                    Dice.Num[Left] = tmpFront;
                }
            }
 
            Dice.Roll(Directions[i]);
        }
 
        return false;
    }
 
};
 
int main() {
    DICE Dice[101];
    int n;
 
    cin >> n;
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < 6; j++)cin >> Dice[i].Num[j];
    }
 
    for (int i = 1; i < n; i++) {
        if (Dice[0].SameDiceNoneDirectionFlag(Dice[i])) {
            cout << "No" << endl;
            return 0;
        }
    }
 
    cout << "Yes" << endl;
 
    return 0;

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

100
1 2 3 4 5 6
1 2 3 4 6 5
1 2 3 5 4 6
1 2 3 5 6 4
1 2 3 6 4 5
1 2 3 6 5 4
1 2 4 3 5 6
1 2 4 3 6 5
1 2 4 5 3 6
1 2 4 5 6 3
1 2 4 6 3 5
1 2 4 6 5 3
1 2 5 3 4 6
1 2 5 3 6 4
1 2 5 4 3 6
1 2 5 4 6 3
1 2 5 6 3 4
1 2 5 6 4 3
1 2 6 3 4 5
1 2 6 3 5 4
1 2 6 4 3 5
1 2 6 4 5 3
1 2 6 5 3 4
1 2 6 5 4 3
1 3 4 5 6 2
1 3 4 6 5 2
1 3 5 4 6 2
1 3 5 6 4 2
1 3 6 4 5 2
1 3 6 5 4 2
4 6 2 5 1 3
7 2 3 4 6 5
7 2 3 5 4 6
7 2 3 5 6 4
7 2 3 6 4 5
7 2 3 6 5 4
7 2 4 3 5 6
7 2 4 3 6 5
7 2 4 5 3 6
7 2 4 5 6 3
7 2 4 6 3 5
7 2 4 6 5 3
7 2 5 3 4 6
7 2 5 3 6 4
7 2 5 4 3 6
7 2 5 4 6 3
7 2 5 6 3 4
7 2 5 6 4 3
7 2 6 3 4 5
7 2 6 3 5 4
7 2 6 4 3 5
7 2 6 4 5 3
7 2 6 5 3 4
7 2 6 5 4 3
7 3 4 5 6 2
7 3 4 6 5 2
7 3 5 4 6 2
7 3 5 6 4 2
7 3 6 4 5 2
7 3 6 5 4 2
7 2 3 8 5 6
7 2 3 8 6 5
7 2 3 5 8 6
7 2 3 5 6 8
7 2 3 6 8 5
7 2 3 6 5 8
7 2 8 3 5 6
7 2 8 3 6 5
7 2 8 5 3 6
7 2 8 5 6 3
7 2 8 6 3 5
7 2 8 6 5 3
7 2 5 3 8 6
7 2 5 3 6 8
7 2 5 8 3 6
7 2 5 8 6 3
7 2 5 6 3 8
7 2 5 6 8 3
7 2 6 3 8 5
7 2 6 3 5 8
7 2 6 8 3 5
7 2 6 8 5 3
7 2 6 5 3 8
7 2 6 5 8 3
7 3 8 5 6 2
7 3 8 6 5 2
7 3 5 8 6 2
7 3 5 6 8 2
7 3 6 8 5 2
7 3 6 5 8 2
7 9 6 8 3 5
7 9 6 8 5 3
7 9 6 5 3 8
7 9 6 5 8 3
7 3 8 5 6 9
7 3 8 6 5 9
7 3 5 8 6 9
7 3 5 6 8 9
7 3 6 8 5 9
7 3 6 5 8 9

Compiler output:
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 100
      | ^~~
Language: C++

#include <stdio.h>
#include <stdlib.h>
 
int main(int argc, const char * argv[]) {
    int a1=0,a2=0,a3=0,a4=0,dice[101][7],i=0,a=0,z=0,j=0,k=0,b=0;
    scanf("%d",&a);
    for(i=1;i<=a;i++){
        for(j=1;j<=6;j++){
            scanf("%d",&dice[i][j]);
        }
    }
    for(i=1;i<=a;i++){
        for(j=i+1;j<=a;j++){
            for(k=0;k<10000;k++){
                z = rand()%4;
                if(z==0){
                    a1=dice[i][1];
                    a2=dice[i][3];
                    a3=dice[i][4];
                    a4=dice[i][6];
                    dice[i][1]=a3;
                    dice[i][3]=a1;
                    dice[i][4]=a4;
                    dice[i][6]=a2;
                }else if(z==1){
                    a1=dice[i][1];
                    a2=dice[i][2];
                    a3=dice[i][5];
                    a4=dice[i][6];
                    dice[i][1]=a2;
                    dice[i][2]=a4;
                    dice[i][5]=a1;
                    dice[i][6]=a3;
                }else if(z==2){
                    a1=dice[i][1];
                    a2=dice[i][2];
                    a3=dice[i][5];
                    a4=dice[i][6];
                    dice[i][1]=a3;
                    dice[i][2]=a1;
                    dice[i][5]=a4;
                    dice[i][6]=a2;
                }else if(z==3){
                    a1=dice[i][1];
                    a2=dice[i][3];
                    a3=dice[i][4];
                    a4=dice[i][6];
                    dice[i][1]=a2;
                    dice[i][3]=a4;
                    dice[i][4]=a1;
                    dice[i][6]=a3;
                }
                for(b = 1;b <= 6;b++)
                    if(dice[i][b] != dice[j][b])
                        break;
                if(b == 7){
                    printf("No\n");
                    return 0;
                }
//                for(aaa = 1;aaa<=6;aaa++){
//                    if(dice[i][aaa] != dice[j][aaa]){
//                        break;
//                    }else{
//                    }
//                    if(aaa==7){
//                        printf("No\n");
//                        return 0;
//
//                    }
//                }
            }
        }
 
    }
    printf("Yes\n");
    return

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:76:11: error: expected primary-expression at end of input
   76 |     return
      |           ^
a.cc:76:11: error: expected ';' at end of input
   76 |     return
      |           ^
      |           ;
a.cc:76:11: error: expected '}' at end of input
a.cc:4:41: note: to match this '{'
    4 | int main(int argc, const char * argv[]) {
      |                                         ^
Language: C++

#include <iostream>
using namespace std;

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

int CHECK(int d[][6],int q,int r){
 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;
    m
   }
   check
   if(cnt==6)break;
   tmp=d[r][0];
   d[r][0]=d[r][1];
   d[r][1]=d[r][5];
   d[r][5]=d[r][4];
   d[r][4]=tmp;
  }
  if(cnt==6)break;
  y
  for(k=0;k<4;k++){
   check
   if(cnt==6)break;
   m
  }
  if(cnt==6)break;
  y
  y
  for(k=0;k<4;k++){
   check
   if(cnt==6)break;
   m
  }
  if(cnt==6)break;
  a=0;
 }

 if(cnt==6)return 1;
 else return 0;
}

int main(){
 int i,n;

 cin >> n;

 for(i=0;i<n;i++){
  for(int j=0;j<6;j++){
   cin >> d[i][j] ;
  }
 }

 for(i=0;i<n-1;i++){
  if(CHECK(d,i,i+1)==0)break;
 }

 if(i==n-2)cout << "Yes" << endl;
 else cout << "No" << endl;

 
 return 0;
}

Compiler output:
a.cc: In function 'int CHECK(int (*)[6], int, int)':
a.cc:4:15: error: expected initializer before 'cnt'
    4 | #define check cnt=0;for(j=0;j<6;j++)if(d[q][j]==d[r][j])cnt++;
      |               ^~~
a.cc:10:2: note: in expansion of macro 'check'
   10 |  check
      |  ^~~~~
a.cc:15:8: error: 'k' was not declared in this scope
   15 |    for(k=0;k<4;k++){
      |        ^
a.cc:30:7: error: 'k' was not declared in this scope
   30 |   for(k=0;k<4;k++){
      |       ^
a.cc:38:7: error: 'k' was not declared in this scope
   38 |   for(k=0;k<4;k++){
      |       ^
a.cc: In function 'int main()':
a.cc:58:11: error: 'd' was not declared in this scope
   58 |    cin >> d[i][j] ;
      |           ^
a.cc:63:12: error: 'd' was not declared in this scope
   63 |   if(CHECK(d,i,i+1)==0)break;
      |            ^
Language: C++

#include <iostream>
using namespace std;

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

int CHECK(int d[][6],int q,int r){
 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;
    m
   }
   check
   if(cnt==6)break;
   tmp=d[r][0];
   d[r][0]=d[r][1];
   d[r][1]=d[r][5];
   d[r][5]=d[r][4];
   d[r][4]=tmp;
  }
  if(cnt==6)break;
  y
  for(k=0;k<4;k++){
   check
   if(cnt==6)break;
   m
  }
  if(cnt==6)break;
  y
  y
  for(k=0;k<4;k++){
   check
   if(cnt==6)break;
   m
  }
  if(cnt==6)break;
  a=0;
 }

 if(cnt==6)return 1;
 else return 0;
}

int main(){
 int i,n;

 cin >> n;

 int d[n][6];

 for(i=0;i<n;i++){
  for(int j=0;j<6;j++){
   cin >> d[i][j] ;
  }
 }

 for(i=0;i<n-1;i++){
  if(CHECK(d,i,i+1)==0)break;
 }

 if(i==n-2)cout << "Yes" << endl;
 else cout << "No" << endl;

 
 return 0;
}

Compiler output:
a.cc: In function 'int CHECK(int (*)[6], int, int)':
a.cc:4:15: error: expected initializer before 'cnt'
    4 | #define check cnt=0;for(j=0;j<6;j++)if(d[q][j]==d[r][j])cnt++;
      |               ^~~
a.cc:10:2: note: in expansion of macro 'check'
   10 |  check
      |  ^~~~~
a.cc:15:8: error: 'k' was not declared in this scope
   15 |    for(k=0;k<4;k++){
      |        ^
a.cc:30:7: error: 'k' was not declared in this scope
   30 |   for(k=0;k<4;k++){
      |       ^
a.cc:38:7: error: 'k' was not declared in this scope
   38 |   for(k=0;k<4;k++){
      |       ^
Language: C++

#include <iostream>
using namespace std;

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

int CHECK(int d[][6],int q,int r){
 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;
    m
   }
   check
   if(cnt==6)break;
   tmp=d[r][0];
   d[r][0]=d[r][1];
   d[r][1]=d[r][5];
   d[r][5]=d[r][4];
   d[r][4]=tmp;
  }
  if(cnt==6)break;
  y
  for(k=0;k<4;k++){
   check
   if(cnt==6)break;
   m
  }
  if(cnt==6)break;
  y
  y
  for(k=0;k<4;k++){
   check
   if(cnt==6)break;
   m
  }
  if(cnt==6)break;
  a=0;
 }

 if(cnt==6)return 1;
 else return 0;
}

int main(){
 int i,n,j;

 cin >> n;

 int d[n][6];

 for(i=0;i<n;i++){
  for(j=0;j<6;j++){
   cin >> d[i][j] ;
  }
 }

 for(i=0;i<n-1;i++){
  CHECK(d,i,i+1);
 }

 if(i==n-2)cout << "Yes" << endl;
 else cout << "No" << endl;

 
 return 0;
}

Compiler output:
a.cc: In function 'int CHECK(int (*)[6], int, int)':
a.cc:4:15: error: expected initializer before 'cnt'
    4 | #define check cnt=0;for(j=0;j<6;j++)if(d[q][j]==d[r][j])cnt++;
      |               ^~~
a.cc:10:2: note: in expansion of macro 'check'
   10 |  check
      |  ^~~~~
a.cc:15:8: error: 'k' was not declared in this scope
   15 |    for(k=0;k<4;k++){
      |        ^
a.cc:30:7: error: 'k' was not declared in this scope
   30 |   for(k=0;k<4;k++){
      |       ^
a.cc:38:7: error: 'k' was not declared in this scope
   38 |   for(k=0;k<4;k++){
      |       ^
Language: C++

#include <iostream>
using namespace std;

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

int main(){
 int i,n,j;

 cin >> n;

 int d[n][6];

 for(i=0;i<n;i++){
  for(j=0;j<6;j++){
   cin >> d[i][j] ;
  }
 }

 for(i=0;i<n-1;i++){
  if(CHECK(d,i,i+1)==0)break;
 }

 if(i==n-2)cout << "Yes" << endl;
 else cout << "No" << endl;

 
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:6: error: 'CHECK' was not declared in this scope
   22 |   if(CHECK(d,i,i+1)==0)break;
      |      ^~~~~
Language: C++

#include <iostream>
using namespace std;

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

int che(int d[][6],int q,int r){
 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;
    m
   }
   check
   if(cnt==6)break;
   tmp=d[r][0];
   d[r][0]=d[r][1];
   d[r][1]=d[r][5];
   d[r][5]=d[r][4];
   d[r][4]=tmp;
  }
  if(cnt==6)break;
  y
  for(k=0;k<4;k++){
   check
   if(cnt==6)break;
   m
  }
  if(cnt==6)break;
  y
  y
  for(k=0;k<4;k++){
   check
   if(cnt==6)break;
   m
  }
  if(cnt==6)break;
  a=0;
 }

 if(cnt==6)return 1;
 else return 0;
}

int main(){
 int i,n,j;

 cin >> n;

 int d[n][6];

 for(i=0;i<n;i++){
  for(j=0;j<6;j++){
   cin >> d[i][j] ;
  }
 }

 for(i=0;i<n-1;i++){
  if(che(d,i,i+1)==0)break;
 }

 if(i==n-2)cout << "Yes" << endl;
 else cout << "No" << endl;

 
 return 0;
}

Compiler output:
a.cc: In function 'int che(int (*)[6], int, int)':
a.cc:4:15: error: expected initializer before 'cnt'
    4 | #define check cnt=0;for(j=0;j<6;j++)if(d[q][j]==d[r][j])cnt++;
      |               ^~~
a.cc:10:2: note: in expansion of macro 'check'
   10 |  check
      |  ^~~~~
a.cc:15:8: error: 'k' was not declared in this scope
   15 |    for(k=0;k<4;k++){
      |        ^
a.cc:30:7: error: 'k' was not declared in this scope
   30 |   for(k=0;k<4;k++){
      |       ^
a.cc:38:7: error: 'k' was not declared in this scope
   38 |   for(k=0;k<4;k++){
      |       ^
Language: C++

#include <iostream>
using namespace std;

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

int main(){
 int i,n,j,tmp,cnt,a=1,k,c,q,r;

 cin >> n;

 int d[n][6];

 for(i=0;i<n;i++){
  for(j=0;j<6;j++){
   cin >> d[i][j] ;
  }
 }

 for(i=0;i<n-1;i++){
 q=i;
 r=i+1;

 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;
    m
   }
   check
   if(cnt==6)break;
   tmp=d[r][0];
   d[r][0]=d[r][1];
   d[r][1]=d[r][5];
   d[r][5]=d[r][4];
   d[r][4]=tmp;
  }
  if(cnt==6)break;
  y
  for(k=0;k<4;k++){
   check
   if(cnt==6)break;
   m
  }
  if(cnt==6)break;
  y
  y
  for(k=0;k<4;k++){
   check
   if(cnt==6)break;
   m
  }
  if(cnt==6)break;
  a=0;
 }

 if(cnt==6)c=1;
 else c=0;
}
 if(c==0)break;
 }

 if(i==n-2)cout << "Yes" << endl;
 else cout << "No" << endl;

 
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:65:10: error: break statement not within loop or switch
   65 |  if(c==0)break;
      |          ^~~~~
a.cc: At global scope:
a.cc:68:2: error: expected unqualified-id before 'if'
   68 |  if(i==n-2)cout << "Yes" << endl;
      |  ^~
a.cc:69:2: error: expected unqualified-id before 'else'
   69 |  else cout << "No" << endl;
      |  ^~~~
a.cc:72:2: error: expected unqualified-id before 'return'
   72 |  return 0;
      |  ^~~~~~
a.cc:73:1: error: expected declaration before '}' token
   73 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

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

int main(){
 int i,n,j,tmp,cnt,a=1,k,c,q,r;

 cin >> n;

 int d[100][6];

 for(i=0;i<n;i++){
  for(j=0;j<6;j++){
   cin >> d[i][j] ;
  }
 }

 for(i=0;i<n-1;i++){
 q=i;
 r=i+1;

 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;
    m
   }
   check
   if(cnt==6)break;
   tmp=d[r][0];
   d[r][0]=d[r][1];
   d[r][1]=d[r][5];
   d[r][5]=d[r][4];
   d[r][4]=tmp;
  }
  if(cnt==6)break;
  y
  for(k=0;k<4;k++){
   check
   if(cnt==6)break;
   m
  }
  if(cnt==6)break;
  y
  y
  for(k=0;k<4;k++){
   check
   if(cnt==6)break;
   m
  }
  if(cnt==6)break;
  a=0;
 }

 if(cnt==6)c=1;
 else c=0;
}
 if(c==0)break;
 }

 if(i==n-2)cout << "Yes" << endl;
 else cout << "No" << endl;

 
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:65:10: error: break statement not within loop or switch
   65 |  if(c==0)break;
      |          ^~~~~
a.cc: At global scope:
a.cc:68:2: error: expected unqualified-id before 'if'
   68 |  if(i==n-2)cout << "Yes" << endl;
      |  ^~
a.cc:69:2: error: expected unqualified-id before 'else'
   69 |  else cout << "No" << endl;
      |  ^~~~
a.cc:72:2: error: expected unqualified-id before 'return'
   72 |  return 0;
      |  ^~~~~~
a.cc:73:1: error: expected declaration before '}' token
   73 | }
      | ^
Language: C++

#include <iostream>
using namespace std;


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

int main(){
 int tmp,cnt,j,a=1,i,k,n,c=0;

 cin >> n;

 int d[n][6];

 for(i=0;i<n;i++){
  for(j=0;j<6;j++){
   cin >> d[i][j] ;
  }
 }

 for(i=0;i<n-1;i++){
  int q=i;
  int r=i+1;
  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=d[r][0];
   d[r][0]=d[r][1];
   d[r][1]=d[r][5];
   d[r][5]=d[r][4];
   d[r][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
  }
  if(cnt==6)break;
  a=0;
 }
 }

 if(i==n-2)cout << "Yes" << endl;
 else cout << "No" << endl;

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:6: error: expected ';' before '}' token
   33 |     r
      |      ^
      |      ;
   34 |    }
      |    ~  
a.cc:48:5: error: expected ';' before '}' token
   48 |    r
      |     ^
      |     ;
   49 |   }
      |   ~  
a.cc:56:5: error: expected ';' before '}' token
   56 |    r
      |     ^
      |     ;
   57 |   }
      |   ~
Language: C++

#include <iostream>
using namespace std;


int main(){
 int tmp,cnt,j,a=1,i,k,n,c=0;

 cin >> n;

 int d[n][6];

 for(i=0;i<n;i++){
  for(j=0;j<6;j++){
   cin >> d[i][j] ;
  }
 }

 for(i=0;i<n-1;i++){
  int q=i;
  int r=i+1;
  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=d[r][0];
   d[r][0]=d[r][1];
   d[r][1]=d[r][5];
   d[r][5]=d[r][4];
   d[r][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
  }
  if(cnt==6)break;
  a=0;
 }
 }

 if(i==n-2)cout << "Yes" << endl;
 else cout << "No" << endl;

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:3: error: 'check' was not declared in this scope
   21 |   check
      |   ^~~~~
a.cc:27:10: error: expected ';' before 'if'
   27 |     check
      |          ^
      |          ;
   28 |     if(cnt==6)break;
      |     ~~    
a.cc:29:6: error: expected ';' before '}' token
   29 |     r
      |      ^
      |      ;
   30 |    }
      |    ~  
a.cc:31:9: error: expected ';' before 'if'
   31 |    check
      |         ^
      |         ;
   32 |    if(cnt==6)break;
      |    ~~    
a.cc:40:3: error: 'y' was not declared in this scope
   40 |   y
      |   ^
a.cc:41:18: error: expected ';' before ')' token
   41 |   for(k=0;k<4;k++){
      |                  ^
      |                  ;
a.cc:47:4: error: expected ';' before 'y'
   47 |   y
      |    ^
      |    ;
   48 |   y
      |   ~ 
a.cc:49:18: error: expected ';' before ')' token
   49 |   for(k=0;k<4;k++){
      |                  ^
      |                  ;
Language: C++

#include <iostream>
using namespace std;


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

int main(){
 int tmp,cnt,j,a=1,i,k,n,c=0;

 cin >> n;

 int d[n][6];

 for(i=0;i<n;i++){
  for(j=0;j<6;j++){
   cin >> d[i][j] ;
  }
 }

 for(i=0;i<n-1;i++){
  int q=i;
  int r=i+1;
  check
  if(cnt==6)a=0;

 while(a){
  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
  }
  if(cnt==6)break;
  a=0;
 }
 }

 if(i==n-2)cout << "Yes" << endl;
 else cout << "No" << endl;

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:5: error: expected ';' before '}' token
   34 |    r
      |     ^
      |     ;
   35 |   }
      |   ~  
a.cc:42:5: error: expected ';' before '}' token
   42 |    r
      |     ^
      |     ;
   43 |   }
      |   ~
Language: C++

#include <iostream>
using namespace std;


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

int main(){
 int tmp,cnt,j,a=1,i,k,n,c=0;

 cin >> n;

 int d[n][6];

 for(i=0;i<n;i++){
  for(j=0;j<6;j++){
   cin >> d[i][j] ;
  }
 }

 for(i=0;i<n-1;i++){
  int q=i;
  int r=i+1;
  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=d[r][0];
   d[r][0]=d[r][1];
   d[r][1]=d[r][5];
   d[r][5]=d[r][4];
   d[r][4]=tmp;
  }
  a=0;
 }
 }

 if(i==n-2)cout << "Yes" << endl;
 else cout << "No" << endl;

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:6: error: expected ';' before '}' token
   33 |     r
      |      ^
      |      ;
   34 |    }
      |    ~
Language: C++

#include <iostream>
using namespace std;


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

int main(){
 int tmp,cnt,j,a=1,i,k,n,c=0;

 cin >> n;

 int d[n][6];

 for(i=0;i<n;i++){
  for(j=0;j<6;j++){
   cin >> d[i][j] ;
  }
 }

 for(i=0;i<n-1;i++){
  int q=i;
  int r=i+1;
  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;
    m
   }
   check
   if(cnt==6)break;
   tmp=d[r][0];
   d[r][0]=d[r][1];
   d[r][1]=d[r][5];
   d[r][5]=d[r][4];
   d[r][4]=tmp;
  }
  if(cnt==6)break;
  y
  for(k=0;k<4;k++){
   check
   if(cnt==6)break;
   m
  }
  if(cnt==6)break;
  y
  y
  for(k=0;k<4;k++){
   check
   if(cnt==6)break;
   m
  }
  a=0;
 }
???if(cnt==6)c++;
  else{
   cout << "No" << endl ;
   return 0;
  }
 }

 if(c==n-2)cout << "Yes" << endl;
 else cout << "No" << endl;

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:60:1: error: expected primary-expression before '?' token
   60 | ???if(cnt==6)c++;
      | ^
a.cc:60:2: error: expected primary-expression before '?' token
   60 | ???if(cnt==6)c++;
      |  ^
a.cc:60:3: error: expected primary-expression before '?' token
   60 | ???if(cnt==6)c++;
      |   ^
a.cc:60:4: error: expected primary-expression before 'if'
   60 | ???if(cnt==6)c++;
      |    ^~
a.cc:60:4: error: expected ':' before 'if'
   60 | ???if(cnt==6)c++;
      |    ^~
      |    :
a.cc:60:4: error: expected primary-expression before 'if'
   60 | ???if(cnt==6)c++;
      |    ^~
a.cc:60:4: error: expected ':' before 'if'
   60 | ???if(cnt==6)c++;
      |    ^~
      |    :
a.cc:60:4: error: expected primary-expression before 'if'
   60 | ???if(cnt==6)c++;
      |    ^~
a.cc:60:4: error: expected ':' before 'if'
   60 | ???if(cnt==6)c++;
      |    ^~
      |    :
a.cc:60:4: error: expected primary-expression before 'if'
   60 | ???if(cnt==6)c++;
      |    ^~
a.cc:61:3: error: 'else' without a previous 'if'
   61 |   else{
      |   ^~~~
Language: C++

#include <iostream>
using namespace std;


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

int main(){
 int tmp,cnt,j,a=1,i,k,n,c=0;

 cin >> n;

 int d[n][6];

 for(i=0;i<n;i++){
  for(j=0;j<6;j++){
   cin >> d[i][j] ;
  }
 }

 for(i=0;i<n-1;i++){
  int q=i;
  int r=i+1;
  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;
    m
   }
   check
   if(cnt==6)break;
   tmp=d[r][0];
   d[r][0]=d[r][1];
   d[r][1]=d[r][5];
   d[r][5]=d[r][4];
   d[r][4]=tmp;
  }
  if(cnt==6)break;
  y
  for(k=0;k<4;k++){
   check
   if(cnt==6)break;
   m
  }
  if(cnt==6)break;
  y
  y
  for(k=0;k<4;k++){
   check
   if(cnt==6)break;
   m
  }
  a=0;
 }
???if(cnt==6)c++;
 }

 if(c==n-2)cout << "Yes" << endl;
 else cout << "No" << endl;

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:60:1: error: expected primary-expression before '?' token
   60 | ???if(cnt==6)c++;
      | ^
a.cc:60:2: error: expected primary-expression before '?' token
   60 | ???if(cnt==6)c++;
      |  ^
a.cc:60:3: error: expected primary-expression before '?' token
   60 | ???if(cnt==6)c++;
      |   ^
a.cc:60:4: error: expected primary-expression before 'if'
   60 | ???if(cnt==6)c++;
      |    ^~
a.cc:60:4: error: expected ':' before 'if'
   60 | ???if(cnt==6)c++;
      |    ^~
      |    :
a.cc:60:4: error: expected primary-expression before 'if'
   60 | ???if(cnt==6)c++;
      |    ^~
a.cc:60:4: error: expected ':' before 'if'
   60 | ???if(cnt==6)c++;
      |    ^~
      |    :
a.cc:60:4: error: expected primary-expression before 'if'
   60 | ???if(cnt==6)c++;
      |    ^~
a.cc:60:4: error: expected ':' before 'if'
   60 | ???if(cnt==6)c++;
      |    ^~
      |    :
a.cc:60:4: error: expected primary-expression before 'if'
   60 | ???if(cnt==6)c++;
      |    ^~
Language: C++

#include <iostream>
using namespace std;

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

int main(){
 int tmp,cnt,j,a=1,i,k,l,n,c=0;

 cin >> n;

 int d[n][6];

 for(i=0;i<n;i++){
  for(j=0;j<6;j++){
   cin >> d[i][j] ;
  }
 }

 for(i=0;i<n-1;i++){
  for(l=i+1;l<n;l++){
  int q=i;
  int r=l;
  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;
    m
   }
   check
   if(cnt==6)break;
   tmp=d[r][0];
   d[r][0]=d[r][1];
   d[r][1]=d[r][5];
   d[r][5]=d[r][4];
   d[r][4]=tmp;
  }
  if(cnt==6)break;
  y
  for(k=0;k<4;k++){
   check
   if(cnt==6)break;
   m
  }
  if(cnt==6)break;
  y
  y
  for(k=0;k<4;k++){
   check
   if(cnt==6)break;
   m
  }
  a=0;
 }
 }
  if(cnt==6){
   cout << "No" << endl;
   return 0; 
  }
 }

 else cout << "Yes" << endl;

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:67:2: error: 'else' without a previous 'if'
   67 |  else cout << "Yes" << endl;
      |  ^~~~
Language: C++

#include <iostream>
using namespace std;

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

bool same(int d[][6],int q,int r){
 int tmp,cnt,j,a=1,i,k,l,n,c=0;
  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;
    m
   }
   check
   if(cnt==6)break;
   tmp=d[r][0];
   d[r][0]=d[r][1];
   d[r][1]=d[r][5];
   d[r][5]=d[r][4];
   d[r][4]=tmp;
  }
  if(cnt==6)break;
  y
  for(k=0;k<4;k++){
   check
   if(cnt==6)break;
   m
  }
  if(cnt==6)break;
  y
  y
  for(k=0;k<4;k++){
   check
   if(cnt==6)break;
   m
  }
  a=0;
 }

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

}

int main(){
 int tmp,cnt,j,a=1,i,k,l,n,c=0;

 cin >> n;

 int d[n][6];

 for(i=0;i<n;i++){
  for(j=0;j<6;j++){
   cin >> d[i][j] ;
  }
 }

 for(i=0;i<n-1;i++){
  for(l=i+1;l<n;l++){
  int q=i;
  int r=l;
 }
  if(same(d,q,r)){
   cout << "No" << endl;
   return 0; 
  }
 }

 cout << "Yes" << endl;

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:69:13: error: 'q' was not declared in this scope
   69 |   if(same(d,q,r)){
      |             ^
a.cc:69:15: error: 'r' was not declared in this scope
   69 |   if(same(d,q,r)){
      |               ^
Language: C++

#include <iostream>
using namespace std;

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

boolean same(int d[][6],int q,int r){
 int tmp,cnt,j,a=1,i,k,l,n,c=0;
  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;
    m
   }
   check
   if(cnt==6)break;
   tmp=d[r][0];
   d[r][0]=d[r][1];
   d[r][1]=d[r][5];
   d[r][5]=d[r][4];
   d[r][4]=tmp;
  }
  if(cnt==6)break;
  y
  for(k=0;k<4;k++){
   check
   if(cnt==6)break;
   m
  }
  if(cnt==6)break;
  y
  y
  for(k=0;k<4;k++){
   check
   if(cnt==6)break;
   m
  }
  a=0;
 }

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

}

int main(){
 int tmp,cnt,j,a=1,i,k,l,n,c=0;

 cin >> n;

 int d[n][6];

 for(i=0;i<n;i++){
  for(j=0;j<6;j++){
   cin >> d[i][j] ;
  }
 }

 for(i=0;i<n-1;i++){
  for(l=i+1;l<n;l++){
  int q=i;
  int r=l;
 }
  if(same(d,q,r)){
   cout << "No" << endl;
   return 0; 
  }
 }

 cout << "Yes" << endl;

 return 0;
}

Compiler output:
a.cc:8:1: error: 'boolean' does not name a type; did you mean 'bool'?
    8 | boolean same(int d[][6],int q,int r){
      | ^~~~~~~
      | bool
a.cc: In function 'int main()':
a.cc:69:13: error: 'q' was not declared in this scope
   69 |   if(same(d,q,r)){
      |             ^
a.cc:69:15: error: 'r' was not declared in this scope
   69 |   if(same(d,q,r)){
      |               ^
a.cc:69:6: error: 'same' was not declared in this scope
   69 |   if(same(d,q,r)){
      |      ^~~~
Language: C++

#include <iostream>
using namespace std;

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

bool same(int d[][6],int q,int r){
 int tmp,cnt,j,a=1,i,k,l,n,c=0;
  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;
    m
   }
   check
   if(cnt==6)break;
   tmp=d[r][0];
   d[r][0]=d[r][1];
   d[r][1]=d[r][5];
   d[r][5]=d[r][4];
   d[r][4]=tmp;
  }
  if(cnt==6)break;
  y
  for(k=0;k<4;k++){
   check
   if(cnt==6)break;
   m
  }
  if(cnt==6)break;
  y
  y
  for(k=0;k<4;k++){
   check
   if(cnt==6)break;
   m
  }
  a=0;
 }

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

}

int main(){
 int tmp,cnt,j,a=1,i,k,l,n,c=0;

 cin >> n;

 int d[n][6];

 for(i=0;i<n;i++){
  for(j=0;j<6;j++){
   cin >> d[i][j] ;
  }
 }

 for(i=0;i<n-1;i++){
  for(l=i+1;l<n;l++){
  int q=i;
  int r=l;
 }
  if(same(d,q,r)){
   cout << "No" << endl;
   return 0; 
  }
 }

 cout << "Yes" << endl;

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:69:13: error: 'q' was not declared in this scope
   69 |   if(same(d,q,r)){
      |             ^
a.cc:69:15: error: 'r' was not declared in this scope
   69 |   if(same(d,q,r)){
      |               ^
Language: C++

#include <iostream>
using namespace std;

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

bool same(int d[][6],int q,int r){
 int tmp,cnt,j,a=1,i,k,l;
 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;
    m
   }
   check
   if(cnt==6)break;
   tmp=d[r][0];
   d[r][0]=d[r][1];
   d[r][1]=d[r][5];
   d[r][5]=d[r][4];
   d[r][4]=tmp;
  }
  if(cnt==6)break;
  y
  for(k=0;k<4;k++){
   check
   if(cnt==6)break;
   m
  }
  if(cnt==6)break;
  y
  y
  for(k=0;k<4;k++){
   check
   if(cnt==6)break;
   m
  }
  a=0;
 }

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

}


int main(){
 int n,tmp,cnt,j,a=1,i,k,judge;

 cin >> n;

 int d[n][6];

 for(i=0;i<n;i++){
  for(j=0;j<6;j++){
   cin >> d[i][j] ;
  }
 }

 for(i=0;i<n-1;i++){
  for(l=i+1;l<n;l++){
  int q=i;
  int r=l;
  if(same(d,q,r))judge++;
  else judge=0;
  }
 }
 if(judge>0)cout << "No" << endl ;
 else cout << "Yes" << endl ;

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:66:7: error: 'l' was not declared in this scope
   66 |   for(l=i+1;l<n;l++){
      |       ^