제출 #299002

#제출 시각아이디문제언어결과실행 시간메모리
299002EJOI2019AndrewMemory (IOI10_memory)C++17
컴파일 에러
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;
   }
}

컴파일 시 표준 에러 (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];
      |         ^~~