/ Vijos /

记录详情

Compile Error

/in/foo.cc:4:18: error: expected ']' before ';' token
 #define maxn 5001;
                  ^
/in/foo.cc:5:12: note: in expansion of macro 'maxn'
 int father[maxn];
            ^~~~
/in/foo.cc:5:16: error: expected unqualified-id before ']' token
 int father[maxn];
                ^
/in/foo.cc: In function 'int find(int)':
/in/foo.cc:9:5: error: 'father' was not declared in this scope
  if(father[x]!=x)
     ^~~~~~
/in/foo.cc:10:32: error: expected ',' before '[' token
   return father[x]=find([father[x]);
                                ^
/in/foo.cc:10:32: error: expected identifier before '[' token
/in/foo.cc:10:36: error: expected ']' before ';' token
   return father[x]=find([father[x]);
                                    ^
/in/foo.cc: In lambda function:
/in/foo.cc:10:36: error: expected '{' before ';' token
/in/foo.cc: In function 'int find(int)':
/in/foo.cc:10:36: error: expected ')' before ';' token
/in/foo.cc: In function 'void con(int, int)':
/in/foo.cc:14:2: error: 'father' was not declared in this scope
  father[l2]=l1;
  ^~~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:18:15: warning: left operand of comma operator has no effect [-Wunused-value]
  for(int i=1;i<=n,i++)
              ~^~~
/in/foo.cc:18:22: error: expected ';' before ')' token
  for(int i=1;i<=n,i++)
                      ^
/in/foo.cc:20:3: error: 'father' was not declared in this scope
   father[i]=i;
   ^~~~~~
/in/foo.cc:34:18: error: 'ptintf' was not declared in this scope
    ptintf("Yes\n");
                  ^

信息

递交者
类型
自测
题目
P1034 家族
语言
C++
递交时间
2018-08-10 11:58:05
评测时间
2018-08-10 11:58:05
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes