Submission #1256155

#TimeUsernameProblemLanguageResultExecution timeMemory
1256155MasterDebaterA Difficult(y) Choice (BOI21_books)C++20
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; #define ll long long ll skim(int i){ } void answer(vector<int>v){ } void impossible(){ } int binary_search(int lo,int hi,ll a){ int res=0; while(lo<=hi){ int mid=(lo+hi)/2; if(skim(mid)<=a)res=mid,lo=mid+1; else hi=mid-1; } return res; } void solve(int N,int K,ll A,int S){ int L=binary_search(1,N,A-1); int R=binary_search(1,N,2*A); if(R-L>=K){ vector<int>ans; for(int i=L+1;i<=L+K;i++)ans.push_back(i); answer(ans); } impossible(); return; } int main(){ ios_base::sync_with_stdio(false); cin.tie(0); return 0; }

Compilation message (stderr)

books.cpp: In function 'long long int skim(int)':
books.cpp:5:1: warning: no return statement in function returning non-void [-Wreturn-type]
    5 | }
      | ^
/usr/bin/ld: /tmp/ccpZEUav.o: in function `answer(std::vector<int, std::allocator<int> >)':
grader.cpp:(.text+0xa0): multiple definition of `answer(std::vector<int, std::allocator<int> >)'; /tmp/cc525q1H.o:books.cpp:(.text+0x0): first defined here
/usr/bin/ld: /tmp/ccpZEUav.o: in function `impossible()':
grader.cpp:(.text+0x160): multiple definition of `impossible()'; /tmp/cc525q1H.o:books.cpp:(.text+0x10): first defined here
/usr/bin/ld: /tmp/ccpZEUav.o: in function `skim(int)':
grader.cpp:(.text+0x1a0): multiple definition of `skim(int)'; /tmp/cc525q1H.o:books.cpp:(.text.unlikely+0x0): first defined here
/usr/bin/ld: /tmp/ccpZEUav.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cc525q1H.o:books.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status