Submission #30767

# Submission time Handle Problem Language Result Execution time Memory
30767 2017-07-26T12:19:17 Z Nikefor Gap (APIO16_gap) C++
0 / 100
49 ms 4240 KB
#include "gap.h"
#include <algorithm>
#include <cmath>
using namespace std;
long long findGap(int T, int N)
{
	long long ans = 0;
	long long a = pow(10,18);
	long long int s, t, *mn, *mx;
	MinMax(0,a,mn,mx);
	long long mini = *mn;
	long long maxi = *mx;
	s = mini+1;
	t = maxi-1;
	while(t>s) {
		MinMax(s,t,mn,mx);
		ans = max(ans, *mn - mini);
		ans = max(ans, maxi - *mx);
		mini = *mn;
		maxi = *mx;
		s = mini+1;
		t = maxi-1;
	}
	return ans;
}

Compilation message

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:10:19: warning: 'mn' is used uninitialized in this function [-Wuninitialized]
  MinMax(0,a,mn,mx);
                   ^
gap.cpp:10:19: warning: 'mx' is used uninitialized in this function [-Wuninitialized]
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected
2 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected
3 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected
4 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected
5 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected
6 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected
7 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected
8 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected
9 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected
10 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected
11 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected
12 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected
13 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected
14 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected
15 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected
16 Incorrect 6 ms 4240 KB Unexpected end of file - int64 expected
17 Incorrect 6 ms 4240 KB Unexpected end of file - int64 expected
18 Incorrect 6 ms 4240 KB Unexpected end of file - int64 expected
19 Incorrect 9 ms 4240 KB Unexpected end of file - int64 expected
20 Incorrect 3 ms 4240 KB Unexpected end of file - int64 expected
21 Incorrect 33 ms 4240 KB Unexpected end of file - int64 expected
22 Incorrect 39 ms 4240 KB Unexpected end of file - int64 expected
23 Incorrect 23 ms 4240 KB Unexpected end of file - int64 expected
24 Incorrect 43 ms 4240 KB Unexpected end of file - int64 expected
25 Incorrect 23 ms 4240 KB Unexpected end of file - int64 expected
26 Incorrect 29 ms 4240 KB Unexpected end of file - int64 expected
27 Incorrect 49 ms 4240 KB Unexpected end of file - int64 expected
28 Incorrect 26 ms 4240 KB Unexpected end of file - int64 expected
29 Incorrect 33 ms 4240 KB Unexpected end of file - int64 expected
30 Incorrect 13 ms 4240 KB Unexpected end of file - int64 expected
31 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected
32 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected
2 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected
3 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected
4 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected
5 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected
6 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected
7 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected
8 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected
9 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected
10 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected
11 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected
12 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected
13 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected
14 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected
15 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected
16 Incorrect 6 ms 4240 KB Unexpected end of file - int64 expected
17 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected
18 Incorrect 9 ms 4240 KB Unexpected end of file - int64 expected
19 Incorrect 13 ms 4240 KB Unexpected end of file - int64 expected
20 Incorrect 3 ms 4240 KB Unexpected end of file - int64 expected
21 Incorrect 43 ms 4240 KB Unexpected end of file - int64 expected
22 Incorrect 33 ms 4240 KB Unexpected end of file - int64 expected
23 Incorrect 26 ms 4240 KB Unexpected end of file - int64 expected
24 Incorrect 39 ms 4240 KB Unexpected end of file - int64 expected
25 Incorrect 19 ms 4240 KB Unexpected end of file - int64 expected
26 Incorrect 16 ms 4240 KB Unexpected end of file - int64 expected
27 Incorrect 23 ms 4240 KB Unexpected end of file - int64 expected
28 Incorrect 19 ms 4240 KB Unexpected end of file - int64 expected
29 Incorrect 19 ms 4240 KB Unexpected end of file - int64 expected
30 Incorrect 13 ms 4240 KB Unexpected end of file - int64 expected
31 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected
32 Incorrect 0 ms 4240 KB Unexpected end of file - int64 expected