답안 #1090303

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1090303 2024-09-18T08:15:11 Z Alihan_8 Gap (APIO16_gap) C++17
0 / 100
48 ms 2852 KB
#include "gap.h"

#include <bits/stdc++.h>

using namespace std;

using i64 = long long;

pair <i64,i64> qry(i64 s, i64 t){
	i64 mn, mx;
	
	MinMax(s, t, &mn, &mx);
	
	return {mn, mx};
}

long long findGap(int T, int n){
	auto [mn, mx] = qry(0, (i64)1e18);
	
	i64 lb = (mx - mn) / (n - 1), opt = lb;
	
	i64 pv = mn, j = mn + 1;
	
	while ( j <= mx ){
		auto [l, r] = qry(j, j + lb - 1);
		
		if ( l != -1 ){
			opt = max(opt, l - pv);
		}
		
		pv = r;
		j += lb;
	}
	
	return opt;
}
# 결과 실행 시간 메모리 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 1 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 1 ms 2392 KB Output isn't correct
15 Incorrect 1 ms 2392 KB Output isn't correct
16 Incorrect 9 ms 2392 KB Output isn't correct
17 Incorrect 9 ms 2392 KB Output isn't correct
18 Incorrect 9 ms 2392 KB Output isn't correct
19 Incorrect 13 ms 2392 KB Output isn't correct
20 Incorrect 5 ms 2392 KB Output isn't correct
21 Incorrect 48 ms 2648 KB Output isn't correct
22 Incorrect 37 ms 2648 KB Output isn't correct
23 Incorrect 47 ms 2648 KB Output isn't correct
24 Incorrect 36 ms 2808 KB Output isn't correct
25 Incorrect 36 ms 2648 KB Output isn't correct
26 Incorrect 37 ms 2840 KB Output isn't correct
27 Incorrect 37 ms 2648 KB Output isn't correct
28 Incorrect 39 ms 2648 KB Output isn't correct
29 Incorrect 45 ms 2840 KB Output isn't correct
30 Incorrect 23 ms 2648 KB Output isn't correct
31 Incorrect 1 ms 2392 KB Output isn't correct
32 Incorrect 0 ms 2392 KB Output isn't correct
# 결과 실행 시간 메모리 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 1 ms 2392 KB Output isn't correct
5 Correct 1 ms 2392 KB Output is correct
6 Incorrect 1 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 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 2 ms 2392 KB Output isn't correct
13 Incorrect 1 ms 2392 KB Output isn't correct
14 Incorrect 1 ms 2504 KB Output isn't correct
15 Correct 1 ms 2392 KB Output is correct
16 Incorrect 9 ms 2392 KB Output isn't correct
17 Incorrect 9 ms 2392 KB Output isn't correct
18 Incorrect 9 ms 2392 KB Output isn't correct
19 Incorrect 9 ms 2392 KB Output isn't correct
20 Incorrect 5 ms 2392 KB Output isn't correct
21 Incorrect 37 ms 992 KB Output isn't correct
22 Incorrect 36 ms 2648 KB Output isn't correct
23 Incorrect 35 ms 2852 KB Output isn't correct
24 Incorrect 38 ms 2648 KB Output isn't correct
25 Correct 34 ms 2648 KB Output is correct
26 Incorrect 36 ms 2648 KB Output isn't correct
27 Incorrect 36 ms 2648 KB Output isn't correct
28 Incorrect 34 ms 2648 KB Output isn't correct
29 Incorrect 36 ms 2648 KB Output isn't correct
30 Incorrect 24 ms 2652 KB Output isn't correct
31 Incorrect 0 ms 2392 KB Output isn't correct
32 Incorrect 1 ms 2392 KB Output isn't correct