Submission #697640

#TimeUsernameProblemLanguageResultExecution timeMemory
697640europiumMemory (IOI10_memory)C++17
Compilation error
0 ms0 KiB
#include "grader.h" #include "memory.h" #include <bits/stdc++.h> void play() { char a, b; vector<vector<int>> c; c.resize(50); for (int i = 1; i <= 50; i += 2){ a = faceup(i), b = faceup(i + 1); c[a - 'A'].push_back(i); c[b - 'A'].push_back(i + 1); } for (int i = 0; i < 25; i++){ a = faceup(c[i][0]); b = faceup(c[i][1]); } }

Compilation message (stderr)

memory.cpp: In function 'void play()':
memory.cpp:8:5: error: 'vector' was not declared in this scope
    8 |     vector<vector<int>> c;
      |     ^~~~~~
memory.cpp:8:5: note: suggested alternatives:
In file included from /usr/include/c++/10/vector:67,
                 from /usr/include/c++/10/functional:62,
                 from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/10/algorithm:74,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from memory.cpp:3:
/usr/include/c++/10/bits/stl_vector.h:389:11: note:   'std::vector'
  389 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
In file included from /usr/include/c++/10/functional:62,
                 from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/10/algorithm:74,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from memory.cpp:3:
/usr/include/c++/10/vector:86:13: note:   'std::pmr::vector'
   86 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
memory.cpp:8:19: error: expected primary-expression before 'int'
    8 |     vector<vector<int>> c;
      |                   ^~~
memory.cpp:9:5: error: 'c' was not declared in this scope
    9 |     c.resize(50);
      |     ^