Submission #489786

# Submission time Handle Problem Language Result Execution time Memory
489786 2021-11-24T16:01:10 Z andydexter Gap (APIO16_gap) C++14
0 / 100
31 ms 1180 KB
#include "gap.h"
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;

long long findGap(int T, int N)
{
    ll mx,mn;
    MinMax(0,1000000000000000000,&mn,&mx);
    ll interval = (mx-mn)/N;
    ll lowest = mn, highest = mx;
    ll lower = lowest,lastmx = 0;
    while(lower<=highest){
        MinMax(lower,lower+interval,&mn,&mx);
        if(mn>-1){
            interval = max(interval,mn-lastmx);
            lastmx = mx;
        }
        lower += interval+1;
    }
	return interval;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 200 KB Output isn't correct
2 Incorrect 0 ms 200 KB Output isn't correct
3 Correct 0 ms 200 KB Output is correct
4 Correct 0 ms 200 KB Output is correct
5 Incorrect 0 ms 200 KB Output isn't correct
6 Correct 0 ms 200 KB Output is correct
7 Correct 0 ms 200 KB Output is correct
8 Correct 0 ms 200 KB Output is correct
9 Correct 0 ms 200 KB Output is correct
10 Incorrect 0 ms 200 KB Output isn't correct
11 Correct 1 ms 328 KB Output is correct
12 Correct 1 ms 328 KB Output is correct
13 Correct 1 ms 328 KB Output is correct
14 Correct 1 ms 328 KB Output is correct
15 Incorrect 1 ms 328 KB Output isn't correct
16 Correct 5 ms 508 KB Output is correct
17 Correct 7 ms 456 KB Output is correct
18 Correct 7 ms 456 KB Output is correct
19 Correct 6 ms 456 KB Output is correct
20 Incorrect 4 ms 456 KB Output isn't correct
21 Correct 24 ms 1180 KB Output is correct
22 Correct 21 ms 1120 KB Output is correct
23 Correct 21 ms 1080 KB Output is correct
24 Correct 23 ms 1052 KB Output is correct
25 Incorrect 31 ms 1032 KB Output isn't correct
26 Correct 21 ms 1072 KB Output is correct
27 Correct 27 ms 1116 KB Output is correct
28 Correct 24 ms 1048 KB Output is correct
29 Correct 21 ms 1048 KB Output is correct
30 Incorrect 16 ms 1096 KB Output isn't correct
31 Correct 0 ms 200 KB Output is correct
32 Incorrect 0 ms 200 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Partially correct 0 ms 200 KB Partially correct
2 Correct 0 ms 200 KB Output is correct
3 Correct 0 ms 200 KB Output is correct
4 Correct 0 ms 200 KB Output is correct
5 Incorrect 0 ms 200 KB Output isn't correct
6 Correct 1 ms 200 KB Output is correct
7 Correct 0 ms 200 KB Output is correct
8 Correct 0 ms 200 KB Output is correct
9 Correct 0 ms 200 KB Output is correct
10 Correct 0 ms 200 KB Output is correct
11 Correct 1 ms 200 KB Output is correct
12 Correct 1 ms 328 KB Output is correct
13 Correct 1 ms 328 KB Output is correct
14 Correct 1 ms 200 KB Output is correct
15 Incorrect 1 ms 200 KB Output isn't correct
16 Correct 8 ms 456 KB Output is correct
17 Correct 6 ms 456 KB Output is correct
18 Correct 6 ms 456 KB Output is correct
19 Correct 6 ms 420 KB Output is correct
20 Incorrect 4 ms 456 KB Output isn't correct
21 Correct 22 ms 1052 KB Output is correct
22 Correct 27 ms 1020 KB Output is correct
23 Correct 27 ms 968 KB Output is correct
24 Correct 21 ms 1052 KB Output is correct
25 Incorrect 26 ms 1060 KB Output isn't correct
26 Correct 23 ms 1048 KB Output is correct
27 Correct 21 ms 1124 KB Output is correct
28 Correct 28 ms 956 KB Output is correct
29 Correct 20 ms 1052 KB Output is correct
30 Incorrect 17 ms 1096 KB Output isn't correct
31 Correct 0 ms 200 KB Output is correct
32 Correct 0 ms 200 KB Output is correct