Submission #339120

#TimeUsernameProblemLanguageResultExecution timeMemory
339120Ta180mMemory (IOI10_memory)C++17
Compilation error
0 ms0 KiB
#include "grader.h" #include "memory.h" #include <bits/stdc++.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]); }

Compilation message (stderr)

memory.cpp: In function 'void play()':
memory.cpp:6:2: error: 'vector' was not declared in this scope
    6 |  vector<int> pos[128];
      |  ^~~~~~
memory.cpp:6:2: note: suggested alternatives:
In file included from /usr/include/c++/9/vector:67,
                 from /usr/include/c++/9/functional:62,
                 from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/9/algorithm:71,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
                 from memory.cpp:3:
/usr/include/c++/9/bits/stl_vector.h:386:11: note:   'std::vector'
  386 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
In file included from /usr/include/c++/9/functional:62,
                 from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/9/algorithm:71,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
                 from memory.cpp:3:
/usr/include/c++/9/vector:90:13: note:   'std::pmr::vector'
   90 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
memory.cpp:6:9: error: expected primary-expression before 'int'
    6 |  vector<int> pos[128];
      |         ^~~
memory.cpp:8:3: error: 'pos' was not declared in this scope; did you mean 'pow'?
    8 |   pos[faceup(i+1)].push_back(i+1),
      |   ^~~
      |   pow
memory.cpp:12:10: error: 'pos' was not declared in this scope; did you mean 'pow'?
   12 |   faceup(pos[i][0]), faceup(pos[i][1]);
      |          ^~~
      |          pow