# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
14291 | mindol | 볼질 (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<cstdio>
int juja[4];
int ball_count;
int main()
{
int n,i,now,score=0;
scanf("%d",&n);
for(i=1;i<=n;i++)
{
scanf("%d",&now);
switch(now)
{
case 1:
ball_count++;
if(ball_count==4)
{
ball_count=0;
if(juja[3]==1 && juja[2]==1 && juja[1]==1)
score++;
else if(juja[2]==1 && juja[1]==1)
juja[3]=1;
else if(juja[1]==1)
juja[2]=1;
else juja[1]=1;
}
break;
case 2:
ball_count=0;
if(juja[3]==1 && juja[2]==1 && juja[1]==1)
score++;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |