Submission #40770

# Submission time Handle Problem Language Result Execution time Memory
40770 2018-02-08T06:00:49 Z Just_Solve_The_Problem Gap (APIO16_gap) C++11
0 / 100
82 ms 2284 KB
#include <bits/stdc++.h>
#include <gap.h>
                               
long long findGap(int t, int n) {
		long long left;
		long long right;
		left = 0;
		right = 1e18;
		long long mn, mx;        
		long long vec[n];
		int cnt = 0;
		int cn = n - 1;
		while (mn != mx) {
			MinMax(left, right, &mn, &mx);
			vec[cnt++] = mn; 
			if (mn != mx)
				vec[cn--] = mx;
			left = mn + 1;
			right= mx - 1;	
		}                  
		long long ans = 0;
		for (int i = 1; i < n; i++) {         
			if (vec[i] - vec[i - 1] > ans) {
				ans = vec[i] - vec[i - 1];
			}
		}
		return ans;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 248 KB Output isn't correct
2 Correct 2 ms 480 KB Output is correct
3 Correct 1 ms 480 KB Output is correct
4 Correct 2 ms 496 KB Output is correct
5 Correct 2 ms 516 KB Output is correct
6 Incorrect 1 ms 516 KB Output isn't correct
7 Incorrect 1 ms 516 KB Output isn't correct
8 Incorrect 2 ms 516 KB Output isn't correct
9 Incorrect 2 ms 516 KB Output isn't correct
10 Runtime error 1 ms 516 KB Execution failed because the return code was nonzero
11 Incorrect 2 ms 516 KB Output isn't correct
12 Incorrect 2 ms 572 KB Output isn't correct
13 Incorrect 2 ms 588 KB Output isn't correct
14 Incorrect 2 ms 588 KB Output isn't correct
15 Incorrect 2 ms 588 KB Output isn't correct
16 Incorrect 16 ms 972 KB Output isn't correct
17 Incorrect 19 ms 972 KB Output isn't correct
18 Incorrect 15 ms 972 KB Output isn't correct
19 Incorrect 15 ms 1004 KB Output isn't correct
20 Runtime error 12 ms 1004 KB Execution failed because the return code was nonzero
21 Incorrect 54 ms 2156 KB Output isn't correct
22 Incorrect 54 ms 2160 KB Output isn't correct
23 Incorrect 75 ms 2160 KB Output isn't correct
24 Incorrect 55 ms 2160 KB Output isn't correct
25 Incorrect 47 ms 2160 KB Output isn't correct
26 Incorrect 82 ms 2160 KB Output isn't correct
27 Incorrect 63 ms 2160 KB Output isn't correct
28 Incorrect 60 ms 2160 KB Output isn't correct
29 Incorrect 54 ms 2284 KB Output isn't correct
30 Runtime error 42 ms 2284 KB Execution failed because the return code was nonzero
31 Runtime error 2 ms 2284 KB Execution failed because the return code was nonzero
32 Runtime error 2 ms 2284 KB Execution failed because the return code was nonzero
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2284 KB Output isn't correct
2 Partially correct 1 ms 2284 KB Partially correct
3 Partially correct 1 ms 2284 KB Partially correct
4 Partially correct 1 ms 2284 KB Partially correct
5 Partially correct 2 ms 2284 KB Partially correct
6 Incorrect 1 ms 2284 KB Output isn't correct
7 Incorrect 2 ms 2284 KB Output isn't correct
8 Incorrect 1 ms 2284 KB Output isn't correct
9 Incorrect 1 ms 2284 KB Output isn't correct
10 Runtime error 2 ms 2284 KB Execution failed because the return code was nonzero
11 Incorrect 4 ms 2284 KB Output isn't correct
12 Incorrect 3 ms 2284 KB Output isn't correct
13 Incorrect 3 ms 2284 KB Output isn't correct
14 Incorrect 2 ms 2284 KB Output isn't correct
15 Incorrect 2 ms 2284 KB Output isn't correct
16 Incorrect 14 ms 2284 KB Output isn't correct
17 Incorrect 21 ms 2284 KB Output isn't correct
18 Incorrect 16 ms 2284 KB Output isn't correct
19 Incorrect 14 ms 2284 KB Output isn't correct
20 Runtime error 11 ms 2284 KB Execution failed because the return code was nonzero
21 Incorrect 58 ms 2284 KB Expected int32, but "2500100001" found
22 Incorrect 56 ms 2284 KB Expected int32, but "2500100001" found
23 Incorrect 64 ms 2284 KB Expected int32, but "2500100001" found
24 Incorrect 59 ms 2284 KB Expected int32, but "2500100001" found
25 Incorrect 46 ms 2284 KB Expected int32, but "2500100001" found
26 Incorrect 60 ms 2284 KB Expected int32, but "2500100001" found
27 Incorrect 59 ms 2284 KB Expected int32, but "2500100001" found
28 Incorrect 57 ms 2284 KB Expected int32, but "2500100001" found
29 Incorrect 57 ms 2284 KB Expected int32, but "2500100001" found
30 Runtime error 40 ms 2284 KB Execution failed because the return code was nonzero
31 Runtime error 2 ms 2284 KB Execution failed because the return code was nonzero
32 Runtime error 1 ms 2284 KB Execution failed because the return code was nonzero