QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#661834#7749. A Simple MST Problemucup-team3232Compile Error//C++143.7kb2024-10-20 18:25:422024-10-20 18:25:42

Details

answer.code: In function ‘void solve()’:
answer.code:136:56: error: ‘lcm’ was not declared in this scope
  136 |                                 edge[++idx] = {i, j, w(lcm(i, j))};
      |                                                        ^~~
answer.code:136:66: error: no match for ‘operator=’ (operand types are ‘Edge’ and ‘<brace-enclosed initializer list>’)
  136 |                                 edge[++idx] = {i, j, w(lcm(i, j))};
      |                                                                  ^
answer.code:71:8: note: candidate: ‘constexpr Edge& Edge::operator=(const Edge&)’
   71 | struct Edge {
      |        ^~~~
answer.code:71:8: note:   no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const Edge&’
answer.code:71:8: note: candidate: ‘constexpr Edge& Edge::operator=(Edge&&)’
answer.code:71:8: note:   no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘Edge&&’
answer.code:143:73: error: ‘lcm’ was not declared in this scope
  143 |                         cout << edge[i].u << ' ' << edge[i].v << ' ' << lcm(edge[i].u, edge[i].v) << '\n';
      |                                                                         ^~~