제출 #1176144

#제출 시각아이디문제언어결과실행 시간메모리
1176144tt_13Memory (IOI10_memory)C++20
컴파일 에러
0 ms0 KiB
#include "grader.h" #include "memory.h" void play() { int i; vector<int> v[30]; char a, b; for (i=1;i<=49;i+=2) { a=faceup(i); b=faceup(i+1); v[a-'A'].emplace_back(i); v[b-'A'].emplace_back(i+1); } for(int i=0;i<25;i++) { for(auto x: v[i]) faceup(x); } }

컴파일 시 표준 에러 (stderr) 메시지

memory.cpp: In function 'void play()':
memory.cpp:5:4: error: 'vector' was not declared in this scope
    5 |    vector<int> v[30];
      |    ^~~~~~
memory.cpp:5:11: error: expected primary-expression before 'int'
    5 |    vector<int> v[30];
      |           ^~~
memory.cpp:10:7: error: 'v' was not declared in this scope
   10 |       v[a-'A'].emplace_back(i);
      |       ^
memory.cpp:15:19: error: 'v' was not declared in this scope
   15 |       for(auto x: v[i]) faceup(x);
      |                   ^