제출 #339119

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

void play() {
	vector<int> pos[128];
	for (int i = 0; i < 50; ++i)
		pos[faceup(i+1)].push_back(i+1),
		pos[faceup(i+2)].push_back(i+2);
	
	for (int i = 'A'; i < 'Z'; ++i)
		faceup(pos[i][0]), faceup(pos[i][1]);
}

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

memory.cpp: In function 'void play()':
memory.cpp:5:2: error: 'vector' was not declared in this scope
    5 |  vector<int> pos[128];
      |  ^~~~~~
memory.cpp:5:9: error: expected primary-expression before 'int'
    5 |  vector<int> pos[128];
      |         ^~~
memory.cpp:7:3: error: 'pos' was not declared in this scope
    7 |   pos[faceup(i+1)].push_back(i+1),
      |   ^~~
memory.cpp:11:10: error: 'pos' was not declared in this scope
   11 |   faceup(pos[i][0]), faceup(pos[i][1]);
      |          ^~~