Submission #921210

#TimeUsernameProblemLanguageResultExecution timeMemory
921210Alihan_8Crayfish scrivener (IOI12_scrivener)C++17
34 / 100
133 ms262144 KiB
#include <bits/stdc++.h>

using namespace std;

#define all(x) x.begin(), x.end()
#define ar array
#define pb push_back
#define ln '\n'
//#define int long long

using i64 = long long;

template <class F, class _S>
bool chmin(F &u, const _S &v){
    bool flag = false;
    if ( u > v ){
        u = v; flag |= true;
    }
    return flag;
}

template <class F, class _S>
bool chmax(F &u, const _S &v){
    bool flag = false;
    if ( u < v ){
        u = v; flag |= true;
    }
    return flag;
}

vector <string> a;

int id = 0;

void Init() {
    a.pb("");
}

void TypeLetter(char L) {
    a.pb(a.back() + L);
    id++;
}

void UndoCommands(int U) {
    a.pb(a[id - U]);
    id++;
}

char GetLetter(int P) {
    return a[id][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...