Submission #624880

#TimeUsernameProblemLanguageResultExecution timeMemory
624880Cyber_WolfGap (APIO16_gap)C++14
Compilation error
0 ms0 KiB
//Contest: APIO 16 Problem 3 //Problem Name: Gap #include <bits/stdc++.h> #include "gap.h" using namespace std; #define lg long long lg findGap(lg subtask, lg n) { vector<lg> v; lg last = 0; for(int i = 0; i < n; i++) { lg mnm, mxm; MinMax(last, 1e18, &mnm, &mxm); v.push_back(mnm); last = mnm+1; } lg ans = 0; for(int i = 1; i < v.size(); i++) ans = max(ans, v[i]-v[i-1]); return ans; }

Compilation message (stderr)

gap.cpp: In function 'long long int findGap(long long int, long long int)':
gap.cpp:24:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   24 |  for(int i = 1; i < v.size(); i++) ans = max(ans, v[i]-v[i-1]);
      |                 ~~^~~~~~~~~~
/usr/bin/ld: /tmp/ccn06pKJ.o: in function `main':
grader.cpp:(.text.startup+0x1b7): undefined reference to `findGap(int, int)'
collect2: error: ld returned 1 exit status