Submission #109320

# Submission time Handle Problem Language Result Execution time Memory
109320 2019-05-06T06:57:29 Z b2563125 Gap (APIO16_gap) C++14
0 / 100
71 ms 1400 KB
#include<iostream>
#include<algorithm>
#include<vector>
#include "gap.h"
using namespace std;
#define vel vector<long long>
#define rep(i,n) for(long long i=0;i<n;i++)
int pr = 1000000007;
int ref(int &a) {
	a = a % pr;
	a += pr;
	a = a % pr;
	return a;
}
long long findGap(int t, int n) {
	long long N = n;
	long long a1; long long an;
	long long INF = pr - 7;
	INF *= INF;
	MinMax(0, max(INF,INF-INF), &a1, &an);
	long long X = an - a1 + 1;
	long long now_min = a1;
	long long ans = 0;
	rep(i, n) {
		long long mn, mx;
		MinMax(a1 + (X*i) / N, max(a1 + (X*(i + 1)) / N, a1 + (X*i) / N), &mn, &mx);
		if (mn != -1) {
			ans = max(mn - now_min, ans);
			now_min = mx;
		}
	}
	return ans;
}
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 256 KB Output isn't correct
2 Incorrect 2 ms 384 KB Output isn't correct
3 Incorrect 3 ms 384 KB Output isn't correct
4 Incorrect 3 ms 384 KB Output isn't correct
5 Incorrect 2 ms 384 KB Output isn't correct
6 Incorrect 2 ms 384 KB Output isn't correct
7 Incorrect 2 ms 384 KB Output isn't correct
8 Incorrect 2 ms 384 KB Output isn't correct
9 Incorrect 2 ms 384 KB Output isn't correct
10 Incorrect 2 ms 384 KB Output isn't correct
11 Incorrect 3 ms 384 KB Output isn't correct
12 Incorrect 3 ms 384 KB Output isn't correct
13 Incorrect 3 ms 384 KB Output isn't correct
14 Incorrect 3 ms 384 KB Output isn't correct
15 Incorrect 3 ms 384 KB Output isn't correct
16 Incorrect 15 ms 776 KB Output isn't correct
17 Incorrect 14 ms 768 KB Output isn't correct
18 Incorrect 16 ms 896 KB Output isn't correct
19 Incorrect 15 ms 668 KB Output isn't correct
20 Incorrect 9 ms 512 KB Output isn't correct
21 Incorrect 57 ms 1240 KB Output isn't correct
22 Incorrect 71 ms 1272 KB Output isn't correct
23 Incorrect 62 ms 1272 KB Output isn't correct
24 Incorrect 46 ms 1276 KB Output isn't correct
25 Incorrect 61 ms 1272 KB Output isn't correct
26 Incorrect 48 ms 1280 KB Output isn't correct
27 Incorrect 44 ms 1272 KB Output isn't correct
28 Incorrect 43 ms 1304 KB Output isn't correct
29 Incorrect 50 ms 1272 KB Output isn't correct
30 Incorrect 40 ms 1272 KB Output isn't correct
31 Incorrect 3 ms 384 KB Output isn't correct
32 Incorrect 2 ms 384 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Partially correct 2 ms 256 KB Partially correct
2 Correct 2 ms 384 KB Output is correct
3 Incorrect 3 ms 384 KB Output isn't correct
4 Incorrect 2 ms 384 KB Output isn't correct
5 Partially correct 3 ms 384 KB Partially correct
6 Incorrect 2 ms 512 KB Output isn't correct
7 Incorrect 2 ms 384 KB Output isn't correct
8 Incorrect 2 ms 384 KB Output isn't correct
9 Incorrect 3 ms 384 KB Output isn't correct
10 Partially correct 2 ms 384 KB Partially correct
11 Incorrect 3 ms 384 KB Output isn't correct
12 Incorrect 3 ms 384 KB Output isn't correct
13 Incorrect 3 ms 384 KB Output isn't correct
14 Incorrect 3 ms 384 KB Output isn't correct
15 Partially correct 4 ms 384 KB Partially correct
16 Incorrect 15 ms 768 KB Output isn't correct
17 Incorrect 15 ms 768 KB Output isn't correct
18 Incorrect 14 ms 768 KB Output isn't correct
19 Incorrect 15 ms 768 KB Output isn't correct
20 Partially correct 10 ms 512 KB Partially correct
21 Incorrect 48 ms 1324 KB Output isn't correct
22 Incorrect 46 ms 1272 KB Output isn't correct
23 Incorrect 71 ms 1244 KB Output isn't correct
24 Incorrect 52 ms 1280 KB Output isn't correct
25 Partially correct 62 ms 1152 KB Partially correct
26 Incorrect 55 ms 1272 KB Output isn't correct
27 Incorrect 51 ms 1348 KB Output isn't correct
28 Incorrect 64 ms 1400 KB Output isn't correct
29 Incorrect 46 ms 1272 KB Output isn't correct
30 Partially correct 39 ms 1048 KB Partially correct
31 Incorrect 2 ms 384 KB Output isn't correct
32 Incorrect 2 ms 384 KB Output isn't correct