제출 #592141

#제출 시각아이디문제언어결과실행 시간메모리
592141MahtimursuMemory (IOI10_memory)C++17
컴파일 에러
0 ms0 KiB
#include "grader.h"
#include "memory.h"

void play() {
    vector<char> v(51);

    for (int i = 1; i <= 50; ++i) {
        v[i] = faceup(i);
    }

    for (int i = 1; i <= 50; ++i) {
        for (int j = i + 1; j <= 50; ++j) {
            if (v[i] == v[j]) {
                faceup(i);
                faceup(j);
            }
        }
    }
}

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

memory.cpp: In function 'void play()':
memory.cpp:5:5: error: 'vector' was not declared in this scope
    5 |     vector<char> v(51);
      |     ^~~~~~
memory.cpp:5:12: error: expected primary-expression before 'char'
    5 |     vector<char> v(51);
      |            ^~~~
memory.cpp:8:9: error: 'v' was not declared in this scope
    8 |         v[i] = faceup(i);
      |         ^
memory.cpp:13:17: error: 'v' was not declared in this scope
   13 |             if (v[i] == v[j]) {
      |                 ^