Submission #309635

#TimeUsernameProblemLanguageResultExecution timeMemory
309635rc_catuntaCrayfish scrivener (IOI12_scrivener)C++14
Compilation error
0 ms0 KiB
#include <string>
string seq;

void Init() {
	seq="";
}

void TypeLetter(char L) {

  seq=seq+L;

}

void UndoCommands(int U) {

}

char GetLetter(int P) {

  return seq[P];

}

Compilation message (stderr)

scrivener.cpp:2:1: error: 'string' does not name a type; did you mean 'stdin'?
    2 | string seq;
      | ^~~~~~
      | stdin
scrivener.cpp: In function 'void Init()':
scrivener.cpp:5:2: error: 'seq' was not declared in this scope
    5 |  seq="";
      |  ^~~
scrivener.cpp: In function 'void TypeLetter(char)':
scrivener.cpp:10:3: error: 'seq' was not declared in this scope
   10 |   seq=seq+L;
      |   ^~~
scrivener.cpp: In function 'char GetLetter(int)':
scrivener.cpp:20:10: error: 'seq' was not declared in this scope
   20 |   return seq[P];
      |          ^~~