Submission #1015127

# Submission time Handle Problem Language Result Execution time Memory
1015127 2024-07-06T06:29:01 Z vjudge1 Gap (APIO16_gap) C++17
7.89635 / 100
318 ms 1336 KB
#include "gap.h"
#include <bits/stdc++.h>

using namespace std;

#define ll long long

long long findGap(signed t,signed n)
{
	ll mn1,mx1,lim1=0,lim2=1e18,mn,mx;
	MinMax(lim1,lim2,&mn1,&mx1);
	ll s=0,e=1e18;
	while (s+1<e)
	{
		ll mid = (s+e)/2, l = mn1;
		bool b=0;
		while (l+mid<mx1)
		{
			MinMax(l+1,l+mid,&mn,&mx);
			if (mn==-1)
			{
				b=1;
				break;
			}
			l=mx;
		}
		if (b)
			s=mid;
		else
			e=mid;
	}
	return s+1;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Incorrect 0 ms 344 KB Output isn't correct
3 Incorrect 0 ms 344 KB Output isn't correct
4 Incorrect 0 ms 344 KB Output isn't correct
5 Incorrect 1 ms 344 KB Output isn't correct
6 Incorrect 0 ms 344 KB Output isn't correct
7 Incorrect 1 ms 344 KB Output isn't correct
8 Incorrect 1 ms 344 KB Output isn't correct
9 Incorrect 1 ms 344 KB Output isn't correct
10 Correct 1 ms 344 KB Output is correct
11 Incorrect 2 ms 344 KB Output isn't correct
12 Incorrect 2 ms 344 KB Output isn't correct
13 Incorrect 1 ms 344 KB Output isn't correct
14 Incorrect 1 ms 344 KB Output isn't correct
15 Incorrect 3 ms 344 KB Output isn't correct
16 Incorrect 34 ms 636 KB Output isn't correct
17 Incorrect 40 ms 600 KB Output isn't correct
18 Incorrect 41 ms 600 KB Output isn't correct
19 Incorrect 49 ms 600 KB Output isn't correct
20 Correct 2 ms 600 KB Output is correct
21 Incorrect 193 ms 1212 KB Output isn't correct
22 Incorrect 187 ms 1112 KB Output isn't correct
23 Incorrect 145 ms 1112 KB Output isn't correct
24 Incorrect 197 ms 1220 KB Output isn't correct
25 Incorrect 309 ms 1112 KB Output isn't correct
26 Incorrect 176 ms 1112 KB Output isn't correct
27 Incorrect 175 ms 1336 KB Output isn't correct
28 Incorrect 181 ms 1112 KB Output isn't correct
29 Incorrect 163 ms 1032 KB Output isn't correct
30 Correct 7 ms 1112 KB Output is correct
31 Incorrect 0 ms 344 KB Output isn't correct
32 Incorrect 1 ms 344 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Partially correct 0 ms 344 KB Partially correct
2 Partially correct 0 ms 344 KB Partially correct
3 Partially correct 0 ms 344 KB Partially correct
4 Partially correct 0 ms 344 KB Partially correct
5 Partially correct 1 ms 344 KB Partially correct
6 Partially correct 0 ms 344 KB Partially correct
7 Partially correct 0 ms 344 KB Partially correct
8 Partially correct 0 ms 344 KB Partially correct
9 Partially correct 0 ms 344 KB Partially correct
10 Partially correct 0 ms 344 KB Partially correct
11 Partially correct 2 ms 344 KB Partially correct
12 Partially correct 2 ms 344 KB Partially correct
13 Partially correct 2 ms 344 KB Partially correct
14 Partially correct 2 ms 344 KB Partially correct
15 Partially correct 3 ms 472 KB Partially correct
16 Partially correct 56 ms 600 KB Partially correct
17 Partially correct 40 ms 600 KB Partially correct
18 Partially correct 41 ms 600 KB Partially correct
19 Partially correct 39 ms 636 KB Partially correct
20 Partially correct 2 ms 600 KB Partially correct
21 Partially correct 172 ms 1216 KB Partially correct
22 Partially correct 177 ms 1112 KB Partially correct
23 Partially correct 185 ms 1112 KB Partially correct
24 Partially correct 146 ms 1172 KB Partially correct
25 Partially correct 318 ms 1212 KB Partially correct
26 Partially correct 132 ms 1112 KB Partially correct
27 Partially correct 193 ms 1112 KB Partially correct
28 Partially correct 189 ms 1112 KB Partially correct
29 Partially correct 168 ms 1112 KB Partially correct
30 Partially correct 14 ms 1112 KB Partially correct
31 Partially correct 0 ms 344 KB Partially correct
32 Correct 0 ms 344 KB Output is correct