Submission #194128

#TimeUsernameProblemLanguageResultExecution timeMemory
194128s_avila_gCrayfish scrivener (IOI12_scrivener)C++14
Compilation error
0 ms0 KiB
char last; string a = ""; void Init() { } void TypeLetter(char L) { last = L; a += last; } void UndoCommands(int U) { } char GetLetter(int P) { last = a[P]; return last; }

Compilation message (stderr)

scrivener.cpp:3:1: error: 'string' does not name a type; did you mean 'struct'?
 string a = "";
 ^~~~~~
 struct
scrivener.cpp: In function 'void TypeLetter(char)':
scrivener.cpp:10:5: error: 'a' was not declared in this scope
     a += last;
     ^
scrivener.cpp: In function 'char GetLetter(int)':
scrivener.cpp:18:12: error: 'a' was not declared in this scope
     last = a[P];
            ^