Submission #109309

# Submission time Handle Problem Language Result Execution time Memory
109309 2019-05-06T06:37:45 Z b2563125 Gap (APIO16_gap) C++14
0 / 100
90 ms 1272 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, 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, a1 + (X*(i + 1)) / 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 2 ms 256 KB Output isn't correct
2 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
3 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
4 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
5 Incorrect 2 ms 384 KB Output isn't correct
6 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
7 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
8 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
9 Runtime error 3 ms 384 KB Execution failed because the return code was nonzero
10 Incorrect 2 ms 384 KB Output isn't correct
11 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
12 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
13 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
14 Runtime error 4 ms 384 KB Execution failed because the return code was nonzero
15 Incorrect 3 ms 384 KB Output isn't correct
16 Runtime error 9 ms 640 KB Execution failed because the return code was nonzero
17 Runtime error 8 ms 624 KB Execution failed because the return code was nonzero
18 Runtime error 11 ms 640 KB Execution failed because the return code was nonzero
19 Runtime error 9 ms 640 KB Execution failed because the return code was nonzero
20 Incorrect 9 ms 512 KB Output isn't correct
21 Runtime error 26 ms 1144 KB Execution failed because the return code was nonzero
22 Runtime error 27 ms 1144 KB Execution failed because the return code was nonzero
23 Runtime error 27 ms 1216 KB Execution failed because the return code was nonzero
24 Runtime error 32 ms 1144 KB Execution failed because the return code was nonzero
25 Incorrect 90 ms 1148 KB Output isn't correct
26 Runtime error 27 ms 1152 KB Execution failed because the return code was nonzero
27 Runtime error 39 ms 1144 KB Execution failed because the return code was nonzero
28 Runtime error 29 ms 1144 KB Execution failed because the return code was nonzero
29 Runtime error 25 ms 1272 KB Execution failed because the return code was nonzero
30 Incorrect 39 ms 1152 KB Output isn't correct
31 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
32 Runtime error 3 ms 384 KB Execution failed because the return code was nonzero
# Verdict Execution time Memory Grader output
1 Partially correct 2 ms 256 KB Partially correct
2 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
3 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
4 Runtime error 3 ms 384 KB Execution failed because the return code was nonzero
5 Partially correct 2 ms 384 KB Partially correct
6 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
7 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
8 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
9 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
10 Partially correct 3 ms 384 KB Partially correct
11 Runtime error 3 ms 384 KB Execution failed because the return code was nonzero
12 Runtime error 7 ms 384 KB Execution failed because the return code was nonzero
13 Runtime error 3 ms 384 KB Execution failed because the return code was nonzero
14 Runtime error 3 ms 384 KB Execution failed because the return code was nonzero
15 Partially correct 3 ms 384 KB Partially correct
16 Runtime error 9 ms 700 KB Execution failed because the return code was nonzero
17 Runtime error 9 ms 640 KB Execution failed because the return code was nonzero
18 Runtime error 8 ms 640 KB Execution failed because the return code was nonzero
19 Runtime error 8 ms 640 KB Execution failed because the return code was nonzero
20 Partially correct 9 ms 512 KB Partially correct
21 Runtime error 30 ms 1152 KB Execution failed because the return code was nonzero
22 Runtime error 26 ms 1272 KB Execution failed because the return code was nonzero
23 Runtime error 28 ms 1152 KB Execution failed because the return code was nonzero
24 Runtime error 26 ms 1144 KB Execution failed because the return code was nonzero
25 Partially correct 74 ms 1144 KB Partially correct
26 Runtime error 26 ms 1144 KB Execution failed because the return code was nonzero
27 Runtime error 24 ms 1152 KB Execution failed because the return code was nonzero
28 Runtime error 30 ms 1144 KB Execution failed because the return code was nonzero
29 Runtime error 31 ms 1232 KB Execution failed because the return code was nonzero
30 Partially correct 39 ms 1152 KB Partially correct
31 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
32 Runtime error 2 ms 356 KB Execution failed because the return code was nonzero