Language: C

#include <stdio.h>
#include <stdlib.h>
 
typedef struct dice{
  int pip[6];
  int top, front, right;
}Dice;
 
Dice *createDice(int *a);             /* ?????????????????? */
int DiceRight(Dice D, int t, int f);  /* ?????????????????????´??????°??? */
int checkDice(Dice D1, Dice D2);      /* ?????????????????????????????? */
 
 
int main(void){
  Dice *D[100];
  int i, j, k = 0, n, a[6];
 
  scanf("%d", &n);
  for(i = 0; i < n; i++){
    for(j = 0; j < 6; j++){
      scanf("%d", &a[j]);
    }
    D[i] = createDice(a);
  }
  for(i = 0; i < n-1; i++){
    for(j = i+1; j < n; j++){
      if(checkDice(*D[i], *D[j]) != 0){
        k++;
        break;
      }
    }
  }
  if(k == 0){
    printf("Yes\n");
  }else{
    printf("No\n");
  }
  for(i = 0; i < n; i++){
    free(D[i]);
  }
  return 0;
}
 
 
Dice *createDice(int *a){
  Dice *p;
  int i;
 
  p = (Dice *)malloc(sizeof(Dice));
  if(p == NULL){
    printf("??????¢?????¢???????¨??????\n");
    return NULL;
  }
  for(i = 0; i < 6; i++){
    p->pip[i] = a[i];
  }
  p->top = 0;
  p->front = 1;
  p->right = 2;
  return p;
}
 
int DiceRight(Dice D, int t, int f){
  static int check[6][6] = {{-1, 2, 4, 1, 3, -1},
                {3, -1, 0, 5, -1, 2},
                {1, 5, -1, -1, 0, 4},
                {4, 0, -1, -1, 5, 1},
                {2, -1, 5, 0, -1, 3},
                {-1, 3, 1, 4, 2, -1}};
  return D.pip[check[t][f]];
}
 
 
int checkDice(Dice D1, Dice D2){
  int i, j, s = 0, c[6] = {-1,-1,-1,-1,-1,-1};
 
  for(i = 0; i < 3; i++){
    for(j = 0; j < 6; j++){
      if(c[j] == -1 && c[5-j] == -1){
    if(D1.pip[i] == D2.pip[j] && D1.pip[5-i] == D2.pip[5-j]){
      s++;
      c[j] = i;
      c[5-j] = 5-i;
      break;
    }
      }
    }
  }
  if(s != 3){
    return 0;
  }
  if(DiceRight(D2, c[0], c[1]) != D2.pip[c[2]]){
    return 0;
  }
  return 1;
}

Compile Error Logs:
You are not authorized to see the message.

Status
Judge: 20/20	C	CPU: 00.00 sec	Memory: 584 KB	Length: 1851 B	2016-12-16 23:26	2016-12-16 23:26
Results for testcases
Case #	Verdict	CPU Time	Memory	In	Out	Case Name
Case #1:	: Accepted	00.00 sec	580 KB	38 B	3 B	00_sample_00.in
Case #2:	: Accepted	00.00 sec	576 KB	38 B	4 B	00_sample_01.in
Case #3:	: Accepted	00.00 sec	580 KB	50 B	4 B	01_yes_00.in
Case #4:	: Accepted	00.00 sec	580 KB	62 B	4 B	01_yes_01.in
Case #5:	: Accepted	00.00 sec	580 KB	38 B	4 B	01_yes_02.in
Case #6:	: Accepted	00.00 sec	580 KB	26 B	4 B	01_yes_03.in
Case #7:	: Accepted	00.00 sec	580 KB	74 B	3 B	02_no_00.in
Case #8:	: Accepted	00.00 sec	580 KB	26 B	3 B	02_no_01.in
Case #9:	: Accepted	00.00 sec	580 KB	26 B	4 B	03_corner_00.in
Case #10:	: Accepted	00.00 sec	580 KB	26 B	4 B	03_corner_01.in
Case #11:	: Accepted	00.00 sec	580 KB	26 B	4 B	03_corner_02.in
Case #12:	: Accepted	00.00 sec	580 KB	26 B	4 B	03_corner_03.in
Case #13:	: Accepted	00.00 sec	580 KB	26 B	4 B	03_corner_04.in
Case #14:	: Accepted	00.00 sec	580 KB	26 B	4 B	03_corner_05.in
Case #15:	: Accepted	00.00 sec	580 KB	363 B	4 B	04_all_diff_00.in
Case #16:	: Accepted	00.00 sec	584 KB	1204 B	4 B	04_all_diff_01.in
Case #17:	: Accepted	00.00 sec	584 KB	1204 B	3 B	05_almost_00.in
Case #18:	: Accepted	00.00 sec	580 KB	1204 B	3 B	05_almost_01.in
Case #19:	: Accepted	00.00 sec	584 KB	1204 B	3 B	05_almost_02.in
Case #20:	: Accepted	00.00 sec	584 KB	1204 B	3 B	05_almost_03.in

< prev |	1	/	20	| next >	 		 : Accepted        00.00 sec        580 KB
 
Judge Input #1 ( in1.txt | 38 B)		Judge Output #1 ( out1.txt | 3 B)
3
1 2 3 4 5 6
6 2 4 3 5 1
6 5 4 3 2 1
No
Comments
 
 Under Construction.
 
Categories
 
 
Free Tags
 
 

Compiler output:
main.c:98:1: error: unknown type name 'Compile'
   98 | Compile Error Logs:
      | ^~~~~~~
main.c:98:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Logs'
   98 | Compile Error Logs:
      |               ^~~~
main.c:104:6: error: stray '#' in program
  104 | Case #  Verdict CPU Time        Memory  In      Out     Case Name
      |      ^
main.c:105:6: error: stray '#' in program
  105 | Case #1:        : Accepted      00.00 sec       580 KB  38 B    3 B     00_sample_00.in
      |      ^
main.c:105:73: error: invalid suffix "_sample_00.in" on integer constant
  105 | Case #1:        : Accepted      00.00 sec       580 KB  38 B    3 B     00_sample_00.in
      |                                                                         ^~~~~~~~~~~~~~~
main.c:106:6: error: stray '#' in program
  106 | Case #2:        : Accepted      00.00 sec       576 KB  38 B    4 B     00_sample_01.in
      |      ^
main.c:106:73: error: invalid suffix "_sample_01.in" on integer constant
  106 | Case #2:        : Accepted      00.00 sec       576 KB  38 B    4 B     00_sample_01.in
      |                                                                         ^~~~~~~~~~~~~~~
main.c:107:6: error: stray '#' in program
  107 | Case #3:        : Accepted      00.00 sec       580 KB  50 B    4 B     01_yes_00.in
      |      ^
main.c:107:73: error: invalid suffix "_yes_00.in" on integer constant
  107 | Case #3:        : Accepted      00.00 sec       580 KB  50 B    4 B     01_yes_00.in
      |                                                                         ^~~~~~~~~~~~
main.c:108:6: error: stray '#' in program
  108 | Case #4:        : Accepted      00.00 sec       580 KB  62 B    4 B     01_yes_01.in
      |      ^
main.c:108:73: error: invalid suffix "_yes_01.in" on integer constant
  108 | Case #4:        : Accepted      00.00 sec       580 KB  62 B    4 B     01_yes_01.in
      |                                                                         ^~~~~~~~~~~~
main.c:109:6: error: stray '#' in program
  109 | Case #5:        : Accepted      00.00 sec       580 KB  38 B    4 B     01_yes_02.in
      |      ^
main.c:109:73: error: invalid suffix "_yes_02.in" on integer constant
  109 | Case #5:        : Accepted      00.00 sec       580 KB  38 B    4 B     01_yes_02.in
      |                                                                         ^~~~~~~~~~~~
main.c:110:6: error: stray '#' in program
  110 | Case #6:        : Accepted      00.00 sec       580 KB  26 B    4 B     01_yes_03.in
      |      ^
main.c:110:73: error: invalid suffix "_yes_03.in" on integer constant
  110 | Case #6:        : Accepted      00.00 sec       580 KB  26 B    4 B     01_yes_03.in
      |                                                                         ^~~~~~~~~~~~
main.c:111:6: error: stray '#' in program
  111 | Case #7:        : Accepted      00.00 sec       580 KB  74 B    3 B     02_no_00.in
      |      ^
main.c:111:73: error: invalid suffix "_no_00.in" on integer constant
  111 | Case #7:        : Accepted      00.00 sec       580 KB  74 B    3 B     02_no_00.in
      |                                                                         ^~~~~~~~~~~
main.c:112:6: error: stray '#' in program
  112 | Case #8:        : Accepted      00.00 sec       580 KB  26 B    3 B     02_no_01.in
      |      ^
main.c:112:73: error: invalid suffix "_no_01.in" on integer constant
  112 | Case #8:        : Accepted      00.00 sec       580 KB  26 B    3 B     02_no_01.in
      |                                                                         ^~~~~~~~~~~
main.c:113:6: error: stray '#' in program
  113 | Case #9:        : Accepted      00.00 sec       580 KB  26 B    4 B     03_corner_00.in
      |      ^
main.c:113:73: error: invalid suffix "_corner_00.in" on integer constant
  113 | Case #9:        : Accepted      00.00 sec       580 KB  26 B    4 B     03_corner_00.in
      |                                                                         ^~~~~~~~~~~~~~~
main.c:114:6: error: stray '#' in program
  114 | Case #10:       : Accepted      00.00 sec       580 KB  26 B    4 B     03_corner_01.in
      |      ^
main.c:114:73: error: invalid suffix "_corner_01.in" on integer constant
  114 | Case #10:       : Accepted      00.00 sec       580 KB  26 B    4 B     03_corner_01.in
      |                                                                         ^~~~~~~~~~~~~~~
main.c:115:6: error: stray '#' in program
  115 | Case #11:       : Accepted      00.00 sec       580 KB  26 B    4 B     03_corner_02.in
      |      ^
main.c:115:73: error: invalid suffix "_corner_02.in" on integer constant
  115 | Case #11:       : Accepted      00.00 sec       580 KB  26 B    4 B     03_corner_02.in
      |                                                                         ^~~~~~~~~~~~~~~
main.c:116:6: error: stray '#' in program
  116 | Case #12:       : Accepted      00.00 sec       580 KB  26 B    4 B     03_corner_03.in
      |      ^
main.c:116:73: error: invalid suffix "_corner_03.in" on integer constant
  116 | Case #12:       : Accepted      00.00 sec       580 KB  26 B    4 B     03_corner_03.in
      |                                                                         ^~~~~~~~~~~~~~~
main.c:117:6: error: stray '#' in program
  117 | Case #13:       : Accepted      00.00 sec       580 KB  26 B    4 B     03_corner_04.in
      |      ^
main.c:117:73: error: invalid suffix "_corner_04.in" on integer constant
  117 | Case #13:       : Accepted      00.00 sec       580 KB  26 B    4 B     03_corner_04.in
      |                                                                         ^~~~~~~~~~~~~~~
main.c:118:6: error: stray '#' in program
  118 | Case #14:       : Accepted      00.00 sec       580 KB  26 B    4 B     03_corner_05.in
      |      ^
main.c:118:73: error: invalid suffix "_corner_05.in" on integer constant
  118 | Case #14:       : Accepted      00.00 sec       580 KB  26 B    4 B     03_corner_05.in
      |                                                                         ^~~~~~~~~~~~~~~
main.c:119:6: error: stray '#' in program
  119 | Case #15:       : Accepted      00.00 sec       580 KB  363 B   4 B     04_all_diff_00.in
      |      ^
main.c:119:73: error: invalid suffix "_all_diff_00.in" on integer constant
  119 | Case #15:       : Accepted      00.00 sec       580 KB  363 B   4 B     04_all_diff_00.in
      |                                                                         ^~~~~~~~~~~~~~~~~
main.c:120:6: error: stray '#' in program
  120 | Case #16:       : Accepted      00.00 sec       584 KB  1204 B  4 B     04_all_diff_01.in
      |      ^
main.c:120:73: error: invalid suffix "_all_diff_01.in" on integer constant
  120 | Case #16:       : Accepted      00.00 sec       584 KB  1204 B  4 B     04_all_diff_01.in
      |                                                                         ^~~~~~~~~~~~~~~~~
main.c:121:6: error: stray '#' in program
  121 | Case #17:       : Accepted      00.00 sec       584 KB  1204 B  3 B     05_almost_00.in
      |      ^
main.c:121:73: error: invalid suffix "_almost_00.in" on integer constant
  121 | Case #17:       : Accepted      00.00 sec       584 KB  1204 B  3 B     05_almost_00.in
      |                                                                         ^~~~~~~~~~~~~~~
main.c:122:6: error: stray '#' in program
  122 | Case #18:       : Accepted      00.00 sec       580 KB  1204 B  3 B     05_almost_01.in
      |      ^
main.c:122:73: error: invalid suffix "_almost_01.in" on integer constant
  122 | Case #18:       : Accepted      00.00 sec       580 KB  1204 B  3 B     05_almost_01.in
      |                                                                         ^~~~~~~~~~~~~~~
main.c:123:6: error: stray '#' in program
  123 | Case #19:       : Accepted      00.00 sec       584 KB  1204 B  3 B     05_almost_02.in
      |      ^
main.c:123:73: error: invalid suffix "_almost_02.in" on integer constant
  123 | Case #19:       : Accepted      00.00 sec       584 KB  1204 B  3 B     05_almost_02.in
      |                                                                         ^~~~~~~~~~~~~~~
main.c:124:6: error: stray '#' in program
  124 | Case #20:       : Accepted      00.00 sec       584 KB  1204 B  3 B     05_almost_03.in
      |      ^
main.c:124:73: error: invalid suffix "_almost_03.in" on integer constant
  124 | Case #20:       : Accepted      00.00 sec       584 KB  1204 B  3 B     05_almost_03.in
      |                                                                         ^~~~~~~~~~~~~~~
main.c:128:13: error: stray '#' in program
  128 | Judge Input #1 ( in1.txt | 38 B)                Judge Output #1 ( out1.txt | 3 B)
      |             ^
main.c:128:62: error: stray '#' in program
  128 | Judge Input #1 ( in1.txt | 38 B)                Judge Output #1 ( out1.txt | 3 B)
      |                                                              ^