Submission #233505

#TimeUsernameProblemLanguageResultExecution timeMemory
233505Dremix10Crayfish scrivener (IOI12_scrivener)C++17
5 / 100
158 ms262148 KiB
#include <bits/stdc++.h> using namespace std; char last; string ans=""; vector<string> state; void Init() { } void TypeLetter(char L) { last = L; ans+=last; state.push_back(ans); } void UndoCommands(int U) { int i; int k=state.size(); ans=state[k-U]; state.push_back(ans); } char GetLetter(int P) { return ans[P]; } /* 14 T a T b P 1 T d U 2 U 1 P 2 T e U 1 U 5 T c P 2 U 2 P 2 */

Compilation message (stderr)

scrivener.cpp: In function 'void UndoCommands(int)':
scrivener.cpp:20:9: warning: unused variable 'i' [-Wunused-variable]
     int i;
         ^
#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...