Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

怎么会RE啊

Posted by miaomiaomiaomiao at 2007-07-18 15:37:08 on Problem 2441
哪个大牛能给点指点啊!谢谢了,最好是给些数据!!!runtime error!
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <math.h>

int n, m, tail, num, deq[11000000];

int main()
{
	int front, end, tmp, ends, i, j, k;
	while (scanf("%d %d", &n, &m) != EOF)
	{
		if (m < n)
		{
			printf("0\n");
			continue;
		}
		front = 0;
		end = 0;
		scanf("%d", &tail);
		for (j = 1; j <= tail; j++)
		{
			scanf("%d", &num);
			tmp = int(pow(double(2), double(num)));
			deq[end++] = tmp;
		}
		for (i = 2; i <= n; i++)
		{
			scanf("%d", &tail);
			ends = end;
			for (j = 1; j <= tail; j++)
			{
				scanf("%d", &num);
				tmp = int(pow(double(2), double(num)));
				for (k = front; k < end; k++)
				{
					if ((tmp&deq[k]) == 0)
					{
						deq[ends++] = deq[k]+tmp;
					}
				}
			}
			front = end;
			end = ends;
		}
		printf("%d\n", end-front);
	}
//	system("pause");
	return 0;
}		

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator