# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1050503 | KasymK | Crayfish scrivener (IOI12_scrivener) | C++17 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "bits/stdc++.h"
using namespace std;
#define ff first
#define ss second
#define all(v) v.begin(), v.end()
#define ll long long
#define pb push_back
#define pii pair<int, int>
#define wr puts("----------------")
template<class T>bool umin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
template<class T>bool umax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
vector<string> v;
void init(){
v.pb("");
}
void TypeLetter(char c){
string s = v.back();
s += c;
v.pb(s);
}
void UndoCommands(int u){
int sz = (int)v.size();
sz--;
string s = v[sz-u];
v.pb(s);
}
char GetLetter(int p){
string s = v.back();
return s[p];
}