Submission #1299242

#TimeUsernameProblemLanguageResultExecution timeMemory
1299242lizi14Obstacles for a Llama (IOI25_obstacles)C++20
Compilation error
0 ms0 KiB
#include "obstacles.h" #include <bits/stdc++.h> using namespace std; const int N=2e5+5; long long x[N]; long long n; void initialize(vector<int> T, vector<int> H) { n=H.size(); int j=0; for(int j=0; j<H.size(); j++){ if(T[0]<=H[j]){ x[j]=-1; } else{ x[j]=1; } //cout<<x[j]<<" "; //x[j]=a; //j++; } return; } bool can_reach(long long L, long long R, long long S, long long D) { //if(S>D)swap(S,D); int kaa=0; //S--; //D--; //cout<<S<<" "<<D<<endl; for(int i=S; i<=D; i++){ if(x[i]==-1){ kaa=1; break; } // else{ // //cout<<x[i]<<" "; // kaa=1; // break; // } } if(kaa==0)return true; else return false; }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccyAIw7A.o: in function `main':
grader.cpp:(.text.startup+0x3e2): undefined reference to `can_reach(int, int, int, int)'
collect2: error: ld returned 1 exit status