Submission #299002

# Submission time Handle Problem Language Result Execution time Memory
299002 2020-09-14T12:00:27 Z EJOI2019Andrew Memory (IOI10_memory) C++17
Compilation error
0 ms 0 KB
#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

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];
      |         ^~~