Submission #1184988

#TimeUsernameProblemLanguageResultExecution timeMemory
1184988GabpCrayfish scrivener (IOI12_scrivener)C++20
Compilation error
0 ms0 KiB
#include<bits/stdc++.h>
#include"scrivener.h"
using namespace std;

int cnt = 0;
const int N = 1e6 + 5;
int sz[N];
int idx[N];
vector<pair<int,char>> memo[N];

void Init() {
    sz[0] = 0;
    idx[0] = 0;
}

void TypeLetter(char L) {
    int x = sz[cnt++];
    idx[cnt] = cnt;
    sz[cnt] = x + 1;
    memo[x].push_back({cnt, L});
}

void UndoCommands(int U) {
    int prev = idx[cnt++ - U];
    idx[cnt] = prev;
    sz[cnt] = sz[prev];
}

char GetLetter(int P) {
    auto it = lower_bound(memo[P].begin(), memo[P].end(), make_pair(cnt + 1, '\0'));
    it--;
    return it->second;
}

Compilation message (stderr)

scrivener.cpp:2:9: fatal error: scrivener.h: No such file or directory
    2 | #include"scrivener.h"
      |         ^~~~~~~~~~~~~
compilation terminated.