Submission #972467

#TimeUsernameProblemLanguageResultExecution timeMemory
972467androCrayfish scrivener (IOI12_scrivener)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>

using namespace std;

void Init() {}

string s = "";

void TypeLetter(char L) {

  s += L;

}

void UndoCommands(int U) {

}

char GetLetter(int P) {

  return s[p];
}

Compilation message (stderr)

scrivener.cpp: In function 'char GetLetter(int)':
scrivener.cpp:21:12: error: 'p' was not declared in this scope
   21 |   return s[p];
      |            ^