답안 #40862

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
40862 2018-02-09T14:47:51 Z IvanC Gap (APIO16_gap) C++14
0 / 100
62 ms 1516 KB
#include "gap.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> ii;
ll NN,TT,maior;
ii binary_search(ll ini,ll fim){
	if(ini == fim) return ii(ini,ini);
	if(fim - ini <= maior) return ii(ini,fim);
	ll copia1 = ini,copia2 = fim;
	MinMax(ini,fim,&copia1,&copia2);
	ini = copia1;
	fim = copia2;
	if(fim - ini <= maior) return ii(ini,fim);
	ll meio = ini + (fim - ini)/2;
	ii novo1 = binary_search(ini,meio);
	ii novo2 = binary_search(meio+1,fim);
	if(novo1.second != novo2.first) maior = max(maior, novo2.first - novo1.second);
	return ii(ini,fim);
}
ll findGap(int T,int N){
	TT = T;
	NN = N;
	ll ini = 0,fim = (ll)1e18;
	binary_search(ini,fim);
	return maior;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 248 KB Output isn't correct
2 Incorrect 2 ms 480 KB Output isn't correct
3 Incorrect 1 ms 480 KB Output isn't correct
4 Incorrect 2 ms 480 KB Output isn't correct
5 Incorrect 1 ms 500 KB Output isn't correct
6 Correct 1 ms 532 KB Output is correct
7 Correct 2 ms 548 KB Output is correct
8 Correct 2 ms 552 KB Output is correct
9 Incorrect 2 ms 552 KB Output isn't correct
10 Incorrect 1 ms 600 KB Output isn't correct
11 Incorrect 2 ms 620 KB Output isn't correct
12 Correct 2 ms 620 KB Output is correct
13 Correct 2 ms 620 KB Output is correct
14 Correct 2 ms 620 KB Output is correct
15 Incorrect 2 ms 620 KB Output isn't correct
16 Correct 11 ms 748 KB Output is correct
17 Correct 10 ms 748 KB Output is correct
18 Correct 14 ms 800 KB Output is correct
19 Correct 10 ms 800 KB Output is correct
20 Incorrect 8 ms 800 KB Output isn't correct
21 Correct 56 ms 1388 KB Output is correct
22 Incorrect 37 ms 1388 KB Output isn't correct
23 Correct 36 ms 1388 KB Output is correct
24 Correct 41 ms 1412 KB Output is correct
25 Incorrect 59 ms 1412 KB Output isn't correct
26 Correct 36 ms 1412 KB Output is correct
27 Correct 34 ms 1412 KB Output is correct
28 Incorrect 37 ms 1412 KB Output isn't correct
29 Correct 37 ms 1412 KB Output is correct
30 Incorrect 29 ms 1412 KB Output isn't correct
31 Incorrect 1 ms 1412 KB Output isn't correct
32 Correct 1 ms 1412 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Partially correct 1 ms 1412 KB Partially correct
2 Partially correct 2 ms 1412 KB Partially correct
3 Partially correct 1 ms 1412 KB Partially correct
4 Partially correct 1 ms 1412 KB Partially correct
5 Partially correct 1 ms 1412 KB Partially correct
6 Partially correct 1 ms 1412 KB Partially correct
7 Partially correct 2 ms 1412 KB Partially correct
8 Partially correct 2 ms 1412 KB Partially correct
9 Partially correct 1 ms 1412 KB Partially correct
10 Incorrect 1 ms 1412 KB Output isn't correct
11 Incorrect 2 ms 1412 KB Output isn't correct
12 Incorrect 2 ms 1412 KB Output isn't correct
13 Partially correct 2 ms 1412 KB Partially correct
14 Partially correct 2 ms 1412 KB Partially correct
15 Partially correct 2 ms 1412 KB Partially correct
16 Partially correct 13 ms 1412 KB Partially correct
17 Partially correct 11 ms 1412 KB Partially correct
18 Partially correct 14 ms 1412 KB Partially correct
19 Partially correct 11 ms 1412 KB Partially correct
20 Incorrect 9 ms 1412 KB Output isn't correct
21 Partially correct 37 ms 1412 KB Partially correct
22 Partially correct 37 ms 1412 KB Partially correct
23 Partially correct 40 ms 1412 KB Partially correct
24 Incorrect 51 ms 1412 KB Output isn't correct
25 Partially correct 62 ms 1516 KB Partially correct
26 Partially correct 49 ms 1516 KB Partially correct
27 Partially correct 43 ms 1516 KB Partially correct
28 Partially correct 38 ms 1516 KB Partially correct
29 Partially correct 38 ms 1516 KB Partially correct
30 Incorrect 29 ms 1516 KB Output isn't correct
31 Partially correct 1 ms 1516 KB Partially correct
32 Correct 1 ms 1516 KB Output is correct