Submission #477106

#TimeUsernameProblemLanguageResultExecution timeMemory
477106glomeMemory (IOI10_memory)C++17
Compilation error
0 ms0 KiB
#include "grader.h" #include "memory.h" #include<bits/stdc++.h> using namespace std; void play() { map<char, vector<int>> m; int last = ear ; vector<char> chars(51); for (int i = 1; i<=50; i++) { bool ok = 0; for (int k = i + 1; k<=50; k++) { if(chars[k] == chars[i]) { ok = 1; char a = faceup(k), b = faceup(i); break; } } if(ok) { continue; } for (int j = last+1; j<=50; j++) { char a = faceup(i); char b = faceup(j); chars[i] = a; chars[j] = b; if(a == b) { last = j; break; } } } return; }

Compilation message (stderr)

memory.cpp: In function 'void play()':
memory.cpp:7:14: error: 'ear' was not declared in this scope
    7 |   int last = ear
      |              ^~~
memory.cpp:15:14: warning: unused variable 'a' [-Wunused-variable]
   15 |         char a = faceup(k), b = faceup(i);
      |              ^
memory.cpp:15:29: warning: unused variable 'b' [-Wunused-variable]
   15 |         char a = faceup(k), b = faceup(i);
      |                             ^