| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 16840 | sinceww77 | 볼질 (OJUZ10_ballparade) | C++98 | 8 ms | 1276 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <stdio.h>
int data[50010],c[5];
int main()
{
int i,j,n,m,b=0,tot=0;
scanf("%d\n",&n);
for(i=0;i<n;i++)
{
scanf("%d ",&m);
if(m==1) b++;
if(b==4)
{
if(c[3]==1)
{
c[3]=0;
tot+=1;
}
if(c[2]==1)
{
c[2]=0;
c[3]=1;
}
if(c[1]==1)
{
c[2]=1;
}
b=0;
}
if(m==2)
{
if(c[3]==1)
{
c[3]=0;
tot+=1;
}
if(c[2]==1)
{
c[2]=0;
c[3]=1;
}
if(c[1]==1)
{
c[2]=1;
}
c[1]=1;
b=0;
}
if(m==3)
{
if(c[3]==1)
{
c[3]=0;
tot+=1;
}
if(c[2]==1)
{
c[2]=0;
c[3]=1;
}
if(c[1]==1)
{
c[1]=0;
c[2]=1;
}
b=0;
}
}
printf("%d",tot);
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... | ||||
