Submission #921207

#TimeUsernameProblemLanguageResultExecution timeMemory
921207Alihan_8Crayfish scrivener (IOI12_scrivener)C++17
Compilation error
0 ms0 KiB
string s; void Init() {} void TypeLetter(char L) { s += L; } void UndoCommands(int U) { assert(false); } char GetLetter(int P) { return s[P]; }

Compilation message (stderr)

scrivener.cpp:2:1: error: 'string' does not name a type
    2 | string s;
      | ^~~~~~
scrivener.cpp: In function 'void TypeLetter(char)':
scrivener.cpp:7:5: error: 's' was not declared in this scope
    7 |     s += L;
      |     ^
scrivener.cpp: In function 'void UndoCommands(int)':
scrivener.cpp:11:5: error: 'assert' was not declared in this scope
   11 |     assert(false);
      |     ^~~~~~
scrivener.cpp:1:1: note: 'assert' is defined in header '<cassert>'; did you forget to '#include <cassert>'?
  +++ |+#include <cassert>
    1 | 
scrivener.cpp: In function 'char GetLetter(int)':
scrivener.cpp:15:12: error: 's' was not declared in this scope
   15 |     return s[P];
      |            ^