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_38695062_19082.cpp:177:11: error: redefinition of 'const int N'
  177 | const int N = 1e5 + 100;
      |           ^
0_0_38695062_19082.cpp:19:11: note: 'const int N' previously defined here
   19 | const int N = 5e4 + 5, M = 1e6 + 5;
      |           ^
0_0_38695062_19082.cpp:178:5: error: redefinition of 'int n'
  178 | int n, d[N], T, m, len, x, y, pos, f[N], fa, fb, flag, z, vis[N];
      |     ^
0_0_38695062_19082.cpp:20:5: note: 'int n' previously declared here
   20 | int n, m, cnt;
      |     ^
0_0_38695062_19082.cpp:178:8: error: redefinition of 'int d [50005]'
  178 | int n, d[N], T, m, len, x, y, pos, f[N], fa, fb, flag, z, vis[N];
      |        ^
0_0_38695062_19082.cpp:24:16: note: 'int d [50005]' previously declared here
   24 | int head[2*N], d[N],dp[N][50],dp1[N][50], val[N],v[N];
      |                ^
0_0_38695062_19082.cpp:178:17: error: redefinition of 'int m'
  178 | int n, d[N], T, m, len, x, y, pos, f[N], fa, fb, flag, z, vis[N];
      |                 ^
0_0_38695062_19082.cpp:20:8: note: 'int m' previously declared here
   20 | int n, m, cnt;
      |        ^
0_0_38695062_19082.cpp:178:36: error: conflicting declaration 'int f [50005]'
  178 | int n, d[N], T, m, len, x, y, pos, f[N], fa, fb, flag, z, vis[N];
      |                                    ^
0_0_38695062_19082.cpp:25:8: note: previous declaration as 'int f'
   25 | int mx,f,ans;
      |        ^
0_0_38695062_19082.cpp: In function 'int father(int)':
0_0_38695062_19082.cpp:207:19: error: invalid types 'int[int]' for array subscript
  207 |         if (x != f[x])
      |                   ^
0_0_38695062_19082.cpp:208:18: error: invalid types 'int[int]' for array subscript
  208 |                 f[x] = father(f[x]);
      |                  ^
0_0_38695062_19082.cpp:208:32: error: invalid types 'int[int]' for array subscript
  208 |                 f[x] = father(f[x]);
      |                                ^
0_0_38695062_19082.cpp:209:17: error: invalid types 'int[int]' for array subscript
  209 |         return f[x];
      |                 ^
0_0_38695062_19082.cpp: At global scope:
0_0_38695062_19082.cpp:211:5: error: redefinition of 'int main()'
  211 | int main()
      |     ^~~~
0_0_38695062_19082.cpp:92:5: note: 'int main()' previously defined here
   92 | int main() {
      |     ^~~~
0_0_38695062_19082.cpp: In function 'int main()':
0_0_38695062_19082.cpp:217:26: error: invalid types 'int[int]' for array subscript
  217 |                         f[i] = i;
      |                          ^
0_0_38695062_19082.cpp:227:26: error: invalid types 'int[int]' for array subscript
  227 |                         f[fa] = fb;
      |                          ^


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-17 07:22:24, Gzip enabled