Submission #1089917

#TimeUsernameProblemLanguageResultExecution timeMemory
1089917lucripopa (BOI18_popa)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> int query(int a,int b,int c,int d); int t[1010]; int tata(int nod) { if(t[nod]==0) return nod; return tata(t[nod]); } int solve(int N, int* &Left, int* &Right) { int n=N; for(int i=0;i<n;++i) { t[i]=0; Left[i]=Right[i]=-1; } for(int i=0;i+1<n;++i) { if(query(i,i,i,i+1)==true) { t[i+1]=i; Right[i]=i+1; } else { int x=tata(i); t[x]=i+1; Left[i+1]=x; } } for(int i=0;i<n;++i) if(t[i]==0) return i; }

Compilation message (stderr)

popa.cpp: In function 'int solve(int, int*&, int*&)':
popa.cpp:35:1: warning: control reaches end of non-void function [-Wreturn-type]
   35 | }
      | ^
/usr/bin/ld: /tmp/ccBCOavY.o: in function `main':
grader.cpp:(.text.startup+0xf1): undefined reference to `solve(int, int*, int*)'
collect2: error: ld returned 1 exit status