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_20612430_9403.cpp: In function 'int main()':
0_0_20612430_9403.cpp:2:241: error: 'memset' was not declared in this scope
     using namespace std; const int size = 1010;char str[size];int h[size];int cnt[size]; int main(){    cin.sync_with_stdio(false);    int n , m , ans , sum , maxH , area;    while( cin >> n >> m )    {        memset( cnt , 0 , sizeof(cnt) );        memset( h , 0 , sizeof(h) );        ans = 0;        for( int i = 1 ; i<=n ; i++ )        {            maxH = sum = 0;            cin >> str;            for( int j = 0 ; str[j]!='\0' ; j++ )            {                if( str[j]=='1' )                    h[j+1] ++;                else                    h[j+1] = 0;                cnt[ h[j+1] ] ++;                if( maxH < h[j+1] )                    maxH = h[j+1];                        }            for( int k = 0 ; k<=maxH ; k++ )            {                if( cnt[k]!=0 )                {                    area = k * (m-sum);                    sum += cnt[k];                    if( area>ans )                        ans = area;                }                cnt[k] = 0;            }        }        cout << ans << endl;    }    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-11-25 03:20:51, Gzip enabled