Submission #194147

# Submission time Handle Problem Language Result Execution time Memory
194147 2020-01-15T20:28:48 Z juanmartinez111 Crayfish scrivener (IOI12_scrivener) C++14
Compilation error
0 ms 0 KB
#include<bits/stdc++.h>
using namespace std;
vector<string >posicion;
string pal="";
void Init() {
}

void TypeLetter(char L) {
  pal.push_back(L);
  last = L;
  posicion.push_back(pal);

}

void UndoCommands(int U) {
    string s=posicion[posicion.size()-1-U];
    posicion.push_back(s);
}

char GetLetter(int P) {

  return posicion.back()[P];

}

Compilation message

scrivener.cpp: In function 'void TypeLetter(char)':
scrivener.cpp:10:3: error: 'last' was not declared in this scope
   last = L;
   ^~~~
scrivener.cpp:10:3: note: suggested alternative: 'wait'
   last = L;
   ^~~~
   wait