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

what is the wrong on my solution on problem 1014

Posted by AhmedQuset at 2008-07-26 18:31:31 on Problem 1014
#include <iostream>
using namespace std;
int main()
{int i,j,sum=0,count=0;
	int a[100][6];
	for(i=0;i<50;i++)
	{
		for(j=0;j<6;j++)
		{
			cin>>a[i][j];
		}
		for(int k=0;k<6;k++)
		{if(a[i][k]==0)
		{count++;
		}
		}
		if(count==6)
		{
			break;
		}
		count=0;
	}
	for(int m=0;m<i;m++)
	{
		for(int n=0;n<6;n++)
		{
			sum+=a[m][n];
		}
		if(sum%2==0)
		{
			cout<<"Collection #"<<m+1<<":"<<endl;
			cout<<"Can't be divided.";
			cout<<endl;
		}
		
		else
		{cout<<endl;
			cout<<"Collection #"<<m+1<<":"<<endl;
			cout<<"Can be divided.";
			cout<<endl;
		}
	}

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