Submission #205941

# Submission time Handle Problem Language Result Execution time Memory
205941 2020-03-01T11:00:20 Z MvC Gap (APIO16_gap) C++11
70 / 100
83 ms 3308 KB
//#pragma GCC optimize("O3")
//#pragma GCC optimize("unroll-loops")
#include "gap.h"
#include <bits/stdc++.h>
#define rc(x) return cout<<x<<endl,0
#define pb push_back
#define mkp make_pair
#define in insert
#define er erase
#define fd find
#define fr first
#define sc second
typedef long long ll;
typedef long double ld;
const ll INF=0x3f3f3f3f3f3f3f3f;
const ll llinf=(1LL<<62);
const int inf=(1<<30);
const int nmax=1e5+50;
const int mod=1e9+7;
using namespace std;
ll i;
ll n,mn,mx,lb,ub,x,rs,bl;
vector<pair<ll,ll> >vc;
ll findGap(int T,int N)
{
	n=N;
	MinMax(0,1e18,&lb,&ub);
	bl=(ub-lb+1)/(n-1)+1;
	for(i=0;i<n;i++)
	{
		MinMax(lb+bl*i+1,lb+bl*(i+1),&mn,&mx);
		if(mn!=-1)vc.pb(mkp(mn,mx)),rs=max(rs,mx-mn);
	}
	rs=vc[0].fr-lb;
	for(i=1;i<(int)vc.size();i++)rs=max(rs,vc[i].fr-vc[i-1].sc);
	return rs;
}
/*int main()
{
	//freopen("sol.in","r",stdin);
	//freopen("sol.out","w",stdout);
	//mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
	ios_base::sync_with_stdio(false);cin.tie(0);cerr.tie(0);cout.tie(0);
	
	return 0;
}*/
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 376 KB Output isn't correct
2 Incorrect 5 ms 248 KB Output isn't correct
3 Incorrect 5 ms 248 KB Output isn't correct
4 Incorrect 5 ms 248 KB Output isn't correct
5 Incorrect 5 ms 300 KB Output isn't correct
6 Incorrect 5 ms 376 KB Output isn't correct
7 Incorrect 5 ms 248 KB Output isn't correct
8 Incorrect 5 ms 376 KB Output isn't correct
9 Incorrect 4 ms 248 KB Output isn't correct
10 Incorrect 5 ms 252 KB Output isn't correct
11 Incorrect 5 ms 376 KB Output isn't correct
12 Incorrect 6 ms 376 KB Output isn't correct
13 Incorrect 6 ms 376 KB Output isn't correct
14 Incorrect 5 ms 376 KB Output isn't correct
15 Incorrect 5 ms 376 KB Output isn't correct
16 Incorrect 21 ms 888 KB Output isn't correct
17 Incorrect 24 ms 996 KB Output isn't correct
18 Incorrect 21 ms 888 KB Output isn't correct
19 Incorrect 20 ms 888 KB Output isn't correct
20 Incorrect 12 ms 504 KB Output isn't correct
21 Incorrect 77 ms 2288 KB Output isn't correct
22 Incorrect 83 ms 2288 KB Output isn't correct
23 Incorrect 72 ms 2288 KB Output isn't correct
24 Incorrect 72 ms 2288 KB Output isn't correct
25 Incorrect 71 ms 3288 KB Output isn't correct
26 Incorrect 72 ms 2288 KB Output isn't correct
27 Incorrect 78 ms 2288 KB Output isn't correct
28 Incorrect 72 ms 2288 KB Output isn't correct
29 Incorrect 72 ms 2288 KB Output isn't correct
30 Incorrect 39 ms 1400 KB Output isn't correct
31 Incorrect 5 ms 248 KB Output isn't correct
32 Incorrect 5 ms 248 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 248 KB Output is correct
2 Correct 5 ms 248 KB Output is correct
3 Correct 4 ms 248 KB Output is correct
4 Correct 5 ms 248 KB Output is correct
5 Correct 5 ms 248 KB Output is correct
6 Correct 5 ms 376 KB Output is correct
7 Correct 5 ms 248 KB Output is correct
8 Correct 5 ms 304 KB Output is correct
9 Correct 5 ms 376 KB Output is correct
10 Correct 5 ms 248 KB Output is correct
11 Correct 5 ms 376 KB Output is correct
12 Correct 6 ms 376 KB Output is correct
13 Correct 6 ms 376 KB Output is correct
14 Correct 6 ms 376 KB Output is correct
15 Correct 5 ms 376 KB Output is correct
16 Correct 24 ms 888 KB Output is correct
17 Correct 21 ms 888 KB Output is correct
18 Correct 21 ms 888 KB Output is correct
19 Correct 21 ms 888 KB Output is correct
20 Correct 12 ms 504 KB Output is correct
21 Correct 72 ms 2288 KB Output is correct
22 Correct 72 ms 2196 KB Output is correct
23 Correct 79 ms 2476 KB Output is correct
24 Correct 73 ms 2288 KB Output is correct
25 Correct 66 ms 3308 KB Output is correct
26 Correct 72 ms 2220 KB Output is correct
27 Correct 73 ms 2284 KB Output is correct
28 Correct 74 ms 2284 KB Output is correct
29 Correct 75 ms 2288 KB Output is correct
30 Correct 40 ms 1464 KB Output is correct
31 Correct 5 ms 248 KB Output is correct
32 Correct 5 ms 504 KB Output is correct