Submission #68392

#TimeUsernameProblemLanguageResultExecution timeMemory
68392nvmdavaCrayfish scrivener (IOI12_scrivener)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> string s[1000001]; int now = 0, i = 0; void Init() {} void TypeLetter(char L) { s[i] = s[now] + L; i++; } void UndoCommands(int U) { now -= U; s[i] = s[now]; i++; } char GetLetter(int P) { return s[now][P]; }

Compilation message (stderr)

scrivener.cpp:2:1: error: 'string' does not name a type; did you mean 'stdin'?
 string s[1000001];
 ^~~~~~
 stdin
scrivener.cpp: In function 'void TypeLetter(char)':
scrivener.cpp:7:2: error: 's' was not declared in this scope
  s[i] = s[now] + L;
  ^
scrivener.cpp: In function 'void UndoCommands(int)':
scrivener.cpp:13:2: error: 's' was not declared in this scope
  s[i] = s[now];
  ^
scrivener.cpp: In function 'char GetLetter(int)':
scrivener.cpp:18:10: error: 's' was not declared in this scope
   return s[now][P];
          ^