답안 #14279

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
14279 2015-05-10T01:12:05 Z jang718 볼질 (OJUZ10_ballparade) C++
0 / 100
52 ms 1084 KB
#include<stdio.h>
int main() {
    int i,j,n,score=0,k,a[5]={0,},b=0;
    scanf("%d",&n);
    for(j=0;j<n;j++){
        scanf("%d",&k);
        if(k==1)b++;
        else if(k==2){
            b=0;
            a[0]=1;
            for(i=3;i>=1;i--)if(a[i-1]==1&&a[i]==1){a[i+1]=1;a[i]=0;}
            a[1]=1;
            a[0]=0;
        }
        else{
            b++;
            for(i=3;i>=1;i--)if(a[i]==1){a[i+1]=1;a[i]=0;}
        }
        if(b==4){
            b=0;
            a[0]=1;
            for(i=3;i>=1;i--)if(a[i-1]==1&&a[i]==1){a[i+1]=1;a[i]=0;}
            a[1]=1;
            a[0]=0;
        }
        if(a[4]==1){
            score++;
            a[4]=0;
        }
        printf("%d %d %d\n",j+1,score,b);
        for(i=1;i<=4;i++)printf("%d ",a[i]);
        printf("\n");
    }
    printf("%d",score);
    return 0;
}

# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 1084 KB Output isn't correct
2 Incorrect 0 ms 1084 KB Output isn't correct
3 Incorrect 0 ms 1084 KB Output isn't correct
4 Incorrect 0 ms 1084 KB Output isn't correct
5 Incorrect 0 ms 1084 KB Output isn't correct
6 Incorrect 0 ms 1084 KB Output isn't correct
7 Incorrect 36 ms 1084 KB Output isn't correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 9 ms 1084 KB Output isn't correct
2 Incorrect 0 ms 1084 KB Output isn't correct
3 Incorrect 0 ms 1084 KB Output isn't correct
4 Incorrect 52 ms 1084 KB Output isn't correct
5 Incorrect 41 ms 1084 KB Output isn't correct
6 Incorrect 0 ms 1084 KB Output isn't correct
7 Incorrect 0 ms 1084 KB Output isn't correct
8 Incorrect 0 ms 1084 KB Output isn't correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 40 ms 1084 KB Output isn't correct
2 Incorrect 0 ms 1084 KB Output isn't correct
3 Incorrect 44 ms 1084 KB Output isn't correct
4 Incorrect 0 ms 1084 KB Output isn't correct
5 Incorrect 0 ms 1084 KB Output isn't correct
6 Incorrect 38 ms 1084 KB Output isn't correct
7 Incorrect 0 ms 1084 KB Output isn't correct
8 Incorrect 0 ms 1084 KB Output isn't correct
9 Incorrect 0 ms 1084 KB Output isn't correct
10 Incorrect 0 ms 1084 KB Output isn't correct
11 Incorrect 0 ms 1084 KB Output isn't correct
12 Incorrect 0 ms 1084 KB Output isn't correct
13 Incorrect 0 ms 1084 KB Output isn't correct
14 Incorrect 0 ms 1084 KB Output isn't correct
15 Incorrect 35 ms 1084 KB Output isn't correct