F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_31907771_28233.cpp: In function 'int main()':
0_0_31907771_28233.cpp:11:167: error: expected statement at end of input
 using namespace std;typedef long long ll;typedef double de;typedef char ar;int main(){    ll n,m;    de a[55][8];    while(cin>>n>>m)    {        for(ll i=0; i<n; i++)                     //输入数据的同时直接把个人的平均成绩求出来,存在二维数组最后面。        {            de sum=0;            for(ll j=0; j<m; j++)            {                cin>>a[i][j];                sum=sum+a[i][j];            }            a[i][m]=sum*1.0/m;        }        for(int i=0; i<n; i++)                  //输出个人平均成绩。        {            if(i<n-1)                printf("%.2f ",a[i][m]);            else                printf("%.2f\n",a[i][m]);        }        for(ll j=0; j<m; j++)                    //计算所有同学每一科的平均成绩,存在二维数组最下面,并做输出。        {            de num=0;            for(ll i=0; i<n; i++)            {                num=num+a[i][j];            }            a[n][j]=num/n;            if(j<m-1)                printf("%.2f ",a[n][j]);            else                printf("%.2f\n",a[n][j]);        }        ll x=0;        for(int i=0; i<n; i++)     //通过二维数组最下面的所有人每一科平均成绩与上面的值进行比较,如果都满足则进行“x++”        {            ll y=0;            for(int j=0; j<m; j++)            {                if(a[i][j]>=a[n][j])                    y++;                if(y==m)                    x++;            }        }        printf("%lld\n",x);        cout<<endl;           //最后记得再空出一行。(题意看仔细)    }    return 0;}
                                                                                                                                                                       ^
0_0_31907771_28233.cpp:11:167: error: expected '}' at end of input
0_0_31907771_28233.cpp:11:167: error: expected '}' at end of input


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-16 07:51:07, Gzip enabled