Submission #1027377

# Submission time Handle Problem Language Result Execution time Memory
1027377 2024-07-19T05:27:45 Z Muhammet Gap (APIO16_gap) C++17
0 / 100
32 ms 4428 KB
#include <bits/stdc++.h>
#include "gap.h"

#define ll long long
#define sz(s) (int)s.size()

using namespace std;

long long findGap(int T, int n){
	vector <ll> v, v1;
	for(int i = 0; i < (n+1)/2; i++){
		ll s, t, mn, mx;
		if(i == 0) s = 0, t = 1e18;
		else s = v.back(), t = v1.back();
		MinMax(s, t, &mn, &mx);
		v.push_back(mn);
		v1.push_back(mx);
	}
	if(v.back() == v1.back()) v1.pop_back();
	while(sz(v1) > 0){
		v.push_back(v1.back());
		v1.pop_back();
	}
	ll ans = 0;
	for(int i = 0; i < n-1; i++){
		ans = max(ans, v[i+1]-v[i]);
	}
	return ans;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is 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 1 ms 2392 KB Output isn't correct
6 Incorrect 0 ms 2392 KB Output isn't correct
7 Incorrect 1 ms 2392 KB Output isn't correct
8 Incorrect 1 ms 2436 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 1 ms 2392 KB Output isn't correct
15 Incorrect 1 ms 2392 KB Output isn't correct
16 Incorrect 5 ms 2904 KB Output isn't correct
17 Incorrect 5 ms 2992 KB Output isn't correct
18 Incorrect 5 ms 2904 KB Output isn't correct
19 Incorrect 5 ms 2904 KB Output isn't correct
20 Incorrect 5 ms 3156 KB Output isn't correct
21 Incorrect 20 ms 4280 KB Output isn't correct
22 Incorrect 19 ms 4220 KB Output isn't correct
23 Incorrect 19 ms 4212 KB Output isn't correct
24 Incorrect 24 ms 4324 KB Output isn't correct
25 Incorrect 23 ms 4220 KB Output isn't correct
26 Incorrect 23 ms 4428 KB Output isn't correct
27 Incorrect 19 ms 4220 KB Output isn't correct
28 Incorrect 19 ms 4216 KB Output isn't correct
29 Incorrect 19 ms 4220 KB Output isn't correct
30 Incorrect 14 ms 4220 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
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2392 KB Output is 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 0 ms 2392 KB Output isn't correct
6 Incorrect 0 ms 2392 KB Output isn't correct
7 Incorrect 1 ms 2392 KB Output isn't correct
8 Incorrect 0 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 0 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 3040 KB Output isn't correct
17 Incorrect 7 ms 2904 KB Output isn't correct
18 Incorrect 5 ms 2904 KB Output isn't correct
19 Incorrect 5 ms 2904 KB Output isn't correct
20 Incorrect 4 ms 2916 KB Output isn't correct
21 Incorrect 24 ms 4220 KB Expected int32, but "5000050000" found
22 Incorrect 19 ms 4212 KB Expected int32, but "5000050000" found
23 Incorrect 19 ms 4220 KB Expected int32, but "5000050000" found
24 Incorrect 18 ms 4220 KB Expected int32, but "5000050000" found
25 Incorrect 16 ms 4220 KB Expected int32, but "5000050000" found
26 Incorrect 32 ms 4256 KB Expected int32, but "5000050000" found
27 Incorrect 19 ms 4220 KB Expected int32, but "5000050000" found
28 Incorrect 20 ms 4416 KB Expected int32, but "5000050000" found
29 Incorrect 20 ms 4220 KB Expected int32, but "5000050000" found
30 Incorrect 14 ms 4220 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