답안 #249901

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
249901 2020-07-16T11:24:23 Z receed Fireworks (APIO16_fireworks) C++14
컴파일 오류
0 ms 0 KB
#include "gap.h"
#include <vector>
#include <algorithm>
#include <iostream>

using namespace std;
using ll = long long;

ll findGap(int t, int n) {
    ll l, r, x, y, ls;
    MinMax(0, 1'000000'000000'000000, &l, &r);
    ll ans = (r - l + n - 2) / (n - 1), d = ans;
    ls = l;
    for (int i = 0; i < n - 1; i++) {
        ll lp = l + 1 + d * i, rp = l + d * (i + 1);
        if (lp >= r)
            break;
        rp = min(rp, r);
        MinMax(lp, rp, &x, &y);
        if (y != -1) {
            ans = max(ans, x - ls);
            ls = y;
        }
    }
    ans = max(ans, r - ls);
	return ans;
}

Compilation message

fireworks.cpp:1:10: fatal error: gap.h: No such file or directory
 #include "gap.h"
          ^~~~~~~
compilation terminated.