답안 #14121

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
14121 2015-05-02T06:53:16 Z gs13105 볼질 (OJUZ10_ballparade) C++
22 / 100
7 ms 1084 KB
#include <stdio.h>

int main()
{
	int s=0, r=0, c=0, n, a, i;
	scanf("%d", &n);
	for(i=0;i<n;i++)
	{
		scanf("%d", &a);
		if(a==1||a==3)
		{
			if(a==3)
				s<<=1;
			c++;
		}
		if(c==4||a==2)
		{
			c=0;
			s=s<<1|1;
			if(s&(1<<3))
				r++;
		}
	}
	printf("%d", r);
	return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 1084 KB Output is correct
2 Correct 0 ms 1084 KB Output is correct
3 Correct 3 ms 1084 KB Output is correct
4 Correct 0 ms 1084 KB Output is correct
5 Correct 5 ms 1084 KB Output is correct
6 Correct 0 ms 1084 KB Output is correct
7 Correct 0 ms 1084 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 1084 KB Output isn't correct
2 Correct 0 ms 1084 KB Output is correct
3 Incorrect 0 ms 1084 KB Output isn't correct
4 Incorrect 6 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 5 ms 1084 KB Output isn't correct
8 Incorrect 0 ms 1084 KB Output isn't correct
# 결과 실행 시간 메모리 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 0 ms 1084 KB Output isn't correct
5 Incorrect 3 ms 1084 KB Output isn't correct
6 Incorrect 6 ms 1084 KB Output isn't correct
7 Incorrect 1 ms 1084 KB Output isn't correct
8 Incorrect 0 ms 1084 KB Output isn't correct
9 Incorrect 6 ms 1084 KB Output isn't correct
10 Incorrect 6 ms 1084 KB Output isn't correct
11 Incorrect 0 ms 1084 KB Output isn't correct
12 Correct 0 ms 1084 KB Output is correct
13 Incorrect 3 ms 1084 KB Output isn't correct
14 Incorrect 0 ms 1084 KB Output isn't correct
15 Incorrect 5 ms 1084 KB Output isn't correct