답안 #910431

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
910431 2024-01-18T05:02:56 Z ibm2006 Gap (APIO16_gap) C++17
30 / 100
31 ms 3528 KB
#include "gap.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
ll n,s,l,r,x,y,z,w,a[1100000],i,j,k,m;
long long findGap(int T, int N)
{
    n=N;
    if(T==1)
    {
        l=0;
        r=1e18-1;
        x=1;
        y=n;
        while(l<r)
        {
            MinMax(l,r,&l,&r);
            a[x]=l;
            a[y]=r;
            x++;
            y--;
            if(l==r||x>y)
                break;
            l++;
            r--;
        }
        for(i=1;i<n;i++)
        {
            s=max(s,a[i+1]-a[i]);
        }
        return s;
    }
	return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1 ms 344 KB Output is correct
3 Correct 1 ms 360 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Correct 1 ms 344 KB Output is correct
6 Correct 0 ms 344 KB Output is correct
7 Correct 1 ms 344 KB Output is correct
8 Correct 1 ms 344 KB Output is correct
9 Correct 0 ms 344 KB Output is correct
10 Correct 0 ms 344 KB Output is correct
11 Correct 1 ms 344 KB Output is correct
12 Correct 1 ms 344 KB Output is correct
13 Correct 1 ms 344 KB Output is correct
14 Correct 1 ms 344 KB Output is correct
15 Correct 1 ms 344 KB Output is correct
16 Correct 8 ms 2668 KB Output is correct
17 Correct 8 ms 2692 KB Output is correct
18 Correct 7 ms 2692 KB Output is correct
19 Correct 8 ms 2696 KB Output is correct
20 Correct 7 ms 2668 KB Output is correct
21 Correct 28 ms 3268 KB Output is correct
22 Correct 29 ms 3260 KB Output is correct
23 Correct 31 ms 3528 KB Output is correct
24 Correct 29 ms 3260 KB Output is correct
25 Correct 25 ms 3248 KB Output is correct
26 Correct 28 ms 3256 KB Output is correct
27 Correct 28 ms 3304 KB Output is correct
28 Correct 29 ms 3260 KB Output is correct
29 Correct 28 ms 3256 KB Output is correct
30 Correct 23 ms 3360 KB Output is correct
31 Correct 0 ms 344 KB Output is correct
32 Correct 0 ms 344 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 344 KB Output isn't correct
2 Incorrect 0 ms 344 KB Output isn't correct
3 Incorrect 0 ms 344 KB Output isn't correct
4 Incorrect 1 ms 344 KB Output isn't correct
5 Incorrect 0 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 1 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 1 ms 344 KB Output isn't correct
12 Incorrect 1 ms 344 KB Output isn't correct
13 Incorrect 1 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 640 KB Output isn't correct
17 Incorrect 4 ms 808 KB Output isn't correct
18 Incorrect 4 ms 536 KB Output isn't correct
19 Incorrect 4 ms 648 KB Output isn't correct
20 Incorrect 2 ms 612 KB Output isn't correct
21 Incorrect 13 ms 1220 KB Output isn't correct
22 Incorrect 22 ms 1076 KB Output isn't correct
23 Incorrect 15 ms 1216 KB Output isn't correct
24 Incorrect 13 ms 1216 KB Output isn't correct
25 Incorrect 10 ms 1208 KB Output isn't correct
26 Incorrect 14 ms 1108 KB Output isn't correct
27 Incorrect 12 ms 1380 KB Output isn't correct
28 Incorrect 15 ms 1212 KB Output isn't correct
29 Incorrect 13 ms 1272 KB Output isn't correct
30 Incorrect 8 ms 1200 KB Output isn't correct
31 Incorrect 1 ms 412 KB Output isn't correct
32 Incorrect 1 ms 344 KB Output isn't correct