제출 #869508

#제출 시각아이디문제언어결과실행 시간메모리
869508sqrteipiMemory (IOI10_memory)C++14
컴파일 에러
0 ms0 KiB
// TODO: global variables can be declared here int cards[25][2], a, b; int i; void play() { // TODO: implementation for(i=0; i<25; i++){ cards[i][0] = 0; cards[i][1] = 0; } for(i=1; i<=50; i+=2){ a = faceup(i)-65; b = faceup(i+1)-65; if (cards[a][0]==0){ cards[a][0] = i; } else{ cards[a][1] = i; } if (cards[b][0]==0){ cards[b][0] = i+1; } else{ cards[b][1] = i+1; } } for(i=0; i<25; i++){ faceup(cards[i][0]); faceup(cards[i][1]); } }

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

memory.cpp: In function 'void play()':
memory.cpp:13:9: error: 'faceup' was not declared in this scope
   13 |     a = faceup(i)-65;
      |         ^~~~~~
memory.cpp:31:5: error: 'faceup' was not declared in this scope
   31 |     faceup(cards[i][0]);
      |     ^~~~~~