Submission #931135

# Submission time Handle Problem Language Result Execution time Memory
931135 2024-02-21T09:56:44 Z Amirreza_Fakhri Gap (APIO16_gap) C++17
0 / 100
18 ms 2032 KB
// In the name of the God

#include "gap.h"

#include <bits/stdc++.h>
#define ll long long
// #define int long long
#define pb push_back
#define F first
#define S second
#define mp make_pair
#define pii pair <int, int>
#define smin(x, y) (x) = min((x), (y))
#define smax(x, y) (x) = max((x), (y))
#define all(x) (x).begin(), (x).end()
using namespace std;

const int inf = 1e9+7;
const int mod = 998244353;
const ll maxn = 1e18;

ll a[100005];

ll findGap(int t, int n) {
    if (t == 1) {
        ll l = 1, r = n, s = 0, e = maxn;
        for (; l <= r; l++, r--) {
            ll mn, mx; MinMax(s, e, &mn, &mx);
            a[l] = mn, a[r] = mx;
            s = mn+1, r = mx-1;
        }
        ll ans = 0;
        for (ll i = 2; i <= n; i++) smax(ans, a[i]-a[i-1]);
        return ans;
    }
    return 1ll;
}

// int32_t main() {
//     ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
//     return 0;
// }











# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 344 KB Execution killed with signal 11
2 Runtime error 1 ms 600 KB Execution killed with signal 11
3 Runtime error 1 ms 600 KB Execution killed with signal 11
4 Runtime error 1 ms 600 KB Execution killed with signal 11
5 Runtime error 1 ms 600 KB Execution killed with signal 11
6 Runtime error 1 ms 600 KB Execution killed with signal 11
7 Runtime error 1 ms 600 KB Execution killed with signal 11
8 Runtime error 1 ms 600 KB Execution killed with signal 11
9 Runtime error 1 ms 600 KB Execution killed with signal 11
10 Runtime error 1 ms 600 KB Execution killed with signal 11
11 Runtime error 1 ms 600 KB Execution killed with signal 11
12 Runtime error 1 ms 600 KB Execution killed with signal 11
13 Runtime error 2 ms 596 KB Execution killed with signal 11
14 Runtime error 1 ms 600 KB Execution killed with signal 11
15 Runtime error 1 ms 600 KB Execution killed with signal 11
16 Runtime error 4 ms 880 KB Execution killed with signal 11
17 Runtime error 4 ms 900 KB Execution killed with signal 11
18 Runtime error 4 ms 904 KB Execution killed with signal 11
19 Runtime error 4 ms 1068 KB Execution killed with signal 11
20 Runtime error 3 ms 880 KB Execution killed with signal 11
21 Runtime error 15 ms 1984 KB Execution killed with signal 11
22 Runtime error 15 ms 1980 KB Execution killed with signal 11
23 Runtime error 13 ms 1996 KB Execution killed with signal 11
24 Runtime error 18 ms 1964 KB Execution killed with signal 11
25 Runtime error 13 ms 1996 KB Execution killed with signal 11
26 Runtime error 13 ms 1972 KB Execution killed with signal 11
27 Runtime error 15 ms 2032 KB Execution killed with signal 11
28 Runtime error 14 ms 1980 KB Execution killed with signal 11
29 Runtime error 14 ms 1964 KB Execution killed with signal 11
30 Runtime error 8 ms 1964 KB Execution killed with signal 11
31 Runtime error 1 ms 600 KB Execution killed with signal 11
32 Runtime error 1 ms 852 KB Execution killed with signal 11
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Incorrect 0 ms 344 KB Output isn't correct
3 Incorrect 1 ms 344 KB Output isn't correct
4 Incorrect 0 ms 344 KB Output isn't correct
5 Incorrect 1 ms 344 KB Output isn't correct
6 Incorrect 0 ms 344 KB Output isn't correct
7 Incorrect 0 ms 344 KB Output isn't correct
8 Incorrect 0 ms 344 KB Output isn't correct
9 Incorrect 0 ms 344 KB Output isn't correct
10 Incorrect 0 ms 344 KB Output isn't correct
11 Incorrect 0 ms 344 KB Output isn't correct
12 Incorrect 1 ms 596 KB Output isn't correct
13 Incorrect 0 ms 344 KB Output isn't correct
14 Incorrect 1 ms 344 KB Output isn't correct
15 Incorrect 1 ms 344 KB Output isn't correct
16 Incorrect 4 ms 904 KB Output isn't correct
17 Incorrect 3 ms 652 KB Output isn't correct
18 Incorrect 3 ms 640 KB Output isn't correct
19 Incorrect 3 ms 644 KB Output isn't correct
20 Incorrect 2 ms 616 KB Output isn't correct
21 Incorrect 12 ms 1212 KB Output isn't correct
22 Incorrect 13 ms 1216 KB Output isn't correct
23 Incorrect 13 ms 1220 KB Output isn't correct
24 Incorrect 14 ms 1420 KB Output isn't correct
25 Incorrect 12 ms 1212 KB Output isn't correct
26 Incorrect 13 ms 1212 KB Output isn't correct
27 Incorrect 13 ms 1404 KB Output isn't correct
28 Incorrect 12 ms 1444 KB Output isn't correct
29 Incorrect 12 ms 1212 KB Output isn't correct
30 Incorrect 9 ms 1180 KB Output isn't correct
31 Incorrect 0 ms 344 KB Output isn't correct
32 Incorrect 0 ms 344 KB Output isn't correct