제출 #759608

#제출 시각아이디문제언어결과실행 시간메모리
759608aykhn크레이피쉬 글쓰는 기계 (IOI12_scrivener)C++14
0 / 100
184 ms262144 KiB
#include <bits/stdc++.h> // author: aykhn using namespace std; #define mpr make_pair #define pb push_back #define fi first #define se second string s; vector<pair<int, char>> calls; int x; string f(int i) { if (i < 0) return ""; if (calls[i].fi == 1) return f(i - 1) + calls[i].se; return f(i - 1 - calls[i].se); } void Init() { s = ""; } void TypeLetter(char L) { calls.pb(mpr(1, L)); } void UndoCommands(int U) { calls.pb(mpr(2, U)); } char GetLetter(int P) { x++; if (x == 1) { s = f(calls.size() - 1); } return s[P]; }
#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...