Submission #935599

#TimeUsernameProblemLanguageResultExecution timeMemory
935599tnunCrayfish scrivener (IOI12_scrivener)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long string a[1000002]; int cur=0; void Init(){ } void TypeLetter(char c){ cur++; a[cur]=a[cur-1]+c; } void UndoCommands(int k){ cur++; int t=cur-k-1; t=max(0,t); a[cur]=a[t]; } char GetLetter(int s){ return a[cur][c]; }

Compilation message (stderr)

scrivener.cpp: In function 'char GetLetter(int)':
scrivener.cpp:20:17: error: 'c' was not declared in this scope
   20 |   return a[cur][c];
      |                 ^