답안 #880057

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
880057 2023-11-28T16:39:21 Z JakobZorz Gap (APIO16_gap) C++14
0 / 100
29 ms 4488 KB
#include"gap.h"
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
typedef long long ll;

ll find_gap1(int n){
    vector<ll>vec1,vec2;
    ll l=0,r=1e18;
    while(true){
        MinMax(l,r,&l,&r);
        if(l==r){
            if(l!=-1)
                vec1.push_back(l);
            break;
        }
        vec1.push_back(l);
        vec2.push_back(r);
        l++;
        r--;
    }
    reverse(vec2.begin(),vec2.end());
    vec1.insert(vec1.end(),vec2.begin(),vec2.end());
    ll res=0;
    for(int i=1;i<n;i++)
        res=max(res,vec1[i]-vec1[i-1]);
    return res;
}

ll find_gap2(int n){
    return 0;
}

ll findGap(int t,int n){
    if(t==1){
        return find_gap1(n);
    }else{
        return find_gap2(n);
    }
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Correct 2 ms 2644 KB Output is correct
3 Correct 1 ms 2392 KB Output is correct
4 Correct 0 ms 2392 KB Output is correct
5 Correct 0 ms 2392 KB Output is correct
6 Incorrect 0 ms 2392 KB Output isn't correct
7 Incorrect 0 ms 2392 KB Output isn't correct
8 Incorrect 1 ms 2392 KB Output isn't correct
9 Incorrect 1 ms 2392 KB Output isn't correct
10 Runtime error 0 ms 2392 KB Execution failed because the return code was nonzero
11 Incorrect 1 ms 2392 KB Output isn't correct
12 Incorrect 1 ms 2392 KB Output isn't correct
13 Incorrect 1 ms 2480 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 7 ms 3100 KB Output isn't correct
17 Incorrect 10 ms 3248 KB Output isn't correct
18 Incorrect 7 ms 3096 KB Output isn't correct
19 Incorrect 8 ms 3076 KB Output isn't correct
20 Runtime error 6 ms 2828 KB Execution failed because the return code was nonzero
21 Incorrect 29 ms 4416 KB Output isn't correct
22 Incorrect 29 ms 4436 KB Output isn't correct
23 Incorrect 29 ms 4488 KB Output isn't correct
24 Incorrect 29 ms 4416 KB Output isn't correct
25 Incorrect 28 ms 4420 KB Output isn't correct
26 Incorrect 29 ms 4404 KB Output isn't correct
27 Incorrect 29 ms 4372 KB Output isn't correct
28 Incorrect 29 ms 4428 KB Output isn't correct
29 Incorrect 29 ms 4448 KB Output isn't correct
30 Runtime error 25 ms 3684 KB Execution failed because the return code was nonzero
31 Runtime error 1 ms 2392 KB Execution failed because the return code was nonzero
32 Runtime error 1 ms 2392 KB Execution failed because the return code was nonzero
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 2392 KB Output isn't 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 2392 KB Output isn't correct
6 Incorrect 0 ms 2392 KB Output isn't correct
7 Incorrect 1 ms 2392 KB Output isn't correct
8 Incorrect 1 ms 2392 KB Output isn't correct
9 Incorrect 1 ms 2392 KB Output isn't correct
10 Incorrect 1 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 3 ms 2696 KB Output isn't correct
17 Incorrect 4 ms 2588 KB Output isn't correct
18 Incorrect 3 ms 2752 KB Output isn't correct
19 Incorrect 3 ms 2584 KB Output isn't correct
20 Incorrect 2 ms 2568 KB Output isn't correct
21 Incorrect 12 ms 2844 KB Output isn't correct
22 Incorrect 13 ms 2644 KB Output isn't correct
23 Incorrect 12 ms 2860 KB Output isn't correct
24 Incorrect 12 ms 2860 KB Output isn't correct
25 Incorrect 10 ms 2848 KB Output isn't correct
26 Incorrect 12 ms 2820 KB Output isn't correct
27 Incorrect 12 ms 2940 KB Output isn't correct
28 Incorrect 13 ms 2856 KB Output isn't correct
29 Incorrect 17 ms 2860 KB Output isn't correct
30 Incorrect 8 ms 3076 KB Output isn't correct
31 Incorrect 1 ms 2392 KB Output isn't correct
32 Incorrect 1 ms 2392 KB Output isn't correct