Submission #468441

#TimeUsernameProblemLanguageResultExecution timeMemory
468441a_aguiloMemory (IOI10_memory)C++14
Compilation error
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; } } }

Compilation message (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){
      |                         ^~