Submission #474077

#TimeUsernameProblemLanguageResultExecution timeMemory
474077ValiAntonieMemory (IOI10_memory)C++14
Compilation error
0 ms0 KiB
#include "grader.h" #include "memory.h" #include <vector> using namespace std; void play() { std::vector<int> v[26]; for (int i = 0; i < 50; i++) { char c = faceup(i + 1); v[c - 'A'].push_back(i); } for (int i = 0; i < 25; i++) { assert(v[i].size() == 2); assert(faceup(v[i][0] + 1) == faceup(v[i][1] + 1)); } return; }

Compilation message (stderr)

memory.cpp: In function 'void play()':
memory.cpp:12:9: error: 'assert' was not declared in this scope
   12 |         assert(v[i].size() == 2);
      |         ^~~~~~
memory.cpp:4:1: note: 'assert' is defined in header '<cassert>'; did you forget to '#include <cassert>'?
    3 | #include <vector>
  +++ |+#include <cassert>
    4 | using namespace std;