답안 #876130

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
876130 2023-11-21T09:50:36 Z vjudge1 Gap (APIO16_gap) C++17
0 / 100
22 ms 3884 KB
#include <bits/stdc++.h>
#include "gap.h"

#define pb push_back
#define eb emplace_back
#define sz(x) (int)x.size()
#define all(x) x.begin(), x.end()
#define uniq(x) x.erase(unique(all(x)), x.end())
#define rall(x) x.rbegin(), x.rend()
//#define int long long

using namespace std;

using ll = long long;
using ull = unsigned long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;

const int mod = 1e9 + 7;
const int LOG = 20;
const int maxn = 1e5 + 5;
const double eps = 1e-9;

void setIO() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
}

ll findGap(int T, int n) {
    vector<ll> v(n);
    ll mn = 0, mx = 1e18;
    int i=0, j=n-1;

    while(i <= j) {
        MinMax(mn, mx, &mn, &mx);
        v[i] = mn;
        v[j] = mx;
        i++, j--;
    }

    ll ans = 0;
    for(int i=1; i<n; i++)
        ans = max(ans, v[i] - v[i-1]);
    return ans;
}

// int32_t main() {
//     setIO();

//     //code starts here

//     return 0;
// }
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 1 ms 2392 KB Output isn't correct
3 Incorrect 0 ms 2392 KB Output isn't correct
4 Incorrect 1 ms 2392 KB Output isn't correct
5 Incorrect 0 ms 2392 KB Output isn't correct
6 Incorrect 0 ms 2392 KB Output isn't correct
7 Incorrect 0 ms 2392 KB Output isn't correct
8 Incorrect 0 ms 2392 KB Output isn't correct
9 Incorrect 0 ms 2392 KB Output isn't correct
10 Incorrect 0 ms 2392 KB Output isn't correct
11 Incorrect 1 ms 2388 KB Output isn't correct
12 Incorrect 1 ms 2392 KB Output isn't correct
13 Incorrect 1 ms 2392 KB Output isn't correct
14 Incorrect 1 ms 2392 KB Output isn't correct
15 Incorrect 1 ms 2392 KB Output isn't correct
16 Incorrect 5 ms 2588 KB Output isn't correct
17 Incorrect 5 ms 2552 KB Output isn't correct
18 Incorrect 5 ms 2584 KB Output isn't correct
19 Incorrect 5 ms 2752 KB Output isn't correct
20 Incorrect 3 ms 2560 KB Output isn't correct
21 Incorrect 18 ms 3620 KB Output isn't correct
22 Incorrect 18 ms 3620 KB Output isn't correct
23 Incorrect 22 ms 3624 KB Output isn't correct
24 Incorrect 18 ms 3624 KB Output isn't correct
25 Incorrect 15 ms 3880 KB Output isn't correct
26 Incorrect 18 ms 3740 KB Output isn't correct
27 Incorrect 18 ms 3624 KB Output isn't correct
28 Incorrect 18 ms 3624 KB Output isn't correct
29 Incorrect 21 ms 3624 KB Output isn't correct
30 Incorrect 13 ms 3620 KB Output isn't correct
31 Incorrect 0 ms 2392 KB Output isn't correct
32 Incorrect 0 ms 2392 KB Output isn't correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 2392 KB Output is correct
2 Incorrect 1 ms 2392 KB Output isn't correct
3 Incorrect 0 ms 2392 KB Output isn't correct
4 Incorrect 0 ms 2392 KB Output isn't correct
5 Incorrect 1 ms 2600 KB Output isn't correct
6 Incorrect 0 ms 2392 KB Output isn't correct
7 Incorrect 0 ms 2392 KB Output isn't correct
8 Incorrect 0 ms 2392 KB Output isn't correct
9 Incorrect 0 ms 2644 KB Output isn't correct
10 Incorrect 0 ms 2392 KB Output isn't correct
11 Incorrect 1 ms 2392 KB Output isn't correct
12 Incorrect 1 ms 2392 KB Output isn't correct
13 Incorrect 1 ms 2392 KB Output isn't correct
14 Incorrect 1 ms 2392 KB Output isn't correct
15 Incorrect 1 ms 2392 KB Output isn't correct
16 Incorrect 5 ms 2772 KB Output isn't correct
17 Incorrect 5 ms 2584 KB Output isn't correct
18 Incorrect 5 ms 2752 KB Output isn't correct
19 Incorrect 5 ms 2568 KB Output isn't correct
20 Incorrect 3 ms 2572 KB Output isn't correct
21 Incorrect 18 ms 3628 KB Expected int32, but "5000050000" found
22 Incorrect 18 ms 3620 KB Expected int32, but "5000050000" found
23 Incorrect 18 ms 3628 KB Expected int32, but "5000050000" found
24 Incorrect 19 ms 3536 KB Expected int32, but "5000050000" found
25 Incorrect 15 ms 3620 KB Expected int32, but "5000050000" found
26 Incorrect 18 ms 3620 KB Expected int32, but "5000050000" found
27 Incorrect 18 ms 3884 KB Expected int32, but "5000050000" found
28 Incorrect 18 ms 3628 KB Expected int32, but "5000050000" found
29 Incorrect 18 ms 3624 KB Expected int32, but "5000050000" found
30 Incorrect 13 ms 3616 KB Expected int32, but "5000050000" found
31 Incorrect 0 ms 2392 KB Output isn't correct
32 Incorrect 0 ms 2392 KB Output isn't correct