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_20611330_27494.cpp:8:5: error: expected unqualified-id before '=' token
     = m)    {        for(int i = 0; i < n; i++)        {            scanf("%s",map[i]);            for(int j = 0; j < m; j++)            {                if(map[i][j] == 'X')                    sta[i] = (sta[i] << 1) + 1;                else sta[i] <<= 1;            }        }    }    else    {        for(int i = 0; i < n; i++)        {            scanf("%s",map[i]);            for(int j = 0; j < m; j++)            {                if(map[i][j] == 'X')                    sta[j] = (sta[j] << 1) + 1;                else sta[j] <<= 1;            }        }        swap(n,m);    }} void solve(){    int step;    ans = INF;    for(int i = 0; i < (1<<m); i++)    {        memcpy(tmp,sta,sizeof(sta));        step = 0;        for(int j = 0; j < m && step < ans; j++)        {            if(bit[j]&i)            {                step++;                if(j > 0)                    tmp[0] ^= bit[j-1];                if(j < m-1)                    tmp[0] ^= bit[j+1];                tmp[0] ^= bit[j];                tmp[1] ^= bit[j];            }        }        for(int j = 1; j < n && step < ans; j++)        {            for(int k = 0; k < m && step < ans; k++)            {                if(bit[k]&tmp[j-1])                {                    step++;                    if(k > 0)                        tmp[j] ^= bit[k-1];                    if(k < m-1)                        tmp[j] ^= bit[k+1];                    tmp[j] ^= bit[k];                    tmp[j+1] ^= bit[k];                }            }        }         if(!tmp[n-1])            ans = min(ans,step);    }} int main(){    cal();    while(~scanf("%d %d",&n,&m))    {        if(n == 0 && m == 0) break;         input();        solve();         if(ans == INF)            printf("Damaged billboard.\n");        else printf("You have to tap %d tiles.\n",ans);    }    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-23 01:54:24, Gzip enabled