제출 #275328

#제출 시각아이디문제언어결과실행 시간메모리
275328barsboldMemory (IOI10_memory)C++14
컴파일 에러
0 ms0 KiB
#include "grader.h" #include "memory.h" #include <bits/stdc++.h> void play() { bool vis[51][51]; memset(vis , 0 , sizeof(vis)); vector<int> f; for(int i =1 ;i<=50; i++){ faceup(i); f[faceup(i)].push_back(i); } for(int i = 1; i<=25; i++){ faceup(f[i][0]); faceup(f[i][1]); } }

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

memory.cpp: In function 'void play()':
memory.cpp:7:5: error: 'vector' was not declared in this scope; did you mean 'std::vector'?
    7 |     vector<int> f;
      |     ^~~~~~
      |     std::vector
In file included from /usr/include/c++/9/vector:67,
                 from /usr/include/c++/9/queue:61,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:86,
                 from memory.cpp:3:
/usr/include/c++/9/bits/stl_vector.h:386:11: note: 'std::vector' declared here
  386 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
memory.cpp:7:12: error: expected primary-expression before 'int'
    7 |     vector<int> f;
      |            ^~~
memory.cpp:10:9: error: 'f' was not declared in this scope
   10 |         f[faceup(i)].push_back(i);
      |         ^
memory.cpp:13:12: error: 'f' was not declared in this scope
   13 |     faceup(f[i][0]);
      |            ^