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_20612520_25592.cpp: In function 'int main()':
0_0_20612520_25592.cpp:3:173: error: 'memset' was not declared in this scope
     using namespace std; const int M = 1010;int Map[M][M];int C[M];int R[M]; int main(){    int n;    int k = 0;    while(scanf("%d",&n),n)    {        memset(C,0,sizeof(C));        memset(R,0,sizeof(R));        int ans = 0;        int res = 0;        for(int i = 1; i <= n; i++)        {            for(int j = 1; j <= n; j++)            {                cin>>Map[i][j];                ans += Map[i][j];                 C[i] += Map[i][j];             }        }        for(int i = 1; i <= n; i++)        {            for(int  j = 1; j <= n; j++)            {                R[i] += Map[j][i];            }            int cnt = C[i] - R[i];            if(cnt > 0)            {                res += cnt;            }        }        printf("%d. %d %d\n",++k,ans,res);    }    return 0;}
                                                                                                                                                                             ^


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-07-08 18:59:23, Gzip enabled