답안 #14127

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
14127 2015-05-02T07:12:29 Z minchurl 정전 (OJUZ10_blackout) C++
30 / 100
51 ms 2256 KB
#include<stdio.h>
#include<algorithm>
using namespace std;
int n,l,b[150005],t[150005],dap;
void make_dap(){
    //int ;

}
void f(int cnt){
    if(cnt==n){
        make_dap();
        return ;
    }
    t[cnt]=0;
    f(cnt+1);
    t[cnt]=1;
    f(cnt+1);
}
int main(){
    int i;
    scanf("%d %d",&n,&l);
    for(i=0;i<n;i++)   scanf("%d",&b[i]);
    sort(b,b+n);
    /*if(n<=15){
        f(0);
        printf("%d\n",dap);
        return 0;
    }*/
    for(i=1;i<n;i++){
        if(b[i-1]+l<=b[i]-l) continue;
        dap+=b[i-1]-b[i]+l*2;
    }
    printf("%d\n",dap);
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 2256 KB Output isn't correct
2 Incorrect 0 ms 2256 KB Output isn't correct
3 Correct 0 ms 2256 KB Output is correct
4 Correct 0 ms 2256 KB Output is correct
5 Incorrect 0 ms 2256 KB Output isn't correct
6 Correct 0 ms 2256 KB Output is correct
7 Incorrect 0 ms 2256 KB Output isn't correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 2256 KB Output isn't correct
2 Incorrect 0 ms 2256 KB Output isn't correct
3 Incorrect 0 ms 2256 KB Output isn't correct
4 Incorrect 0 ms 2256 KB Output isn't correct
5 Incorrect 0 ms 2256 KB Output isn't correct
6 Incorrect 0 ms 2256 KB Output isn't correct
7 Incorrect 0 ms 2256 KB Output isn't correct
8 Incorrect 0 ms 2256 KB Output isn't correct
9 Incorrect 0 ms 2256 KB Output isn't correct
10 Incorrect 0 ms 2256 KB Output isn't correct
# 결과 실행 시간 메모리 Grader output
1 Correct 28 ms 2256 KB Output is correct
2 Correct 1 ms 2256 KB Output is correct
3 Correct 46 ms 2256 KB Output is correct
4 Correct 48 ms 2256 KB Output is correct
5 Correct 38 ms 2256 KB Output is correct
6 Correct 30 ms 2256 KB Output is correct
7 Correct 23 ms 2256 KB Output is correct
8 Correct 14 ms 2256 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 33 ms 2256 KB Output isn't correct
2 Incorrect 50 ms 2256 KB Output isn't correct
3 Incorrect 32 ms 2256 KB Output isn't correct
4 Incorrect 2 ms 2256 KB Output isn't correct
5 Incorrect 42 ms 2256 KB Output isn't correct
6 Incorrect 32 ms 2256 KB Output isn't correct
7 Incorrect 41 ms 2256 KB Output isn't correct
8 Incorrect 42 ms 2256 KB Output isn't correct
9 Incorrect 27 ms 2256 KB Output isn't correct
10 Incorrect 29 ms 2256 KB Output isn't correct
11 Incorrect 30 ms 2256 KB Output isn't correct
12 Incorrect 51 ms 2256 KB Output isn't correct
13 Incorrect 14 ms 2256 KB Output isn't correct
14 Incorrect 19 ms 2256 KB Output isn't correct
15 Incorrect 28 ms 2256 KB Output isn't correct