Submission #547121

#TimeUsernameProblemLanguageResultExecution timeMemory
547121oToToTCrayfish scrivener (IOI12_scrivener)C++17
5 / 100
439 ms262144 KiB
#include <ext/rope> int cnt; __gnu_cxx::crope a[1000001]; void Init() { cnt = 0; } void TypeLetter(char c) { a[++cnt] = a[cnt] + c; } void UndoCommands(int k) { a[++cnt] = a[cnt-k-1]; } char GetLetter(int k){ return a[cnt][k]; }

Compilation message (stderr)

scrivener.cpp: In function 'void TypeLetter(char)':
scrivener.cpp:7:29: warning: operation on 'cnt' may be undefined [-Wsequence-point]
    7 | void TypeLetter(char c) { a[++cnt] = a[cnt] + c; }
      |                             ^~~~~
scrivener.cpp: In function 'void UndoCommands(int)':
scrivener.cpp:8:30: warning: operation on 'cnt' may be undefined [-Wsequence-point]
    8 | void UndoCommands(int k) { a[++cnt] = a[cnt-k-1]; }
      |                              ^~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...