| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 14031 | baneling100 | 볼질 (OJUZ10_ballparade) | C++98 | 7 ms | 1084 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <stdio.h>
int N, One, Two, Three, Ball, Score;
int main(void) {
int i, num;
scanf("%d",&N);
for(i=1 ; i<=N ; i++) {
scanf("%d",&num);
if(num==1) Ball++;
if(num==3) {
Ball++;
if(Three) {
Three=0;
Score++;
}
if(Two) {
Two=0;
Three=1;
}
if(One) {
One=0;
Two=1;
}
}
if(num==2 || Ball==4) {
Ball=0;
if(One && Two && Three) {
Three=0;
Score++;
}
if(One && Two) {
Two=0;
Three=1;
}
if(One) {
One=0;
Two=1;
}
One=1;
}
}
printf("%d",Score);
return 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
