답안 #14295

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
14295 2015-05-10T07:42:33 Z woqja125 볼질 (OJUZ10_ballparade) C++
0 / 100
25 ms 1084 KB
#include<stdio.h>
int main()
{
	int n, i, s=0, t;
	scanf("%d", &n);
	unsigned base = 0, bcount = 0;
	for(i=1; i<=n; i++)
	{
		scanf("%d", &t);
		switch(t)
		{
		case 3:
			base<<=1;
		case 1:
			bcount++;
			break;
		case 2:
			bcount = 4;
			break;
		}
		if(bcount == 4)
		{
			int x = ~base;
			x -= x&(-x);
			base = ~x;
			bcount = 0;
		}
		s += base/8; base %=8;
		printf("#%d %d %d\n", s, base, bcount);
	}
	printf("%d", s);
	return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 1084 KB Output isn't correct
2 Incorrect 0 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 0 ms 1084 KB Output isn't correct
6 Incorrect 0 ms 1084 KB Output isn't correct
7 Incorrect 7 ms 1084 KB Output isn't correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 1084 KB Output isn't correct
2 Incorrect 0 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 0 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
8 Incorrect 0 ms 1084 KB Output isn't correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 1084 KB Output isn't correct
2 Incorrect 0 ms 1084 KB Output isn't correct
3 Incorrect 0 ms 1084 KB Output isn't correct
4 Incorrect 12 ms 1084 KB Output isn't correct
5 Incorrect 0 ms 1084 KB Output isn't correct
6 Incorrect 20 ms 1084 KB Output isn't correct
7 Incorrect 0 ms 1084 KB Output isn't correct
8 Incorrect 0 ms 1084 KB Output isn't correct
9 Incorrect 24 ms 1084 KB Output isn't correct
10 Incorrect 0 ms 1084 KB Output isn't correct
11 Incorrect 16 ms 1084 KB Output isn't correct
12 Incorrect 25 ms 1084 KB Output isn't correct
13 Incorrect 0 ms 1084 KB Output isn't correct
14 Incorrect 0 ms 1084 KB Output isn't correct
15 Incorrect 20 ms 1084 KB Output isn't correct