Submission #555023

# Submission time Handle Problem Language Result Execution time Memory
555023 2022-04-30T02:16:02 Z kwongweng Boat (APIO16_boat) C++17
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>
#include "gap.h"
using namespace std;
 
#pragma GCC target ("avx2")
#pragma GCC optimization ("Ofast")
#pragma GCC optimization ("unroll-loops")
 
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef long double ld;
typedef pair<ll, ll> pll;
#define FOR(i, a, b) for(int i = a; i < b; i++)
#define ROF(i, a, b) for(int i = a; i >= b; i--)
#define ms memset
#define pb push_back
#define fi first
#define se second
 
ll MOD = 1000000007;
 
ll power(ll base, ll n){
	if (n == 0) return 1;
	if (n == 1) return base;
	ll halfn = power(base, n/2);
	if (n % 2 == 0) return (halfn * halfn) % MOD;
	return (((halfn * halfn) % MOD) * base) % MOD;
}
 
ll inverse(ll n){
	return power(n, MOD-2);
}
 
ll add(ll a, ll b){
	return (a+b) % MOD;
}
 
ll mul(ll a, ll b){
	a %= MOD;
	return (a*b) % MOD;
}
 
ll gcd(ll a, ll b){
    if (a == 1) return 1;
    if (a == 0) return b;
    return gcd(b%a, a);
}

ll INF = (MOD-7)*(MOD-7);
ll findGap(int t, int n){
	if (t == 1){
		vector<ll> a;
		ll L = 0, R = INF;
		FOR(i,0,(n+1)/2){
			ll mn, mx;
			MinMax(L,R,&mn,&mx);
			a.pb(mn); a.pb(mx);
			L = mn+1, R = mx-1;
		}
		sort(a.begin(), a.end());
		ll maxi = 0;
		FOR(i,1,a.size()){
			maxi = max(maxi, a[i]-a[i-1]);
		}
		return maxi;
	}
	return 0;
}

Compilation message

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