# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
109323 |
2019-05-06T07:03:30 Z |
b2563125 |
Gap (APIO16_gap) |
C++14 |
|
76 ms |
1272 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;
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 |
2 ms |
256 KB |
Output isn't correct |
2 |
Incorrect |
3 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 |
256 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 |
20 ms |
512 KB |
Output isn't correct |
17 |
Incorrect |
21 ms |
512 KB |
Output isn't correct |
18 |
Incorrect |
19 ms |
512 KB |
Output isn't correct |
19 |
Incorrect |
18 ms |
512 KB |
Output isn't correct |
20 |
Incorrect |
9 ms |
512 KB |
Output isn't correct |
21 |
Incorrect |
70 ms |
1144 KB |
Output isn't correct |
22 |
Incorrect |
67 ms |
1272 KB |
Output isn't correct |
23 |
Incorrect |
75 ms |
1192 KB |
Output isn't correct |
24 |
Incorrect |
76 ms |
1144 KB |
Output isn't correct |
25 |
Incorrect |
66 ms |
1152 KB |
Output isn't correct |
26 |
Incorrect |
73 ms |
1116 KB |
Output isn't correct |
27 |
Incorrect |
73 ms |
1144 KB |
Output isn't correct |
28 |
Incorrect |
73 ms |
1144 KB |
Output isn't correct |
29 |
Incorrect |
73 ms |
1144 KB |
Output isn't correct |
30 |
Incorrect |
40 ms |
1100 KB |
Output isn't correct |
31 |
Incorrect |
2 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 |
Partially correct |
3 ms |
384 KB |
Partially correct |
3 |
Partially correct |
2 ms |
384 KB |
Partially correct |
4 |
Partially correct |
2 ms |
384 KB |
Partially correct |
5 |
Partially correct |
2 ms |
384 KB |
Partially correct |
6 |
Partially correct |
2 ms |
384 KB |
Partially correct |
7 |
Partially correct |
2 ms |
384 KB |
Partially correct |
8 |
Partially correct |
3 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 |
512 KB |
Partially correct |
13 |
Partially correct |
3 ms |
384 KB |
Partially correct |
14 |
Partially correct |
2 ms |
384 KB |
Partially correct |
15 |
Partially correct |
2 ms |
384 KB |
Partially correct |
16 |
Partially correct |
18 ms |
512 KB |
Partially correct |
17 |
Partially correct |
22 ms |
512 KB |
Partially correct |
18 |
Partially correct |
27 ms |
512 KB |
Partially correct |
19 |
Partially correct |
18 ms |
540 KB |
Partially correct |
20 |
Partially correct |
11 ms |
512 KB |
Partially correct |
21 |
Partially correct |
72 ms |
1144 KB |
Partially correct |
22 |
Partially correct |
67 ms |
1244 KB |
Partially correct |
23 |
Partially correct |
72 ms |
1152 KB |
Partially correct |
24 |
Partially correct |
75 ms |
1156 KB |
Partially correct |
25 |
Partially correct |
61 ms |
1196 KB |
Partially correct |
26 |
Partially correct |
68 ms |
1148 KB |
Partially correct |
27 |
Partially correct |
71 ms |
1144 KB |
Partially correct |
28 |
Partially correct |
71 ms |
1196 KB |
Partially correct |
29 |
Partially correct |
76 ms |
1152 KB |
Partially correct |
30 |
Partially correct |
51 ms |
1152 KB |
Partially correct |
31 |
Partially correct |
2 ms |
384 KB |
Partially correct |
32 |
Partially correct |
3 ms |
384 KB |
Partially correct |