제출 #940272

#제출 시각아이디문제언어결과실행 시간메모리
940272HappyCapybaraMemory (IOI10_memory)C++17
컴파일 에러
0 ms0 KiB
#include "grader.h" #include "memory.h" void play() { vector<vector<int>> p(25); for (int i=1; i<=50; i++) p[faceup(i)-1].push_back(i); for (vector<int> v : p) faceup(p[1]); faceup(p[2]); }

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

memory.cpp: In function 'void play()':
memory.cpp:5:4: error: 'vector' was not declared in this scope
    5 |    vector<vector<int>> p(25);
      |    ^~~~~~
memory.cpp:5:18: error: expected primary-expression before 'int'
    5 |    vector<vector<int>> p(25);
      |                  ^~~
memory.cpp:6:30: error: 'p' was not declared in this scope
    6 |    for (int i=1; i<=50; i++) p[faceup(i)-1].push_back(i);
      |                              ^
memory.cpp:7:16: error: expected primary-expression before 'int'
    7 |    for (vector<int> v : p) faceup(p[1]); faceup(p[2]);
      |                ^~~
memory.cpp:7:49: error: 'p' was not declared in this scope
    7 |    for (vector<int> v : p) faceup(p[1]); faceup(p[2]);
      |                                                 ^
memory.cpp:8:1: error: expected primary-expression before '}' token
    8 | }
      | ^
memory.cpp:7:55: error: expected ')' before '}' token
    7 |    for (vector<int> v : p) faceup(p[1]); faceup(p[2]);
      |        ~                                              ^
      |                                                       )
    8 | }
      | ~                                                      
memory.cpp:8:1: error: expected primary-expression before '}' token
    8 | }
      | ^