제출 #372548

#제출 시각아이디문제언어결과실행 시간메모리
372548Christopher_RdzMemory (IOI10_memory)C++14
컴파일 에러
0 ms0 KiB
#include "grader.h" #include "memory.h" int cubeta[102]; inr cubeta2[102]; void play() { char a, b; for (int i = 1; i <= 50; i+= 2){ a = faceup(i); if (cubeta[int(a)] == 0){ cubeta[int(a)] = i; }else{ cubeta2[int(a)] = i; } b = faceup(i+1); if (cubeta[int(b)] == 0){ cubeta[int(b)] = i; }else{ cubeta2[int(b)] = i; } } for (int i = 65; i <= 89; i++){ a = faceup(cubeta[i]); b = faceup(cubeta2[i]); } }

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

memory.cpp:5:1: error: 'inr' does not name a type; did you mean 'int'?
    5 | inr cubeta2[102];
      | ^~~
      | int
memory.cpp: In function 'void play()':
memory.cpp:14:8: error: 'cubeta2' was not declared in this scope; did you mean 'cubeta'?
   14 |        cubeta2[int(a)] = i;
      |        ^~~~~~~
      |        cubeta
memory.cpp:20:8: error: 'cubeta2' was not declared in this scope; did you mean 'cubeta'?
   20 |        cubeta2[int(b)] = i;
      |        ^~~~~~~
      |        cubeta
memory.cpp:25:16: error: 'cubeta2' was not declared in this scope; did you mean 'cubeta'?
   25 |     b = faceup(cubeta2[i]);
      |                ^~~~~~~
      |                cubeta