답안 #289012

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
289012 2020-09-02T09:30:57 Z shrek12357 Gap (APIO16_gap) C++14
0 / 100
34 ms 1152 KB
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <climits>
#include <cmath>
#include <fstream>
#include <queue>
#include "gap.h"
using namespace std;
 
long long findGap(int t, int n) {
	if (t != 3) {
		return 0;
	}
	long long max = 1e18 + 5;
	long long pre = 0;
	long long ans = 0;
	for (int i = 0; i < n; i++) {
		long long mn, mx;
		MinMax(0, max, &mn, &mx);
		if (i == 0) {
			pre = mx;
			max = mx - 1;
		}
		else {
			if (pre - mx > ans) {
				ans = pre - mx;
			}
			pre = mx;
			max = mx - 1;
		}
	}
	return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 256 KB Output isn't correct
2 Incorrect 0 ms 384 KB Output isn't correct
3 Incorrect 0 ms 384 KB Output isn't correct
4 Incorrect 0 ms 384 KB Output isn't correct
5 Incorrect 0 ms 384 KB Output isn't correct
6 Incorrect 0 ms 384 KB Output isn't correct
7 Incorrect 0 ms 384 KB Output isn't correct
8 Incorrect 0 ms 384 KB Output isn't correct
9 Incorrect 0 ms 384 KB Output isn't correct
10 Incorrect 1 ms 384 KB Output isn't correct
11 Incorrect 1 ms 384 KB Output isn't correct
12 Incorrect 1 ms 384 KB Output isn't correct
13 Incorrect 1 ms 384 KB Output isn't correct
14 Incorrect 1 ms 384 KB Output isn't correct
15 Incorrect 1 ms 384 KB Output isn't correct
16 Incorrect 8 ms 512 KB Output isn't correct
17 Incorrect 10 ms 512 KB Output isn't correct
18 Incorrect 8 ms 512 KB Output isn't correct
19 Incorrect 10 ms 512 KB Output isn't correct
20 Incorrect 5 ms 512 KB Output isn't correct
21 Incorrect 32 ms 1092 KB Output isn't correct
22 Incorrect 31 ms 1144 KB Output isn't correct
23 Incorrect 30 ms 1144 KB Output isn't correct
24 Incorrect 31 ms 1144 KB Output isn't correct
25 Incorrect 23 ms 1144 KB Output isn't correct
26 Incorrect 31 ms 1144 KB Output isn't correct
27 Incorrect 29 ms 1144 KB Output isn't correct
28 Incorrect 34 ms 1148 KB Output isn't correct
29 Incorrect 31 ms 1136 KB Output isn't correct
30 Incorrect 15 ms 1152 KB Output isn't correct
31 Incorrect 0 ms 384 KB Output isn't correct
32 Incorrect 1 ms 384 KB Output isn't correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 256 KB Output isn't correct
2 Incorrect 0 ms 384 KB Output isn't correct
3 Incorrect 0 ms 384 KB Output isn't correct
4 Incorrect 1 ms 384 KB Output isn't correct
5 Incorrect 0 ms 384 KB Output isn't correct
6 Incorrect 1 ms 384 KB Output isn't correct
7 Incorrect 0 ms 384 KB Output isn't correct
8 Incorrect 1 ms 384 KB Output isn't correct
9 Incorrect 0 ms 384 KB Output isn't correct
10 Incorrect 0 ms 384 KB Output isn't correct
11 Incorrect 1 ms 384 KB Output isn't correct
12 Incorrect 1 ms 384 KB Output isn't correct
13 Incorrect 1 ms 384 KB Output isn't correct
14 Incorrect 1 ms 384 KB Output isn't correct
15 Incorrect 1 ms 384 KB Output isn't correct
16 Incorrect 8 ms 512 KB Output isn't correct
17 Incorrect 8 ms 512 KB Output isn't correct
18 Incorrect 10 ms 512 KB Output isn't correct
19 Incorrect 8 ms 512 KB Output isn't correct
20 Incorrect 5 ms 512 KB Output isn't correct
21 Incorrect 30 ms 1144 KB Output isn't correct
22 Incorrect 30 ms 1152 KB Output isn't correct
23 Incorrect 29 ms 1144 KB Output isn't correct
24 Incorrect 30 ms 1144 KB Output isn't correct
25 Incorrect 22 ms 1152 KB Output isn't correct
26 Incorrect 30 ms 1144 KB Output isn't correct
27 Incorrect 30 ms 1144 KB Output isn't correct
28 Incorrect 30 ms 1144 KB Output isn't correct
29 Incorrect 32 ms 1076 KB Output isn't correct
30 Incorrect 16 ms 1152 KB Output isn't correct
31 Incorrect 1 ms 384 KB Output isn't correct
32 Incorrect 1 ms 384 KB Output isn't correct