Submission #911514

# Submission time Handle Problem Language Result Execution time Memory
911514 2024-01-19T02:57:23 Z Sir_Ahmed_Imran Crayfish scrivener (IOI12_scrivener) C++17
Compilation error
0 ms 0 KB
                              ///~~~LOTA~~~///
#include "scrivener.h"
#include <bits/stdc++.h>
using namespace std;
#define nl '\n'
#define ff first
#define ss second
#define ll long long 
#define append push_back
#define all(x) (x).begin(),(x).end()
#define pii pair<int,int>
#define N 1000001
int c;
struct node{
    int ind;
    char val;
    node* par[20];
};
node* x[N];
void Init(){
    c=0;
    x[0]=new node();
    x[0]->ind=-1;
    for(int i=0;i<20;i++)
        x[0]->par[i]=x[0];
}
void TypeLetter(char L){
    c++;
    x[c]=new node();
    x[c]->ind=x[c-1]->ind+1;
    x[c]->par[0]=x[c-1];
    x[c]->val=L;
    for(int i=0;i<19;i++)
        x[c]->par[i+1]=(x[c]->par[i])->par[i];
}
void UndoCommands(int U){
    c++;
    x[c]=new node;
    x[c]->par[0]=x[c-U-1];
    x[c]->ind=x[c]->par[0]->ind;
    for(int i=0;i<19;i++)
        x[c]->par[i+1]=x[c]->par[i]->par[i];
}
char GetLetter(int P){
    node* n=x[c];
    for(int i=19;i>=0;i--){
        if(n->par[i]->ind>=P){
            cout<<i<<' '<<n->par[i]->ind<<nl;
            n=n->par[i];
        }
    }
    return n->val;
}

Compilation message

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