Submission #921207

# Submission time Handle Problem Language Result Execution time Memory
921207 2024-02-03T14:14:07 Z Alihan_8 Crayfish scrivener (IOI12_scrivener) C++17
Compilation error
0 ms 0 KB
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

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];
      |            ^