Language: C

#include <stdio.h>
#include <string.h>

int *x;

int main(void)
{
    int n,i,j,top,dice[110][7];
    
    scanf("%d",&n);
    for(j=0;j<n;j++){
        for(i=0;i<6;i++){
            scanf("%d",&dice[j][i]);
        }
    }
    
    for(*x=0;*x<n;*x++){
        dicen(dice[*x][0]);
        if(memcmp(dice,dice[*x],sizeof(dice))==0){
            printf("No");
            return 0;
        }
    }
        printf("Yes\n");

    return 0;
}

void dicen(int dice[*x][0]){
    for(i=0;i<8;i++){
        if(memcmp(dice,dice2,sizeof(dice))==0)break;
        if(dice[0]==dice2[0]){
            for(j=0;j<4;j++){
                top=dice2[*x][1];
                dice2[*x][1]=dice2[*x][2];
                dice2[*x][2]=dice2[*x][4];
                dice2[*x][4]=dice2[*x][3];
                dice2[*x][3]=top;
                if(memcmp(dice,dice2,sizeof(dice))==0) goto OUT;
            }
        }
        if(i<4){
                top=dice2[*x][0];
                dice2[*x][0]=dice2[*x][1];
                dice2[*x][1]=dice2[*x][5];
                dice2[*x][5]=dice2[*x][4];
                dice2[*x][4]=top;
        }else{
                top=dice2[*x][0];
                dice2[*x][0]=dice2[*x][2];
                dice2[*x][2]=dice2[*x][5];
                dice2[*x][5]=dice2[*x][3];
                dice2[*x][3]=top;
        }
    }
    OUT:
}


Compiler output:
main.c: In function 'main':
main.c:18:9: error: implicit declaration of function 'dicen' [-Wimplicit-function-declaration]
   18 |         dicen(dice[*x][0]);
      |         ^~~~~
main.c: At top level:
main.c:29:6: warning: conflicting types for 'dicen'; have 'void(int (*)[0])'
   29 | void dicen(int dice[*x][0]){
      |      ^~~~~
main.c:18:9: note: previous implicit declaration of 'dicen' with type 'void(int (*)[0])'
   18 |         dicen(dice[*x][0]);
      |         ^~~~~
main.c: In function 'dicen':
main.c:30:9: error: 'i' undeclared (first use in this function)
   30 |     for(i=0;i<8;i++){
      |         ^
main.c:30:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:31:24: error: 'dice2' undeclared (first use in this function); did you mean 'dice'?
   31 |         if(memcmp(dice,dice2,sizeof(dice))==0)break;
      |                        ^~~~~
      |                        dice
main.c:31:36: warning: 'sizeof' on array function parameter 'dice' will return size of 'int (*)[0]' [-Wsizeof-array-argument]
   31 |         if(memcmp(dice,dice2,sizeof(dice))==0)break;
      |                                    ^
main.c:29:16: note: declared here
   29 | void dicen(int dice[*x][0]){
      |            ~~~~^~~~~~~~~~~
main.c:33:17: error: 'j' undeclared (first use in this function)
   33 |             for(j=0;j<4;j++){
      |                 ^
main.c:34:17: error: 'top' undeclared (first use in this function)
   34 |                 top=dice2[*x][1];
      |                 ^~~
main.c:39:44: warning: 'sizeof' on array function parameter 'dice' will return size of 'int (*)[0]' [-Wsizeof-array-argument]
   39 |                 if(memcmp(dice,dice2,sizeof(dice))==0) goto OUT;
      |                                            ^
main.c:29:16: note: declared here
   29 | void dicen(int dice[*x][0]){
      |            ~~~~^~~~~~~~~~~