Submission #952826

#TimeUsernameProblemLanguageResultExecution timeMemory
952826onepunchac168Rainforest Jumps (APIO21_jumps)C++14
Compilation error
0 ms0 KiB
#include "jumps.h" #include <cassert> #include <cstdio> #include <vector> #include <bits/stdc++.h> using namespace std; int main() { freopen("aa.inp","r",stdin); int N, Q; assert(2 == scanf("%d %d", &N, &Q)); std::vector<int> H(N); for (int i = 0; i < N; ++i) { assert(1 == scanf("%d", &H[i])); } init(N, H); for (int i = 0; i < Q; ++i) { int A, B, C, D; assert(4 == scanf("%d %d %d %d", &A, &B, &C, &D)); int rr=minimum_jumps(A, B, C, D); cout<<rr<<endl; } return 0; }

Compilation message (stderr)

jumps.cpp: In function 'int main()':
jumps.cpp:11:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   11 |     freopen("aa.inp","r",stdin);
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~
/usr/bin/ld: /tmp/ccj1SluE.o: in function `main':
stub.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cccQO1mD.o:jumps.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/cccQO1mD.o: in function `main':
jumps.cpp:(.text.startup+0x199): undefined reference to `init(int, std::vector<int, std::allocator<int> >)'
/usr/bin/ld: jumps.cpp:(.text.startup+0x229): undefined reference to `minimum_jumps(int, int, int, int)'
/usr/bin/ld: /tmp/ccj1SluE.o: in function `main':
stub.cpp:(.text.startup+0x177): undefined reference to `init(int, std::vector<int, std::allocator<int> >)'
/usr/bin/ld: stub.cpp:(.text.startup+0x1d1): undefined reference to `minimum_jumps(int, int, int, int)'
collect2: error: ld returned 1 exit status