Submission #789567

#TimeUsernameProblemLanguageResultExecution timeMemory
789567Mouad_oujDungeons Game (IOI21_dungeons)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #include "dungeons.h" #define int long long using namespace std; int ans=0,nn; vector<int> se,le,pe,we; void init(int n,vector<int> s,vector<int> p,vector<int> w,vector<int> l) { se.resize(n); le.resize(n); pe.resize(n); we.resize(n); nn=n; se=s; le=l; we=w; pe=p; } int self(int x,int z) { if(x==nn) return z; if(z>=se[x]) return self(we[x],z+se[x]); if(z<se[x]) return self(le[x],z+pe[x]); return 0ll; } int simulate(int x, int z) { return self(x,z); }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccavhWE4.o: in function `main':
grader.cpp:(.text.startup+0x3bd): undefined reference to `init(int, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
/usr/bin/ld: grader.cpp:(.text.startup+0x440): undefined reference to `simulate(int, int)'
collect2: error: ld returned 1 exit status