Submission #14278

# Submission time Handle Problem Language Result Execution time Memory
14278 2015-05-10T01:04:29 Z jang718 볼질 (OJUZ10_ballparade) C++
0 / 100
7 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;
            for(i=4;i>=2;i--)if(a[i-1]==1){a[i]=1;a[i-1]=0;}
            a[1]=1;
        }
        else{
            b++;
            for(i=3;i>=1;i--)if(a[i]==1){a[i+1]=1;a[i]=0;}
        }
        if(b==4){
            b=0;
            for(i=3;i>=1;i--)if(a[i-1]==1){a[i+1]=1;a[i]=0;}
            a[1]=1;
        }
        if(a[4]==1){
            score++;
            a[4]=0;
        }
    }
    printf("%d",score);
    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 1084 KB Output isn't correct
2 Incorrect 6 ms 1084 KB Output isn't correct
3 Correct 0 ms 1084 KB Output is correct
4 Incorrect 0 ms 1084 KB Output isn't correct
5 Incorrect 3 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
# Verdict Execution time Memory Grader output
1 Incorrect 7 ms 1084 KB Output isn't correct
2 Incorrect 3 ms 1084 KB Output isn't correct
3 Incorrect 0 ms 1084 KB Output isn't correct
4 Incorrect 7 ms 1084 KB Output isn't correct
5 Incorrect 0 ms 1084 KB Output isn't correct
6 Correct 0 ms 1084 KB Output is correct
7 Incorrect 0 ms 1084 KB Output isn't correct
8 Correct 0 ms 1084 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 1084 KB Output isn't correct
2 Incorrect 0 ms 1084 KB Output isn't correct
3 Incorrect 6 ms 1084 KB Output isn't correct
4 Incorrect 5 ms 1084 KB Output isn't correct
5 Incorrect 7 ms 1084 KB Output isn't correct
6 Incorrect 6 ms 1084 KB Output isn't correct
7 Incorrect 3 ms 1084 KB Output isn't correct
8 Correct 0 ms 1084 KB Output is correct
9 Incorrect 7 ms 1084 KB Output isn't correct
10 Incorrect 6 ms 1084 KB Output isn't correct
11 Correct 0 ms 1084 KB Output is correct
12 Incorrect 0 ms 1084 KB Output isn't correct
13 Incorrect 7 ms 1084 KB Output isn't correct
14 Incorrect 0 ms 1084 KB Output isn't correct
15 Incorrect 0 ms 1084 KB Output isn't correct