제출 #372568

#제출 시각아이디문제언어결과실행 시간메모리
372568Christopher_RdzMemory (IOI10_memory)C++14
100 / 100
3 ms380 KiB
#include "grader.h"
#include "memory.h"

char cubeta[52];
int aux[52];

void play() {
   char a, b;
  int pos = 1;
   for (int i = 1; i <= 50; i++){
     a = faceup(i);
     cubeta[i] = a;
   }
  for (int i = 1; i <= 50; i++){
    for (int j = 1; j <= 50; j++){
      if (i != j){
        if (aux[i] == 0 and aux[j] == 0){
          if (cubeta[i] == cubeta[j]){
            faceup(i);
            faceup(j);
            aux[i] = 1;
            aux[j] = 1;
          }
        }
      }
    }
  }
}

컴파일 시 표준 에러 (stderr) 메시지

memory.cpp: In function 'void play()':
memory.cpp:8:12: warning: unused variable 'b' [-Wunused-variable]
    8 |    char a, b;
      |            ^
memory.cpp:9:7: warning: unused variable 'pos' [-Wunused-variable]
    9 |   int pos = 1;
      |       ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...