제출 #1041675

#제출 시각아이디문제언어결과실행 시간메모리
1041675kheiraMemory (IOI10_memory)C++14
컴파일 에러
0 ms0 KiB
#include "grader.h" #include "memory.h" #include <map> using namespace std; void solve(){ map<char,int> Cards; for (int C = 1; C <= 50; ++C){ char letterCard = faceup(C); if (Cards.find(letterCard) != Cards.end()) { int matchedCard = Cards[letterCard]; faceup(letterCard); faceup(C); return; } else { Cards[letterCard] = C; } } }

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

memory.cpp: In function 'void solve()':
memory.cpp:12:17: warning: unused variable 'matchedCard' [-Wunused-variable]
   12 |             int matchedCard = Cards[letterCard];
      |                 ^~~~~~~~~~~
/usr/bin/ld: /tmp/cc2pdTNw.o: in function `main':
grader.cpp:(.text.startup+0x2f): undefined reference to `play()'
collect2: error: ld returned 1 exit status