제출 #633804

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

void play() {
   int i;
   char a, b;
   vector <set<int>> A(24);
   for(int i = 2; i <= 50;++i){
	   a = faceup(1);
	   b = faceup(i);
	   A[b - 'a'].ins(i);
	   }
	for(auto& x:A){
		a = faceup(*x.begin());
		b = faceup(*x.rbegin());
		}
}

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

memory.cpp: In function 'void play()':
memory.cpp:7:4: error: 'vector' was not declared in this scope
    7 |    vector <set<int>> A(24);
      |    ^~~~~~
memory.cpp:7:12: error: 'set' was not declared in this scope
    7 |    vector <set<int>> A(24);
      |            ^~~
memory.cpp:7:16: error: expected primary-expression before 'int'
    7 |    vector <set<int>> A(24);
      |                ^~~
memory.cpp:11:5: error: 'A' was not declared in this scope
   11 |     A[b - 'a'].ins(i);
      |     ^
memory.cpp:13:14: error: 'A' was not declared in this scope
   13 |  for(auto& x:A){
      |              ^
memory.cpp:5:8: warning: unused variable 'i' [-Wunused-variable]
    5 |    int i;
      |        ^