Submission #1069561

#TimeUsernameProblemLanguageResultExecution timeMemory
1069561boyliguanhanAncient Machine (JOI21_ancient_machine)C++17
Compilation error
0 ms0 KiB
#include "Bruno.h" using namespace std; void Bruno(int N, int L, std::vector<int> A) { int pt=1,prvpt=0; int start=0; while(start<N&&!A[start])start++; pt=start+1; prvpt=start; while(1){ while(pt<N&&!A[pt]) pt++; if(pt>=N) break; for(int i=pt;--i>prvpt;) Remove(i); Remove(prvpt=pt); pt++; } for(int i=0;i<=min(start,N-1);i++) Remove(i); for(int i=prvpt;++i<N;) Remove(i); }
#include "Anna.h" #include <vector> void Anna(int N, std::vector<char> S) { int phase=0; for(auto i:S) if(phase==0&&i=='X') phase=1,Send(1); else Send(phase==1&&i=='Z'); }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccYc8B6g.o: in function `main':
grader_anna.cpp:(.text.startup+0x14c): undefined reference to `Anna(int, std::vector<char, std::allocator<char> >)'
/usr/bin/ld: /tmp/ccnLp4rj.o: in function `Bruno(int, int, std::vector<int, std::allocator<int> >)':
Anna.cpp:(.text+0x68): undefined reference to `Remove(int)'
/usr/bin/ld: Anna.cpp:(.text+0x86): undefined reference to `Remove(int)'
/usr/bin/ld: Anna.cpp:(.text+0xd8): undefined reference to `Remove(int)'
/usr/bin/ld: Anna.cpp:(.text+0xe6): undefined reference to `Remove(int)'
collect2: error: ld returned 1 exit status

/usr/bin/ld: /tmp/cc2zkM62.o: in function `main':
grader_bruno.cpp:(.text.startup+0x24d): undefined reference to `Bruno(int, int, std::vector<int, std::allocator<int> >)'
/usr/bin/ld: /tmp/cci31pG2.o: in function `Anna(int, std::vector<char, std::allocator<char> >)':
Bruno.cpp:(.text+0x2f): undefined reference to `Send(int)'
/usr/bin/ld: Bruno.cpp:(.text+0x50): undefined reference to `Send(int)'
collect2: error: ld returned 1 exit status