Submission #1079422

#TimeUsernameProblemLanguageResultExecution timeMemory
1079422TrumlingCrayfish scrivener (IOI12_scrivener)C++14
34 / 100
126 ms262144 KiB
#include <bits/stdc++.h>
using namespace std; 

typedef long long ll;
#define pb push_back
#define F first
#define S second
#define enter cout<<'\n';
#define INF 99999999999999999
#define MOD 1000000007
#define all(x) x.begin(),x.end()

char last;
ll idx=-1;
string s;
vector<pair<string,string>>v;
void Init() 
{

}

void TypeLetter(char L) {
  
  pair<string,string>curr;
  curr.F=s;

  s+=L;
  curr.S=s;

  v.pb(curr);
}

void UndoCommands(int U) {
  pair<string,string>curr;
  curr.F=s;

  curr.S=v[v.size()-U].F;
  v.pb(curr);
  s=curr.S;
}

char GetLetter(int P) {

  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...