답안 #101363

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
101363 2019-03-18T17:24:58 Z shafinalam Gap (APIO16_gap) C++14
0 / 100
46 ms 2944 KB
#include <bits/stdc++.h>
#include "gap.h"
using namespace std;

typedef long long ll;
const int lim = 1e5+5;
#define  sf scanf
#define  pf printf

#define  inf 1e18
ll arr[lim];

ll findGap(int T, int N)
{
    ll s = 0, t = inf, mn, mx;
    int l = 1, r = N;

    while(l<=r)
    {
        MinMax(s, t, &mn, &mx);
        arr[l++] = mn;
        arr[r--] = mx;
        l = mn+1;
        r = mx-1;
    }
    ll ans = -inf;
    for(int i = 2; i <= N; i++) max(ans, arr[i]-arr[i-1]);
    return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 384 KB Output isn't correct
2 Runtime error 3 ms 512 KB Execution killed with signal 11 (could be triggered by violating memory limits)
3 Incorrect 3 ms 384 KB Output isn't correct
4 Runtime error 4 ms 384 KB Execution killed with signal 11 (could be triggered by violating memory limits)
5 Runtime error 3 ms 484 KB Execution killed with signal 11 (could be triggered by violating memory limits)
6 Incorrect 2 ms 384 KB Output isn't correct
7 Incorrect 2 ms 384 KB Output isn't correct
8 Runtime error 4 ms 512 KB Execution killed with signal 11 (could be triggered by violating memory limits)
9 Incorrect 3 ms 384 KB Output isn't correct
10 Runtime error 3 ms 512 KB Execution killed with signal 11 (could be triggered by violating memory limits)
11 Incorrect 3 ms 384 KB Output isn't correct
12 Incorrect 3 ms 384 KB Output isn't correct
13 Incorrect 3 ms 384 KB Output isn't correct
14 Runtime error 4 ms 640 KB Execution killed with signal 11 (could be triggered by violating memory limits)
15 Incorrect 2 ms 384 KB Output isn't correct
16 Runtime error 11 ms 1408 KB Execution killed with signal 11 (could be triggered by violating memory limits)
17 Incorrect 9 ms 1024 KB Output isn't correct
18 Runtime error 11 ms 1404 KB Execution killed with signal 11 (could be triggered by violating memory limits)
19 Incorrect 12 ms 916 KB Output isn't correct
20 Runtime error 7 ms 1152 KB Execution killed with signal 11 (could be triggered by violating memory limits)
21 Incorrect 38 ms 1996 KB Output isn't correct
22 Incorrect 33 ms 1912 KB Output isn't correct
23 Incorrect 40 ms 1912 KB Output isn't correct
24 Incorrect 46 ms 1872 KB Output isn't correct
25 Incorrect 24 ms 1920 KB Output isn't correct
26 Incorrect 32 ms 1912 KB Output isn't correct
27 Runtime error 32 ms 2940 KB Execution killed with signal 11 (could be triggered by violating memory limits)
28 Runtime error 29 ms 2808 KB Execution killed with signal 11 (could be triggered by violating memory limits)
29 Runtime error 27 ms 2936 KB Execution killed with signal 11 (could be triggered by violating memory limits)
30 Runtime error 17 ms 2808 KB Execution killed with signal 11 (could be triggered by violating memory limits)
31 Incorrect 2 ms 384 KB Output isn't correct
32 Incorrect 2 ms 384 KB Output isn't correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 384 KB Output isn't correct
2 Runtime error 3 ms 512 KB Execution killed with signal 11 (could be triggered by violating memory limits)
3 Runtime error 3 ms 512 KB Execution killed with signal 11 (could be triggered by violating memory limits)
4 Incorrect 4 ms 384 KB Output isn't correct
5 Runtime error 3 ms 512 KB Execution killed with signal 11 (could be triggered by violating memory limits)
6 Incorrect 3 ms 384 KB Output isn't correct
7 Runtime error 3 ms 512 KB Execution killed with signal 11 (could be triggered by violating memory limits)
8 Incorrect 2 ms 384 KB Output isn't correct
9 Runtime error 4 ms 512 KB Execution killed with signal 11 (could be triggered by violating memory limits)
10 Runtime error 4 ms 512 KB Execution killed with signal 11 (could be triggered by violating memory limits)
11 Runtime error 3 ms 640 KB Execution killed with signal 11 (could be triggered by violating memory limits)
12 Incorrect 4 ms 384 KB Output isn't correct
13 Incorrect 4 ms 384 KB Output isn't correct
14 Runtime error 4 ms 640 KB Execution killed with signal 11 (could be triggered by violating memory limits)
15 Incorrect 3 ms 384 KB Output isn't correct
16 Incorrect 9 ms 1024 KB Output isn't correct
17 Incorrect 8 ms 1024 KB Output isn't correct
18 Incorrect 9 ms 1024 KB Output isn't correct
19 Runtime error 15 ms 1280 KB Execution killed with signal 11 (could be triggered by violating memory limits)
20 Runtime error 6 ms 1024 KB Execution killed with signal 11 (could be triggered by violating memory limits)
21 Runtime error 27 ms 2944 KB Execution killed with signal 11 (could be triggered by violating memory limits)
22 Runtime error 30 ms 2816 KB Execution killed with signal 11 (could be triggered by violating memory limits)
23 Runtime error 27 ms 2808 KB Execution killed with signal 11 (could be triggered by violating memory limits)
24 Runtime error 30 ms 2808 KB Execution killed with signal 11 (could be triggered by violating memory limits)
25 Incorrect 25 ms 1920 KB Output isn't correct
26 Runtime error 38 ms 2808 KB Execution killed with signal 11 (could be triggered by violating memory limits)
27 Incorrect 39 ms 1912 KB Output isn't correct
28 Runtime error 42 ms 2936 KB Execution killed with signal 11 (could be triggered by violating memory limits)
29 Incorrect 46 ms 1912 KB Output isn't correct
30 Runtime error 15 ms 2816 KB Execution killed with signal 11 (could be triggered by violating memory limits)
31 Incorrect 2 ms 384 KB Output isn't correct
32 Incorrect 2 ms 384 KB Output isn't correct