Submission #109324

# Submission time Handle Problem Language Result Execution time Memory
109324 2019-05-06T07:05:26 Z b2563125 Gap (APIO16_gap) C++14
0 / 100
85 ms 1280 KB
#include<iostream>
#include<algorithm>
#include<vector>
#include "gap.h"
using namespace std;
#define vel vector<long long>
#define ll long long
#define rep(i,n) for(__int128 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) {
	__int128 N = n;
	long long a1; long long an;
	long long INF = pr - 7;
	INF *= INF;
	MinMax(0, INF, &a1, &an);
	__int128 X = an - a1 + 1;
	long long now_min = a1;
	long long ans = 0;
	N--;
	rep(i, n) {
		long long mn, mx;
		__int128 j = i;
		j++;
		__int128 n1 = (X*i) / N;
		__int128 n2 = (X*j) / N;
		ll q1 = a1 + n1;
		ll q2 = a1 + n2;
		MinMax(q1,q2, &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 384 KB Output isn't correct
2 Incorrect 2 ms 384 KB Output isn't correct
3 Incorrect 2 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 3 ms 300 KB Output isn't correct
7 Incorrect 2 ms 384 KB Output isn't correct
8 Incorrect 3 ms 432 KB Output isn't correct
9 Incorrect 3 ms 384 KB Output isn't correct
10 Incorrect 5 ms 384 KB Output isn't correct
11 Incorrect 9 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 4 ms 384 KB Output isn't correct
15 Incorrect 4 ms 384 KB Output isn't correct
16 Incorrect 21 ms 512 KB Output isn't correct
17 Incorrect 22 ms 512 KB Output isn't correct
18 Incorrect 20 ms 512 KB Output isn't correct
19 Incorrect 20 ms 616 KB Output isn't correct
20 Incorrect 5 ms 512 KB Output isn't correct
21 Incorrect 69 ms 1144 KB Output isn't correct
22 Incorrect 77 ms 1156 KB Output isn't correct
23 Incorrect 85 ms 1116 KB Output isn't correct
24 Incorrect 75 ms 1164 KB Output isn't correct
25 Incorrect 59 ms 1124 KB Output isn't correct
26 Incorrect 75 ms 1196 KB Output isn't correct
27 Incorrect 67 ms 1152 KB Output isn't correct
28 Incorrect 71 ms 1192 KB Output isn't correct
29 Incorrect 80 ms 1144 KB Output isn't correct
30 Incorrect 39 ms 1280 KB Output isn't correct
31 Incorrect 2 ms 384 KB Output isn't correct
32 Incorrect 3 ms 384 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 384 KB Output isn't correct
2 Partially correct 2 ms 384 KB Partially correct
3 Partially correct 4 ms 356 KB Partially correct
4 Partially correct 2 ms 348 KB Partially correct
5 Incorrect 2 ms 384 KB Output isn't correct
6 Partially correct 3 ms 384 KB Partially correct
7 Partially correct 2 ms 384 KB Partially correct
8 Partially correct 2 ms 384 KB Partially correct
9 Partially correct 2 ms 384 KB Partially correct
10 Partially correct 2 ms 384 KB Partially correct
11 Partially correct 3 ms 384 KB Partially correct
12 Partially correct 3 ms 384 KB Partially correct
13 Partially correct 3 ms 384 KB Partially correct
14 Partially correct 3 ms 384 KB Partially correct
15 Incorrect 2 ms 384 KB Output isn't correct
16 Partially correct 17 ms 512 KB Partially correct
17 Partially correct 18 ms 512 KB Partially correct
18 Partially correct 19 ms 512 KB Partially correct
19 Partially correct 20 ms 576 KB Partially correct
20 Partially correct 13 ms 512 KB Partially correct
21 Partially correct 67 ms 1196 KB Partially correct
22 Partially correct 64 ms 1152 KB Partially correct
23 Partially correct 65 ms 1144 KB Partially correct
24 Partially correct 81 ms 1144 KB Partially correct
25 Incorrect 62 ms 1152 KB Output isn't correct
26 Partially correct 85 ms 1144 KB Partially correct
27 Partially correct 74 ms 1144 KB Partially correct
28 Partially correct 79 ms 1272 KB Partially correct
29 Partially correct 77 ms 1272 KB Partially correct
30 Partially correct 39 ms 1152 KB Partially correct
31 Partially correct 2 ms 384 KB Partially correct
32 Partially correct 2 ms 384 KB Partially correct