0_0_24194699_20863.cpp:3:18: error: expected ']' before ';' token
#define MAX 20010;
^
0_0_24194699_20863.cpp:4:15: note: in expansion of macro 'MAX'
int father_am[MAX];//每一个父亲节点链接子节点数,
^
0_0_24194699_20863.cpp:4:18: error: expected unqualified-id before ']' token
int father_am[MAX];//每一个父亲节点链接子节点数,
^
0_0_24194699_20863.cpp:3:18: error: expected ']' before ';' token
#define MAX 20010;
^
0_0_24194699_20863.cpp:5:9: note: in expansion of macro 'MAX'
int vis[MAX];//找根节点,为0;其他为1
^
0_0_24194699_20863.cpp:5:12: error: expected unqualified-id before ']' token
int vis[MAX];//找根节点,为0;其他为1
^
0_0_24194699_20863.cpp:3:18: error: expected ']' before ';' token
#define MAX 20010;
^
0_0_24194699_20863.cpp:6:16: note: in expansion of macro 'MAX'
vector<int>con[MAX];//记录每个父亲节点链接的子节点
^
0_0_24194699_20863.cpp:6:19: error: expected unqualified-id before ']' token
vector<int>con[MAX];//记录每个父亲节点链接的子节点
^
0_0_24194699_20863.cpp: In function 'int dfs(int)':
0_0_24194699_20863.cpp:11:7: error: 'father_am' was not declared in this scope
if(father_am[node]==0) return node;//叶节点直接返回
^
0_0_24194699_20863.cpp:14:14: error: 'father_am' was not declared in this scope
for(i=0;i<father_am[node];i++)
^
0_0_24194699_20863.cpp:15:27: error: 'con' was not declared in this scope
node_am.push_back(dfs(con[node][i]));//保存每个子节点苹果树
^
0_0_24194699_20863.cpp:18:20: error: 'father_am' was not declared in this scope
return node_am[(father_am[node]+1)/2-1];//因为从0开始,所以-1
^
0_0_24194699_20863.cpp: In function 'int main()':
0_0_24194699_20863.cpp:37:15: error: 'con' was not declared in this scope
con[i].clear();
^
0_0_24194699_20863.cpp:38:22: error: 'vis' was not declared in this scope
memset(vis,0,sizeof(vis));
^
0_0_24194699_20863.cpp:39:22: error: 'father_am' was not declared in this scope
memset(father_am,0,sizeof(father_am));
^
0_0_24194699_20863.cpp:48:17: error: 'con' was not declared in this scope
con[i].push_back(a);//压入其父亲节点
^
|