#include"gap.h"
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
typedef long long ll;
ll find_gap1(int n){
vector<ll>vec1,vec2;
ll l=0,r=1e18;
while(true){
MinMax(l,r,&l,&r);
if(l==r){
if(l!=-1)
vec1.push_back(l);
break;
}
vec1.push_back(l);
vec2.push_back(r);
l++;
r--;
}
reverse(vec2.begin(),vec2.end());
vec1.insert(vec1.end(),vec2.begin(),vec2.end());
ll res=1e18;
for(int i=1;i<n;i++)
res=min(res,vec1[i]-vec1[i-1]);
return res;
}
ll find_gap2(int n){
return 0;
}
ll findGap(int t,int n){
if(t==1){
return find_gap1(n);
}else{
return find_gap2(n);
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
2 |
Incorrect |
0 ms |
2392 KB |
Output isn't correct |
3 |
Incorrect |
0 ms |
2392 KB |
Output isn't correct |
4 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
5 |
Correct |
0 ms |
2392 KB |
Output is correct |
6 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
7 |
Incorrect |
0 ms |
2392 KB |
Output isn't correct |
8 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
9 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
10 |
Runtime error |
0 ms |
2392 KB |
Execution failed because the return code was nonzero |
11 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
12 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
13 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
14 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
15 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
16 |
Incorrect |
7 ms |
3096 KB |
Output isn't correct |
17 |
Incorrect |
9 ms |
3104 KB |
Output isn't correct |
18 |
Incorrect |
8 ms |
3100 KB |
Output isn't correct |
19 |
Incorrect |
8 ms |
3092 KB |
Output isn't correct |
20 |
Runtime error |
6 ms |
2828 KB |
Execution failed because the return code was nonzero |
21 |
Incorrect |
29 ms |
4384 KB |
Output isn't correct |
22 |
Incorrect |
29 ms |
4472 KB |
Output isn't correct |
23 |
Incorrect |
31 ms |
4428 KB |
Output isn't correct |
24 |
Incorrect |
32 ms |
4556 KB |
Output isn't correct |
25 |
Incorrect |
29 ms |
4416 KB |
Output isn't correct |
26 |
Incorrect |
28 ms |
4416 KB |
Output isn't correct |
27 |
Incorrect |
29 ms |
4420 KB |
Output isn't correct |
28 |
Incorrect |
29 ms |
4548 KB |
Output isn't correct |
29 |
Incorrect |
29 ms |
4556 KB |
Output isn't correct |
30 |
Runtime error |
23 ms |
3660 KB |
Execution failed because the return code was nonzero |
31 |
Runtime error |
1 ms |
2392 KB |
Execution failed because the return code was nonzero |
32 |
Runtime error |
0 ms |
2392 KB |
Execution failed because the return code was nonzero |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
2 |
Incorrect |
0 ms |
2392 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
4 |
Incorrect |
0 ms |
2392 KB |
Output isn't correct |
5 |
Incorrect |
1 ms |
2388 KB |
Output isn't correct |
6 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
7 |
Incorrect |
0 ms |
2392 KB |
Output isn't correct |
8 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
9 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
10 |
Incorrect |
0 ms |
2392 KB |
Output isn't correct |
11 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
12 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
13 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
14 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
15 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
16 |
Incorrect |
3 ms |
2752 KB |
Output isn't correct |
17 |
Incorrect |
4 ms |
2584 KB |
Output isn't correct |
18 |
Incorrect |
3 ms |
2584 KB |
Output isn't correct |
19 |
Incorrect |
3 ms |
2752 KB |
Output isn't correct |
20 |
Incorrect |
2 ms |
2572 KB |
Output isn't correct |
21 |
Incorrect |
15 ms |
2832 KB |
Output isn't correct |
22 |
Incorrect |
12 ms |
2856 KB |
Output isn't correct |
23 |
Incorrect |
12 ms |
2852 KB |
Output isn't correct |
24 |
Incorrect |
12 ms |
3016 KB |
Output isn't correct |
25 |
Incorrect |
10 ms |
2852 KB |
Output isn't correct |
26 |
Incorrect |
13 ms |
2856 KB |
Output isn't correct |
27 |
Incorrect |
13 ms |
2768 KB |
Output isn't correct |
28 |
Incorrect |
12 ms |
2852 KB |
Output isn't correct |
29 |
Incorrect |
12 ms |
2836 KB |
Output isn't correct |
30 |
Incorrect |
8 ms |
2848 KB |
Output isn't correct |
31 |
Incorrect |
0 ms |
2392 KB |
Output isn't correct |
32 |
Incorrect |
0 ms |
2392 KB |
Output isn't correct |