#include <bits/stdc++.h>
#include "gap.h"
#define pb push_back
#define eb emplace_back
#define sz(x) (int)x.size()
#define all(x) x.begin(), x.end()
#define uniq(x) x.erase(unique(all(x)), x.end())
#define rall(x) x.rbegin(), x.rend()
//#define int long long
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
const int mod = 1e9 + 7;
const int LOG = 20;
const int maxn = 1e5 + 5;
const double eps = 1e-9;
void setIO() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
}
ll findGap(int T, int n) {
vector<ll> v(n);
MinMax(0, 1e18, &v[0], &v[n-1]);
int i=1, j=n-2;
ll ans = 0;
while(i <= j) {
MinMax(v[i-1], v[j+1], &v[i], &v[j]);
ans = max(ans, v[i] - v[i-1]);
ans = max(ans, v[j+1] - v[j]);
i++, j--;
}
return ans;
}
// int32_t main() {
// setIO();
// //code starts here
// return 0;
// }
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
2 |
Incorrect |
1 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 |
0 ms |
2392 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 |
0 ms |
2392 KB |
Output isn't correct |
9 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
10 |
Incorrect |
1 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 |
2 ms |
2392 KB |
Output isn't correct |
15 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
16 |
Incorrect |
6 ms |
2580 KB |
Output isn't correct |
17 |
Incorrect |
5 ms |
2736 KB |
Output isn't correct |
18 |
Incorrect |
5 ms |
2836 KB |
Output isn't correct |
19 |
Incorrect |
5 ms |
2588 KB |
Output isn't correct |
20 |
Incorrect |
3 ms |
2572 KB |
Output isn't correct |
21 |
Incorrect |
19 ms |
3624 KB |
Output isn't correct |
22 |
Incorrect |
23 ms |
3624 KB |
Output isn't correct |
23 |
Incorrect |
18 ms |
3632 KB |
Output isn't correct |
24 |
Incorrect |
18 ms |
3628 KB |
Output isn't correct |
25 |
Incorrect |
15 ms |
3624 KB |
Output isn't correct |
26 |
Incorrect |
18 ms |
3624 KB |
Output isn't correct |
27 |
Incorrect |
22 ms |
3492 KB |
Output isn't correct |
28 |
Incorrect |
20 ms |
3620 KB |
Output isn't correct |
29 |
Incorrect |
18 ms |
3624 KB |
Output isn't correct |
30 |
Incorrect |
13 ms |
3616 KB |
Output isn't correct |
31 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
32 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
2392 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 |
0 ms |
2392 KB |
Output isn't correct |
5 |
Incorrect |
0 ms |
2392 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 |
0 ms |
2392 KB |
Output isn't correct |
10 |
Incorrect |
1 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 |
5 ms |
2724 KB |
Output isn't correct |
17 |
Incorrect |
7 ms |
2796 KB |
Output isn't correct |
18 |
Incorrect |
5 ms |
2584 KB |
Output isn't correct |
19 |
Incorrect |
5 ms |
2580 KB |
Output isn't correct |
20 |
Incorrect |
4 ms |
2572 KB |
Output isn't correct |
21 |
Incorrect |
18 ms |
3624 KB |
Expected int32, but "5000050000" found |
22 |
Incorrect |
18 ms |
3620 KB |
Expected int32, but "5000050000" found |
23 |
Incorrect |
18 ms |
3624 KB |
Expected int32, but "5000050000" found |
24 |
Incorrect |
18 ms |
3628 KB |
Expected int32, but "5000050000" found |
25 |
Incorrect |
16 ms |
3616 KB |
Expected int32, but "5000050000" found |
26 |
Incorrect |
25 ms |
3620 KB |
Expected int32, but "5000050000" found |
27 |
Incorrect |
20 ms |
3632 KB |
Expected int32, but "5000050000" found |
28 |
Incorrect |
19 ms |
3576 KB |
Expected int32, but "5000050000" found |
29 |
Incorrect |
18 ms |
3624 KB |
Expected int32, but "5000050000" found |
30 |
Incorrect |
14 ms |
3616 KB |
Expected int32, but "5000050000" found |
31 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
32 |
Incorrect |
0 ms |
2392 KB |
Output isn't correct |