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;}
^
|