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

哪位大神给我看看,哪错了?

Posted by lijiahenglu at 2014-10-10 22:54:26 on Problem 2785
#include<iostream>
using namespace std;
int main()
{
	int a[60] ,b[60] ,c[60] ,d[60] ; 
	int n,i,f,h,j,k,x=0,sum;
	cin>>n;
	for(f=0;f<n;f++)
		cin>>a[f]>>b[f]>>c[f]>>d[f];
	for(h=0;h<n;h++)
		for(i=0;i<n;i++)
			for(j=0;j<n;j++)
				for(k=0;k<n;k++)
					{
						sum=a[h]+b[i]+c[j]+d[k];
						if(sum==0)x++;
						
					}
				cout<<x<<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