답안 #560907

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
560907 2022-05-12T04:46:15 Z CoderNTT Gap (APIO16_gap) C++14
0 / 100
41 ms 1156 KB
#include<bits/stdc++.h>
#include "gap.h"
#define task "CROBOT"
#define ll long long
#define ld long double
#define fi first
#define se second
using namespace std;
const int maxn = 1e5 + 1;
const int mod = 1e9 + 7;
ll n, m, k, q, l, r, a[maxn];
ll findGap(int t, int n)
{
    if (t == 1)
    {
        l = -1, r = 2e18 + 1;
        for (int i = 1; i = (n + 1) / 2; i++)
        {
            MinMax(l, r, &a[i], &a[n - i + 1]);
            l = a[i] + 1;
            r = a[n - i + 1] - 1;
        }
        ll ans = -1;
        for (int i = 2; i <= n; i++)
            ans = max(ans, a[i] - a[i - 1]);
        return ans;
    }
    return -1;
}









Compilation message

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:17:27: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   17 |         for (int i = 1; i = (n + 1) / 2; i++)
      |                         ~~^~~~~~~~~~~~~
# 결과 실행 시간 메모리 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 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 9 ms 464 KB Execution failed because the return code was nonzero
17 Runtime error 9 ms 432 KB Execution failed because the return code was nonzero
18 Runtime error 9 ms 464 KB Execution failed because the return code was nonzero
19 Runtime error 9 ms 432 KB Execution failed because the return code was nonzero
20 Runtime error 7 ms 524 KB Execution failed because the return code was nonzero
21 Runtime error 41 ms 1068 KB Execution failed because the return code was nonzero
22 Runtime error 40 ms 1088 KB Execution failed because the return code was nonzero
23 Runtime error 35 ms 1060 KB Execution failed because the return code was nonzero
24 Runtime error 40 ms 1004 KB Execution failed because the return code was nonzero
25 Runtime error 40 ms 980 KB Execution failed because the return code was nonzero
26 Runtime error 33 ms 1096 KB Execution failed because the return code was nonzero
27 Runtime error 35 ms 1060 KB Execution failed because the return code was nonzero
28 Runtime error 34 ms 1064 KB Execution failed because the return code was nonzero
29 Runtime error 34 ms 1064 KB Execution failed because the return code was nonzero
30 Runtime error 28 ms 1000 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 Incorrect 1 ms 208 KB Output isn't correct
2 Incorrect 0 ms 208 KB Output isn't correct
3 Incorrect 1 ms 208 KB Output isn't correct
4 Incorrect 0 ms 208 KB Output isn't correct
5 Incorrect 0 ms 208 KB Output isn't correct
6 Incorrect 0 ms 208 KB Output isn't correct
7 Incorrect 0 ms 208 KB Output isn't correct
8 Incorrect 0 ms 208 KB Output isn't correct
9 Incorrect 0 ms 208 KB Output isn't correct
10 Incorrect 0 ms 208 KB Output isn't correct
11 Incorrect 1 ms 336 KB Output isn't correct
12 Incorrect 1 ms 336 KB Output isn't correct
13 Incorrect 1 ms 208 KB Output isn't correct
14 Incorrect 1 ms 336 KB Output isn't correct
15 Incorrect 1 ms 336 KB Output isn't correct
16 Incorrect 6 ms 464 KB Output isn't correct
17 Incorrect 5 ms 464 KB Output isn't correct
18 Incorrect 5 ms 464 KB Output isn't correct
19 Incorrect 5 ms 464 KB Output isn't correct
20 Incorrect 4 ms 464 KB Output isn't correct
21 Incorrect 20 ms 1056 KB Output isn't correct
22 Incorrect 17 ms 1156 KB Output isn't correct
23 Incorrect 18 ms 1064 KB Output isn't correct
24 Incorrect 23 ms 1060 KB Output isn't correct
25 Incorrect 16 ms 1104 KB Output isn't correct
26 Incorrect 20 ms 980 KB Output isn't correct
27 Incorrect 20 ms 1064 KB Output isn't correct
28 Incorrect 18 ms 1064 KB Output isn't correct
29 Incorrect 18 ms 984 KB Output isn't correct
30 Incorrect 11 ms 1072 KB Output isn't correct
31 Incorrect 0 ms 208 KB Output isn't correct
32 Incorrect 0 ms 208 KB Output isn't correct