Submission #1192131

#TimeUsernameProblemLanguageResultExecution timeMemory
1192131TroySerCrayfish scrivener (IOI12_scrivener)C++20
Compilation error
0 ms0 KiB
#include <ext/rope> #include <bits/stdc++.h> using namespace std; using namespace __gnu_cxx; const ll SZ = 1e7 + 1; crope states[SZ]; int currentIndex = 0; void Init() {} void TypeLetter(char L) { states[currentIndex + 1] = states[currentIndex] + L; currentIndex++; } void UndoCommands(int U) { states[currentIndex + 1] = states[currentIndex - U]; currentIndex++; } char GetLetter(int P) { return states[currentIndex][P]; }

Compilation message (stderr)

scrivener.cpp:7:7: error: 'll' does not name a type
    7 | const ll SZ = 1e7 + 1;
      |       ^~
scrivener.cpp:9:14: error: 'SZ' was not declared in this scope
    9 | crope states[SZ];
      |              ^~
scrivener.cpp: In function 'void TypeLetter(char)':
scrivener.cpp:16:9: error: 'states' was not declared in this scope; did you mean 'static'?
   16 |         states[currentIndex + 1] = states[currentIndex] + L;
      |         ^~~~~~
      |         static
scrivener.cpp: In function 'void UndoCommands(int)':
scrivener.cpp:23:9: error: 'states' was not declared in this scope; did you mean 'static'?
   23 |         states[currentIndex + 1] = states[currentIndex - U];
      |         ^~~~~~
      |         static
scrivener.cpp: In function 'char GetLetter(int)':
scrivener.cpp:30:16: error: 'states' was not declared in this scope; did you mean 'static'?
   30 |         return states[currentIndex][P];
      |                ^~~~~~
      |                static