Submission #299002

#TimeUsernameProblemLanguageResultExecution timeMemory
299002EJOI2019AndrewMemory (IOI10_memory)C++17
Compilation error
0 ms0 KiB
#include "grader.h" #include "memory.h" #include<bits/stdc++.h> using namespace std; void play() { char arr[50]; map<char,int>pos; for(int i=1; i<=50; ++i) { char a=faceup(i); if(vis[a]==1) faceup(pos[a]); vis[a]=1; pos[a]=i; } }

Compilation message (stderr)

memory.cpp: In function 'void play()':
memory.cpp:11:8: error: 'vis' was not declared in this scope
   11 |     if(vis[a]==1)
      |        ^~~
memory.cpp:13:5: error: 'vis' was not declared in this scope
   13 |     vis[a]=1;
      |     ^~~
memory.cpp:6:9: warning: unused variable 'arr' [-Wunused-variable]
    6 |    char arr[50];
      |         ^~~