제출 #343409

#제출 시각아이디문제언어결과실행 시간메모리
343409BlancaHMMemory (IOI10_memory)C++14
컴파일 에러
0 ms0 KiB
#include "memory.h" #include "grader.h" void play() { int pos[25]; // pos[i] contiene una de las posiciones de esa letra int sumPos[25] = {0}; // sumPos[i] contiene la suma de las 2 posiciones de esa letra int curChar; for (int i = 1; i <= 50; i++) { // levantamos todas las cartas y guardamos el resultado curChar = faceUp(i) - 'A'; pos[curChar] = i; sumPos[curChar] += i; } for (int i = 0; i < 25; i++) { // levantamos las parejas de cartas que contienen la misma letra faceUp(pos[i]); faceUp(sumPos[i] - pos[i]); } }

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

memory.cpp: In function 'void play()':
memory.cpp:10:13: error: 'faceUp' was not declared in this scope; did you mean 'faceup'?
   10 |   curChar = faceUp(i) - 'A';
      |             ^~~~~~
      |             faceup
memory.cpp:16:3: error: 'faceUp' was not declared in this scope; did you mean 'faceup'?
   16 |   faceUp(pos[i]);
      |   ^~~~~~
      |   faceup