Submission #976517

# Submission time Handle Problem Language Result Execution time Memory
976517 2024-05-06T16:14:47 Z marinaluca Crayfish scrivener (IOI12_scrivener) C++14
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>
#include <ext/rope>
__gnu_cxx::crope c[1000100];
int k;
void Init(){}
void TypeLetter(char L){
    k ++;
    c[k] = c[k - 1];
    c[k].push_back(L);
}
void UndoCommands(int U){
    k ++;
    s[k] = s[k - U - 1];
}
char GetLetter(int P){
   return c[k][P];
}

Compilation message

scrivener.cpp: In function 'void UndoCommands(int)':
scrivener.cpp:13:5: error: 's' was not declared in this scope
   13 |     s[k] = s[k - U - 1];
      |     ^