제출 #964959

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
9649592024-04-17 19:35:22marinalucaMemory (IOI10_memory)C++17
컴파일 에러
0 ms0 KiB
#include "grader.h"
#include "memory.h"
using namespace std;
void play (){
int NMAX = 50;
vector <int> v;
for (int i = 0; i < 50; ++ i){
v[i] = faceup(i + 1);
}
for (int i = 0; i < NMAX; ++ i){
for (int j = i + 1; j < NMAX; ++ j){
if (v[i] == v[j]){
faceup(i + 1);
faceup(j + 1);
}
}
}
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

memory.cpp: In function 'void play()':
memory.cpp:8:5: error: 'vector' was not declared in this scope
    8 |     vector <int> v;
      |     ^~~~~~
memory.cpp:3:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
    2 | #include "memory.h"
  +++ |+#include <vector>
    3 | 
memory.cpp:8:13: error: expected primary-expression before 'int'
    8 |     vector <int> v;
      |             ^~~
memory.cpp:10:9: error: 'v' was not declared in this scope
   10 |         v[i] = faceup(i + 1);
      |         ^
memory.cpp:14:17: error: 'v' was not declared in this scope
   14 |             if (v[i] == v[j]){
      |                 ^