Submission #1251930

#TimeUsernameProblemLanguageResultExecution timeMemory
1251930aritro_Finding Routers (IOI20_routers)C++20
Compilation error
0 ms0 KiB
#include "routers.h" #include<bits/stdc++.h> using namespace std; typedef long long ll; #define int ll #define endl '\n' #define pb push_back #define ff first #define ss second #define all(a) a.begin(),a.end() const int MOD=1000000007; #define gcd(a,b) __gcd(a,b) #define lcm(a,b) (a*(b/gcd(a,b))) #define fraction(x); cout.unsetf(ios::floatfield); cout.precision(x); cout.setf(ios::fixed,ios::floatfield); #define file(); freopen("input.txt","r",stdin);freopen("output.txt","w",stdout); vector<int> find_routers(int mx, int n, int q){ //call with: use_detector(x); //solve for: 2 routers /*int l=0,r=mx,mid; int ans=0; while(l<=r){ mid=(l+r)/2; int tem=use_detector(mid); if(tem==0) ans=mid,l=mid+1; else r=mid-1; }*/ //cout<<"ANS: "<<(((ans+3)/2)+ans)+1<<endl; //return {0,(((ans+1)/2)+ans)+1}; for(int i=0;i<=mx;i++){ int res=use_detector(i); if(res) return {0,(i-1)*2}; } return {0,69}; }

Compilation message (stderr)

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