답안 #569721

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
569721 2022-05-27T16:19:00 Z Rasoul006 Gap (APIO16_gap) C++17
0 / 100
52 ms 1884 KB
#include "gap.h"

#include <bits/stdc++.h>

#define endl "\n"

using namespace std;

long long findGap(int T, int N)
{
    long long a[N+9] , i = 0 , l = 0 , r = N , mn = 0 , mx = 1e18+1 , ans = 0 - 1 ;

    while (i<N/2 + (N%2))
    {
        MinMax (mn + 1 , mx-1 , &mn , &mx);

        a[l] = mn ;
        a[r] = mx ;
        l++;
        r--;
    }

    for (int j=0 ; j<N-1 ; j++)
    {
        ans = max(a[j+1] - a[j] , ans);
    }

    cout << ans << endl ;

	return 0 ;
}
# 결과 실행 시간 메모리 Grader output
1 Runtime error 0 ms 208 KB Execution failed because the return code was nonzero
2 Runtime error 0 ms 208 KB Execution failed because the return code was nonzero
3 Runtime error 1 ms 208 KB Execution failed because the return code was nonzero
4 Runtime error 0 ms 208 KB Execution failed because the return code was nonzero
5 Runtime error 0 ms 208 KB Execution failed because the return code was nonzero
6 Runtime error 0 ms 208 KB Execution failed because the return code was nonzero
7 Runtime error 0 ms 208 KB Execution failed because the return code was nonzero
8 Runtime error 0 ms 208 KB Execution failed because the return code was nonzero
9 Runtime error 0 ms 208 KB Execution failed because the return code was nonzero
10 Runtime error 0 ms 208 KB Execution failed because the return code was nonzero
11 Runtime error 1 ms 336 KB Execution failed because the return code was nonzero
12 Runtime error 1 ms 336 KB Execution failed because the return code was nonzero
13 Runtime error 1 ms 336 KB Execution failed because the return code was nonzero
14 Runtime error 1 ms 336 KB Execution failed because the return code was nonzero
15 Runtime error 1 ms 336 KB Execution failed because the return code was nonzero
16 Runtime error 10 ms 680 KB Execution failed because the return code was nonzero
17 Runtime error 10 ms 636 KB Execution failed because the return code was nonzero
18 Runtime error 10 ms 612 KB Execution failed because the return code was nonzero
19 Runtime error 11 ms 808 KB Execution failed because the return code was nonzero
20 Runtime error 9 ms 704 KB Execution failed because the return code was nonzero
21 Runtime error 42 ms 1824 KB Execution failed because the return code was nonzero
22 Runtime error 49 ms 1824 KB Execution failed because the return code was nonzero
23 Runtime error 39 ms 1832 KB Execution failed because the return code was nonzero
24 Runtime error 39 ms 1824 KB Execution failed because the return code was nonzero
25 Runtime error 38 ms 1824 KB Execution failed because the return code was nonzero
26 Runtime error 52 ms 1884 KB Execution failed because the return code was nonzero
27 Runtime error 43 ms 1832 KB Execution failed because the return code was nonzero
28 Runtime error 38 ms 1832 KB Execution failed because the return code was nonzero
29 Runtime error 41 ms 1768 KB Execution failed because the return code was nonzero
30 Runtime error 37 ms 1860 KB Execution failed because the return code was nonzero
31 Runtime error 0 ms 208 KB Execution failed because the return code was nonzero
32 Runtime error 0 ms 208 KB Execution failed because the return code was nonzero
# 결과 실행 시간 메모리 Grader output
1 Runtime error 0 ms 208 KB Execution failed because the return code was nonzero
2 Runtime error 0 ms 208 KB Execution failed because the return code was nonzero
3 Runtime error 0 ms 208 KB Execution failed because the return code was nonzero
4 Runtime error 0 ms 208 KB Execution failed because the return code was nonzero
5 Runtime error 0 ms 208 KB Execution failed because the return code was nonzero
6 Runtime error 0 ms 208 KB Execution failed because the return code was nonzero
7 Runtime error 1 ms 208 KB Execution failed because the return code was nonzero
8 Runtime error 0 ms 208 KB Execution failed because the return code was nonzero
9 Runtime error 1 ms 208 KB Execution failed because the return code was nonzero
10 Runtime error 1 ms 208 KB Execution failed because the return code was nonzero
11 Runtime error 1 ms 336 KB Execution failed because the return code was nonzero
12 Runtime error 1 ms 336 KB Execution failed because the return code was nonzero
13 Runtime error 2 ms 336 KB Execution failed because the return code was nonzero
14 Runtime error 1 ms 336 KB Execution failed because the return code was nonzero
15 Runtime error 1 ms 336 KB Execution failed because the return code was nonzero
16 Runtime error 12 ms 588 KB Execution failed because the return code was nonzero
17 Runtime error 14 ms 652 KB Execution failed because the return code was nonzero
18 Runtime error 11 ms 700 KB Execution failed because the return code was nonzero
19 Runtime error 11 ms 680 KB Execution failed because the return code was nonzero
20 Runtime error 7 ms 592 KB Execution failed because the return code was nonzero
21 Runtime error 43 ms 1860 KB Execution failed because the return code was nonzero
22 Runtime error 38 ms 1772 KB Execution failed because the return code was nonzero
23 Runtime error 46 ms 1860 KB Execution failed because the return code was nonzero
24 Runtime error 49 ms 1856 KB Execution failed because the return code was nonzero
25 Runtime error 37 ms 1864 KB Execution failed because the return code was nonzero
26 Runtime error 38 ms 1736 KB Execution failed because the return code was nonzero
27 Runtime error 39 ms 1828 KB Execution failed because the return code was nonzero
28 Runtime error 39 ms 1772 KB Execution failed because the return code was nonzero
29 Runtime error 40 ms 1736 KB Execution failed because the return code was nonzero
30 Runtime error 32 ms 1872 KB Execution failed because the return code was nonzero
31 Runtime error 0 ms 208 KB Execution failed because the return code was nonzero
32 Runtime error 0 ms 208 KB Execution failed because the return code was nonzero