Submission #102805

#TimeUsernameProblemLanguageResultExecution timeMemory
102805alexpetrescuGap (APIO16_gap)C++14
Compilation error
0 ms0 KiB
#include <algorithm> #include "gap.h" long long findGap(int T, int N) { long long R = 1000000000000000000LL; long long e, r; MinMax(0, R, &e, &r); r -= e; long long dist = (r + N - 2) / (N - 1), st = e, ans = 0, val = -1; std::vector < int > q; for (int i = 1; i < N; i++) { long long a, b; MinMax(st, st + dist, &a, &b); st += dist + 1; if (a != -1) { if (val != -1) ans = std::max(ans, a - val); val = b; } } return ans; }

Compilation message (stderr)

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:11:10: error: 'vector' is not a member of 'std'
     std::vector < int > q;
          ^~~~~~
gap.cpp:11:19: error: expected primary-expression before 'int'
     std::vector < int > q;
                   ^~~