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_14514141_4301.cpp:1:10: error: #include expects "FILENAME" or <FILENAME>
 #include #include #include using namespace std; const int INF = 0x3f3f3f3f; const int M = 505; const int N = 105; int tar[N][N]; struct Oper { int x, color, id; Oper() {} Oper(int x, int color, int id) : x(x), color(color), id(id) {} } H[M], L[M]; int nh, nl, n, m; int order[M]; bool visH[M], visL[M]; int check(int x, int color, char type) { if(type == 'H') { for(int i = 1; i <= n; i++) { if(tar[x][i] == INF) continue; if(tar[x][i] != color) return false; } }else { for(int i = 1; i <= n; i++) { if(tar[i][x] == INF) continue; if(tar[i][x] != color) return false; } } return true; } void setColor(int x, char type) { if(type == 'H') { for(int i = 1; i <= n; i++) tar[x][i] = INF; }else { for(int i = 1; i <= n; i++) tar[i][x] = INF; } } void solve() { int cnt = 0; while(cnt < m) { for(int i = 0; i < nh; i++) { if(visH[i]) continue; if(check(H[i].x, H[i].color, 'H')) { setColor(H[i].x, 'H'); visH[i] = true; order[cnt++] = H[i].id; } } for(int i = 0; i < nl; i++) { if(visL[i]) continue; if(check(L[i].x, L[i].color, 'L')) { setColor(L[i].x, 'L'); visL[i] = true; order[cnt++] = L[i].id; } } } } int main() { int T; scanf(%d, &T); while(T--) { scanf(%d%d, &n, &m); int tmp; for(int i = 1; i <= n; i++) for(int j = 1; j <= n; j++) scanf(%d, &tmp); for(int i = 1; i <= n; i++) for(int j = 1; j <= n; j++) scanf(%d, &tar[i][j]); memset(visH, false, sizeof(visH)); memset(visL, false, sizeof(visL)); nh = nl = 0; char oper[5]; int x, color; for(int i = 1; i <= m; i++) { scanf(%s%d%d, oper, &x, &color); if(oper[0] == 'H') H[nh++] = Oper(x, color, i); else L[nl++] = Oper(x, color, i); } solve(); printf(%d, order[m-1]); for(int i = m-2; i >= 0; i--) printf( %d, order[i]); puts(); } 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-29 22:23:17, Gzip enabled