Submission #168130

#TimeUsernameProblemLanguageResultExecution timeMemory
168130dimash241Library (JOI18_library)C++17
Compilation error
0 ms0 KiB
#include "library.h" #include<bits/stdc++.h> #define pb push_back using namespace std; int Query (const vector < int > &m) {}; void Answer(const vector < int > &m) {}; void Solve(int n) { vector <int> m(n); m[0] = 1; int mx = 0, p = 0; for(int i = 1; i < n; i ++) { m[i] = 1; int x; x = Query(m); if (x > mx) { mx = x; p = i; } m[i] = 0; } vector < pair < int, int > > res; m[0] = 0; //m[p] = 1; for (int i = 0; i < n; i ++) { m[p] = 1; m[i] = 1; res.pb({Query(m), i}); m[p] = 0; m[i] = 0; } sort(res.begin(), res.end()); vector < int > ans; for (int i = 0; i < n; i ++) ans.pb(res[i].second); Answer(ans); } // B...a

Compilation message (stderr)

library.cpp: In function 'int Query(const std::vector<int>&)':
library.cpp:8:38: warning: no return statement in function returning non-void [-Wreturn-type]
 int Query (const vector < int > &m) {};
                                      ^
/tmp/cc3dsOWM.o: In function `Query(std::vector<int, std::allocator<int> > const&)':
library.cpp:(.text+0x30): multiple definition of `Query(std::vector<int, std::allocator<int> > const&)'
/tmp/cceWF8VP.o:grader.cpp:(.text+0x140): first defined here
/tmp/cc3dsOWM.o: In function `Answer(std::vector<int, std::allocator<int> > const&)':
library.cpp:(.text+0x40): multiple definition of `Answer(std::vector<int, std::allocator<int> > const&)'
/tmp/cceWF8VP.o:grader.cpp:(.text+0x4a0): first defined here
collect2: error: ld returned 1 exit status