QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#534758#4927. Bounded Spanning Treeegypt_ioi2024b_04#Compile Error//C++202.2kb2024-08-27 16:02:152024-08-27 16:02:16

详细

answer.code: In function ‘int findp(int)’:
answer.code:16:12: error: ‘p’ was not declared in this scope
   16 |     return p[u] = (p[u] == u ? u : findp(p[u]));
      |            ^
answer.code: In function ‘bool merge(int, int)’:
answer.code:22:9: error: ‘sz’ was not declared in this scope
   22 |     if (sz[u] < sz[v])swap(u, v);
      |         ^~
answer.code:23:5: error: ‘sz’ was not declared in this scope
   23 |     sz[u] += sz[v];
      |     ^~
answer.code:24:5: error: ‘p’ was not declared in this scope
   24 |     p[v] = u;
      |     ^
answer.code: In function ‘void init()’:
answer.code:30:9: error: ‘p’ was not declared in this scope
   30 |         p[i] = i;
      |         ^
answer.code:31:9: error: ‘sz’ was not declared in this scope
   31 |         sz[i] = 1;
      |         ^~