| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
哪位大神给我看看,哪错了?#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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator