Submission #105995

# Submission time Handle Problem Language Result Execution time Memory
105995 2019-04-16T06:32:04 Z daniel920712 Gap (APIO16_gap) C++14
0 / 100
47 ms 1152 KB
#include <iostream>
#include "gap.h"

using namespace std;
long long all[100005];
long long findGap(int T,int N)
{
    long long a,b,l=0,r=N-1,x=0,y=1e9,ans=0;
    int i;
    while(l<=r)
    {
        MinMax(x,y,&a,&b);
        all[l]=a;
        all[r]=b;
        x=a+1;
        y=b-1;
    }
    for(i=1;i<N;i++) ans=max(ans,all[i]-all[i-1]);
    return ans;
}
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 256 KB Execution failed because the return code was nonzero
2 Runtime error 3 ms 384 KB Execution failed because the return code was nonzero
3 Runtime error 3 ms 384 KB Execution failed because the return code was nonzero
4 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
5 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
6 Runtime error 3 ms 384 KB Execution failed because the return code was nonzero
7 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
8 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
9 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
10 Runtime error 2 ms 256 KB Execution failed because the return code was nonzero
11 Runtime error 3 ms 384 KB Execution failed because the return code was nonzero
12 Runtime error 3 ms 512 KB Execution failed because the return code was nonzero
13 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
14 Runtime error 3 ms 384 KB Execution failed because the return code was nonzero
15 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
16 Runtime error 11 ms 640 KB Execution failed because the return code was nonzero
17 Runtime error 9 ms 484 KB Execution failed because the return code was nonzero
18 Runtime error 8 ms 512 KB Execution failed because the return code was nonzero
19 Runtime error 10 ms 512 KB Execution failed because the return code was nonzero
20 Runtime error 12 ms 512 KB Execution failed because the return code was nonzero
21 Runtime error 47 ms 1124 KB Execution failed because the return code was nonzero
22 Runtime error 32 ms 1144 KB Execution failed because the return code was nonzero
23 Runtime error 30 ms 1144 KB Execution failed because the return code was nonzero
24 Runtime error 24 ms 1144 KB Execution failed because the return code was nonzero
25 Runtime error 23 ms 1152 KB Execution failed because the return code was nonzero
26 Runtime error 29 ms 1152 KB Execution failed because the return code was nonzero
27 Runtime error 32 ms 1144 KB Execution failed because the return code was nonzero
28 Runtime error 27 ms 1152 KB Execution failed because the return code was nonzero
29 Runtime error 30 ms 1024 KB Execution failed because the return code was nonzero
30 Runtime error 36 ms 1152 KB Execution failed because the return code was nonzero
31 Runtime error 2 ms 512 KB Execution failed because the return code was nonzero
32 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
2 Runtime error 3 ms 384 KB Execution failed because the return code was nonzero
3 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
4 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
5 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
6 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
7 Runtime error 3 ms 384 KB Execution failed because the return code was nonzero
8 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
9 Runtime error 3 ms 428 KB Execution failed because the return code was nonzero
10 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
11 Runtime error 3 ms 384 KB Execution failed because the return code was nonzero
12 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
13 Runtime error 3 ms 384 KB Execution failed because the return code was nonzero
14 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
15 Runtime error 3 ms 384 KB Execution failed because the return code was nonzero
16 Runtime error 10 ms 512 KB Execution failed because the return code was nonzero
17 Runtime error 8 ms 512 KB Execution failed because the return code was nonzero
18 Runtime error 10 ms 512 KB Execution failed because the return code was nonzero
19 Runtime error 10 ms 512 KB Execution failed because the return code was nonzero
20 Runtime error 12 ms 512 KB Execution failed because the return code was nonzero
21 Runtime error 30 ms 1152 KB Execution failed because the return code was nonzero
22 Runtime error 29 ms 1056 KB Execution failed because the return code was nonzero
23 Runtime error 28 ms 1152 KB Execution failed because the return code was nonzero
24 Runtime error 36 ms 1144 KB Execution failed because the return code was nonzero
25 Runtime error 28 ms 1140 KB Execution failed because the return code was nonzero
26 Runtime error 33 ms 1144 KB Execution failed because the return code was nonzero
27 Runtime error 27 ms 1152 KB Execution failed because the return code was nonzero
28 Runtime error 29 ms 1116 KB Execution failed because the return code was nonzero
29 Runtime error 27 ms 1144 KB Execution failed because the return code was nonzero
30 Runtime error 33 ms 1152 KB Execution failed because the return code was nonzero
31 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
32 Runtime error 3 ms 384 KB Execution failed because the return code was nonzero