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_20612950_6752.cpp:5:5: error: expected unqualified-id before '>' token
     > M, cst = hm[cur].st[j] & D, td = nl;            for(k = first[ust]; k != -1; k = next[k])            {                st = v[k], cnt = 0;                tc = cst ^ st, td = nl;                for(t = 0; t < M; t ++)                    if(st & 1 << t)                    {                        ++ cnt;                        if(d[i][t][0]) td ^= 1 << t;                        if(d[i][t][1]) td ^= 1 << t + 1;                        if(d[i][t][2]) tc ^= 1 << t + 1;                        if(d[i][t][6]) tc ^= 1 << t - 1;                        if(d[i][t][7]) td ^= 1 << t - 1;                        }                hm[cur ^ 1].push(tc << M | td, hm[cur].ans[j] + cnt);            }        }        cur ^= 1;    }    for(i = 0; i < hm[cur].size; i ++)        if((hm[cur].st[i] >> M) == 0) ans = std::min(ans, hm[cur].ans[i]);    printf("%d\n", ans == INF ? -1 : ans);}int main(){    int t, tt;    scanf("%d", &t);    for(tt = 1; tt <= t; tt ++)    {        init();        printf("Case %d: ", tt);        solve();    }    return 0;}
     ^
0_0_20612950_6752.cpp:5:55: error: expected unqualified-id before 'for'
     > M, cst = hm[cur].st[j] & D, td = nl;            for(k = first[ust]; k != -1; k = next[k])            {                st = v[k], cnt = 0;                tc = cst ^ st, td = nl;                for(t = 0; t < M; t ++)                    if(st & 1 << t)                    {                        ++ cnt;                        if(d[i][t][0]) td ^= 1 << t;                        if(d[i][t][1]) td ^= 1 << t + 1;                        if(d[i][t][2]) tc ^= 1 << t + 1;                        if(d[i][t][6]) tc ^= 1 << t - 1;                        if(d[i][t][7]) td ^= 1 << t - 1;                        }                hm[cur ^ 1].push(tc << M | td, hm[cur].ans[j] + cnt);            }        }        cur ^= 1;    }    for(i = 0; i < hm[cur].size; i ++)        if((hm[cur].st[i] >> M) == 0) ans = std::min(ans, hm[cur].ans[i]);    printf("%d\n", ans == INF ? -1 : ans);}int main(){    int t, tt;    scanf("%d", &t);    for(tt = 1; tt <= t; tt ++)    {        init();        printf("Case %d: ", tt);        solve();    }    return 0;}
                                                       ^
0_0_20612950_6752.cpp:5:75: error: 'k' does not name a type
     > M, cst = hm[cur].st[j] & D, td = nl;            for(k = first[ust]; k != -1; k = next[k])            {                st = v[k], cnt = 0;                tc = cst ^ st, td = nl;                for(t = 0; t < M; t ++)                    if(st & 1 << t)                    {                        ++ cnt;                        if(d[i][t][0]) td ^= 1 << t;                        if(d[i][t][1]) td ^= 1 << t + 1;                        if(d[i][t][2]) tc ^= 1 << t + 1;                        if(d[i][t][6]) tc ^= 1 << t - 1;                        if(d[i][t][7]) td ^= 1 << t - 1;                        }                hm[cur ^ 1].push(tc << M | td, hm[cur].ans[j] + cnt);            }        }        cur ^= 1;    }    for(i = 0; i < hm[cur].size; i ++)        if((hm[cur].st[i] >> M) == 0) ans = std::min(ans, hm[cur].ans[i]);    printf("%d\n", ans == INF ? -1 : ans);}int main(){    int t, tt;    scanf("%d", &t);    for(tt = 1; tt <= t; tt ++)    {        init();        printf("Case %d: ", tt);        solve();    }    return 0;}
                                                                           ^
0_0_20612950_6752.cpp:5:84: error: 'k' does not name a type
     > M, cst = hm[cur].st[j] & D, td = nl;            for(k = first[ust]; k != -1; k = next[k])            {                st = v[k], cnt = 0;                tc = cst ^ st, td = nl;                for(t = 0; t < M; t ++)                    if(st & 1 << t)                    {                        ++ cnt;                        if(d[i][t][0]) td ^= 1 << t;                        if(d[i][t][1]) td ^= 1 << t + 1;                        if(d[i][t][2]) tc ^= 1 << t + 1;                        if(d[i][t][6]) tc ^= 1 << t - 1;                        if(d[i][t][7]) td ^= 1 << t - 1;                        }                hm[cur ^ 1].push(tc << M | td, hm[cur].ans[j] + cnt);            }        }        cur ^= 1;    }    for(i = 0; i < hm[cur].size; i ++)        if((hm[cur].st[i] >> M) == 0) ans = std::min(ans, hm[cur].ans[i]);    printf("%d\n", ans == INF ? -1 : ans);}int main(){    int t, tt;    scanf("%d", &t);    for(tt = 1; tt <= t; tt ++)    {        init();        printf("Case %d: ", tt);        solve();    }    return 0;}
                                                                                    ^
0_0_20612950_6752.cpp:5:700: error: expected declaration before '}' token
     > M, cst = hm[cur].st[j] & D, td = nl;            for(k = first[ust]; k != -1; k = next[k])            {                st = v[k], cnt = 0;                tc = cst ^ st, td = nl;                for(t = 0; t < M; t ++)                    if(st & 1 << t)                    {                        ++ cnt;                        if(d[i][t][0]) td ^= 1 << t;                        if(d[i][t][1]) td ^= 1 << t + 1;                        if(d[i][t][2]) tc ^= 1 << t + 1;                        if(d[i][t][6]) tc ^= 1 << t - 1;                        if(d[i][t][7]) td ^= 1 << t - 1;                        }                hm[cur ^ 1].push(tc << M | td, hm[cur].ans[j] + cnt);            }        }        cur ^= 1;    }    for(i = 0; i < hm[cur].size; i ++)        if((hm[cur].st[i] >> M) == 0) ans = std::min(ans, hm[cur].ans[i]);    printf("%d\n", ans == INF ? -1 : ans);}int main(){    int t, tt;    scanf("%d", &t);    for(tt = 1; tt <= t; tt ++)    {        init();        printf("Case %d: ", tt);        solve();    }    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-27 01:02:48, Gzip enabled