제출 #468441

#제출 시각아이디문제언어결과실행 시간메모리
468441a_aguiloMemory (IOI10_memory)C++14
컴파일 에러
0 ms0 KiB
#include "grader.h" #include "memory.h" #include <bits/stdc++.h> using namespace std; void play() { int candies = 0; map <char, int> M; set <int> asked; set <char> received; while (candies < 25){ int i = 1; while (i <= 25){ char c = faceup (i); if (received.find(c) != received.end()){ faceup (M[c]); candies ++; } else{ received.insert(c); M[c] = i; ++i; char new = faceup (i); if (new == c){ candies ++; } else { i--; } } ++i; } } }

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

memory.cpp: In function 'void play()':
memory.cpp:25:22: error: expected unqualified-id before 'new'
   25 |                 char new = faceup (i);
      |                      ^~~
memory.cpp:26:25: error: expected type-specifier before '==' token
   26 |                 if (new == c){
      |                         ^~