# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
109321 |
2019-05-06T06:58:05 Z |
b2563125 |
Gap (APIO16_gap) |
C++14 |
|
81 ms |
1280 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, 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 |
2 ms |
396 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 |
3 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 |
2 ms |
384 KB |
Output isn't correct |
12 |
Incorrect |
2 ms |
384 KB |
Output isn't correct |
13 |
Incorrect |
2 ms |
384 KB |
Output isn't correct |
14 |
Incorrect |
2 ms |
384 KB |
Output isn't correct |
15 |
Incorrect |
6 ms |
384 KB |
Output isn't correct |
16 |
Incorrect |
14 ms |
512 KB |
Output isn't correct |
17 |
Incorrect |
14 ms |
512 KB |
Output isn't correct |
18 |
Incorrect |
15 ms |
512 KB |
Output isn't correct |
19 |
Incorrect |
13 ms |
512 KB |
Output isn't correct |
20 |
Incorrect |
11 ms |
512 KB |
Output isn't correct |
21 |
Incorrect |
45 ms |
1236 KB |
Output isn't correct |
22 |
Incorrect |
45 ms |
1152 KB |
Output isn't correct |
23 |
Incorrect |
42 ms |
1272 KB |
Output isn't correct |
24 |
Incorrect |
43 ms |
1144 KB |
Output isn't correct |
25 |
Incorrect |
81 ms |
1160 KB |
Output isn't correct |
26 |
Incorrect |
47 ms |
1124 KB |
Output isn't correct |
27 |
Incorrect |
53 ms |
1144 KB |
Output isn't correct |
28 |
Incorrect |
40 ms |
1144 KB |
Output isn't correct |
29 |
Incorrect |
45 ms |
1144 KB |
Output isn't correct |
30 |
Incorrect |
45 ms |
1152 KB |
Output isn't correct |
31 |
Incorrect |
3 ms |
384 KB |
Output isn't correct |
32 |
Incorrect |
3 ms |
384 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
2 ms |
384 KB |
Partially correct |
2 |
Correct |
2 ms |
384 KB |
Output is correct |
3 |
Incorrect |
2 ms |
384 KB |
Output isn't correct |
4 |
Incorrect |
2 ms |
384 KB |
Output isn't correct |
5 |
Partially correct |
2 ms |
384 KB |
Partially correct |
6 |
Incorrect |
2 ms |
384 KB |
Output isn't correct |
7 |
Incorrect |
3 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 |
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 |
5 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 |
14 ms |
512 KB |
Output isn't correct |
17 |
Incorrect |
12 ms |
512 KB |
Output isn't correct |
18 |
Incorrect |
15 ms |
512 KB |
Output isn't correct |
19 |
Incorrect |
14 ms |
512 KB |
Output isn't correct |
20 |
Partially correct |
10 ms |
512 KB |
Partially correct |
21 |
Incorrect |
49 ms |
1144 KB |
Output isn't correct |
22 |
Incorrect |
50 ms |
1272 KB |
Output isn't correct |
23 |
Incorrect |
57 ms |
1152 KB |
Output isn't correct |
24 |
Incorrect |
50 ms |
1144 KB |
Output isn't correct |
25 |
Partially correct |
64 ms |
1280 KB |
Partially correct |
26 |
Incorrect |
55 ms |
1144 KB |
Output isn't correct |
27 |
Incorrect |
48 ms |
1164 KB |
Output isn't correct |
28 |
Incorrect |
50 ms |
1240 KB |
Output isn't correct |
29 |
Incorrect |
52 ms |
1152 KB |
Output isn't correct |
30 |
Partially correct |
38 ms |
1280 KB |
Partially correct |
31 |
Incorrect |
2 ms |
384 KB |
Output isn't correct |
32 |
Incorrect |
3 ms |
384 KB |
Output isn't correct |