| Task: | Gap |
| Sender: | ArktinenKarpalo |
| Submission time: | 2019-04-14 02:35:38 +0300 |
| Language: | C++ |
| Status: | COMPILE ERROR |
Compiler report
input/code.cpp:7:12: error: expected ')' before numeric constant
#define N (1<<18)
^
input/code.cpp:14:23: note: in expansion of macro 'N'
ll findGap(int T, int N) {
^
input/code.cpp:7:12: error: expected ')' before numeric constant
#define N (1<<18)
^
input/code.cpp:14:23: note: in expansion of macro 'N'
ll findGap(int T, int N) {
^
input/code.cpp:7:12: error: expected initializer before numeric constant
#define N (1<<18)
^
input/code.cpp:14:23: note: in expansion of macro 'N'
ll findGap(int T, int 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(int T, int 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;
}
}
