Task: | Gap |
Sender: | ArktinenKarpalo |
Submission time: | 2019-04-14 02:34:51 +0300 |
Language: | C++ |
Status: | COMPILE ERROR |
Compiler report
input/code.cpp:14:12: error: 'long long int findGap' redeclared as different kind of symbol ll findGap(T, N) { ^ In file included from input/code.cpp:2:0: input/gap.h:27:11: note: previous declaration 'long long int findGap(int, int)' long long findGap(int T, int N); ^~~~~~~ input/code.cpp:14:12: error: 'T' was not declared in this scope ll findGap(T, N) { ^
Code
#include <bits/stdc++.h> #include "gap.h" #define ll long long #define ull unsigned long long #define ld long double #define M 1000000007 #define N (1<<18) #define P complex<long long> #define X real() #define Y imag() using namespace std; ll findGap(T, N) { if(T == 1) { ll ans = 0; ll s=0, t=1e18, mn, mx; MinMax(s, t, &mn, &mx); while(true) { t = mx-1; ll ed = mx; MinMax(s, t, &mn, &mx); if(mx == -1) break; ans = max(ans, ed-mx); } return ans; } else { return -1; } }