Submission #40878

# Submission time Handle Problem Language Result Execution time Memory
40878 2018-02-09T16:00:26 Z IvanC Gap (APIO16_gap) C++14
0 / 100
91 ms 1572 KB
#include "gap.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> ii;
const ll MINV = 0;
const ll MAXV = (ll)1e18;
ll NN,TT,maior;
ll findGap(int T,int N){
	TT = T;
	NN = N;
	ll ini,fim;
	MinMax(MINV,MAXV,&ini,&fim);
	ll gap = (ll)ceil(double(fim - ini)/double(N - 1));
	vector<ll> diferencas;
	for(ll i = 0;i<N;i++){
		ll lo = ini + i*gap;
		ll hi = min(lo+gap,fim);
		if(i != 0) lo++;
		ll copia1,copia2;
		MinMax(lo,hi,&copia1,&copia2);
		maior = max(copia2 - copia1,maior);
	}
	return maior;
}
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 248 KB Execution failed because the return code was nonzero
2 Incorrect 2 ms 352 KB Output isn't correct
3 Incorrect 2 ms 468 KB Output isn't correct
4 Incorrect 2 ms 576 KB Output isn't correct
5 Runtime error 2 ms 576 KB Execution failed because the return code was nonzero
6 Runtime error 2 ms 576 KB Execution failed because the return code was nonzero
7 Runtime error 2 ms 576 KB Execution failed because the return code was nonzero
8 Incorrect 1 ms 576 KB Output isn't correct
9 Incorrect 2 ms 640 KB Output isn't correct
10 Runtime error 1 ms 640 KB Execution failed because the return code was nonzero
11 Runtime error 3 ms 640 KB Execution failed because the return code was nonzero
12 Runtime error 3 ms 640 KB Execution failed because the return code was nonzero
13 Runtime error 3 ms 640 KB Execution failed because the return code was nonzero
14 Runtime error 2 ms 640 KB Execution failed because the return code was nonzero
15 Runtime error 2 ms 640 KB Execution failed because the return code was nonzero
16 Runtime error 22 ms 904 KB Execution failed because the return code was nonzero
17 Runtime error 20 ms 904 KB Execution failed because the return code was nonzero
18 Runtime error 20 ms 904 KB Execution failed because the return code was nonzero
19 Runtime error 21 ms 904 KB Execution failed because the return code was nonzero
20 Runtime error 10 ms 904 KB Execution failed because the return code was nonzero
21 Runtime error 75 ms 1516 KB Execution failed because the return code was nonzero
22 Runtime error 73 ms 1516 KB Execution failed because the return code was nonzero
23 Runtime error 91 ms 1516 KB Execution failed because the return code was nonzero
24 Runtime error 74 ms 1516 KB Execution failed because the return code was nonzero
25 Runtime error 72 ms 1516 KB Execution failed because the return code was nonzero
26 Runtime error 85 ms 1520 KB Execution failed because the return code was nonzero
27 Runtime error 76 ms 1520 KB Execution failed because the return code was nonzero
28 Runtime error 69 ms 1520 KB Execution failed because the return code was nonzero
29 Runtime error 79 ms 1520 KB Execution failed because the return code was nonzero
30 Runtime error 37 ms 1520 KB Execution failed because the return code was nonzero
31 Runtime error 1 ms 1520 KB Execution failed because the return code was nonzero
32 Runtime error 1 ms 1520 KB Execution failed because the return code was nonzero
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 1520 KB Execution failed because the return code was nonzero
2 Runtime error 1 ms 1520 KB Execution failed because the return code was nonzero
3 Incorrect 1 ms 1520 KB Output isn't correct
4 Incorrect 1 ms 1520 KB Output isn't correct
5 Runtime error 2 ms 1520 KB Execution failed because the return code was nonzero
6 Incorrect 1 ms 1520 KB Output isn't correct
7 Runtime error 2 ms 1520 KB Execution failed because the return code was nonzero
8 Incorrect 1 ms 1520 KB Output isn't correct
9 Runtime error 1 ms 1520 KB Execution failed because the return code was nonzero
10 Runtime error 2 ms 1520 KB Execution failed because the return code was nonzero
11 Runtime error 2 ms 1520 KB Execution failed because the return code was nonzero
12 Runtime error 3 ms 1520 KB Execution failed because the return code was nonzero
13 Runtime error 3 ms 1520 KB Execution failed because the return code was nonzero
14 Runtime error 2 ms 1520 KB Execution failed because the return code was nonzero
15 Runtime error 2 ms 1520 KB Execution failed because the return code was nonzero
16 Runtime error 18 ms 1520 KB Execution failed because the return code was nonzero
17 Runtime error 18 ms 1520 KB Execution failed because the return code was nonzero
18 Runtime error 18 ms 1520 KB Execution failed because the return code was nonzero
19 Runtime error 18 ms 1520 KB Execution failed because the return code was nonzero
20 Runtime error 9 ms 1520 KB Execution failed because the return code was nonzero
21 Runtime error 76 ms 1572 KB Execution failed because the return code was nonzero
22 Runtime error 68 ms 1572 KB Execution failed because the return code was nonzero
23 Runtime error 68 ms 1572 KB Execution failed because the return code was nonzero
24 Runtime error 68 ms 1572 KB Execution failed because the return code was nonzero
25 Runtime error 76 ms 1572 KB Execution failed because the return code was nonzero
26 Runtime error 77 ms 1572 KB Execution failed because the return code was nonzero
27 Runtime error 73 ms 1572 KB Execution failed because the return code was nonzero
28 Runtime error 72 ms 1572 KB Execution failed because the return code was nonzero
29 Runtime error 69 ms 1572 KB Execution failed because the return code was nonzero
30 Runtime error 37 ms 1572 KB Execution failed because the return code was nonzero
31 Runtime error 1 ms 1572 KB Execution failed because the return code was nonzero
32 Runtime error 1 ms 1572 KB Execution failed because the return code was nonzero