QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#494447#5244. Drzewa rozpinające [A]QiulyCompile Error//C++233.3kb2024-07-27 15:48:582024-07-27 15:48:58

詳細信息

answer.code: In function ‘int main()’:
answer.code:106:33: error: reference to ‘gcd’ is ambiguous
  106 |                 if (! i || ! j) gcd[i][j] = gcd[j][i] = i | j;
      |                                 ^~~
In file included from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:58,
                 from answer.code:3:
/usr/include/c++/13/numeric:164:5: note: candidates are: ‘template<class _Mn, class _Nn> constexpr std::common_type_t<_Tp1, _Tp2> std::gcd(_Mn, _Nn)’
  164 |     gcd(_Mn __m, _Nn __n) noexcept
      |     ^~~
answer.code:98:5: note:                 ‘int gcd [5005][5005]’
   98 | int gcd[N][N];
      |     ^~~
answer.code:106:45: error: reference to ‘gcd’ is ambiguous
  106 |                 if (! i || ! j) gcd[i][j] = gcd[j][i] = i | j;
      |                                             ^~~
/usr/include/c++/13/numeric:164:5: note: candidates are: ‘template<class _Mn, class _Nn> constexpr std::common_type_t<_Tp1, _Tp2> std::gcd(_Mn, _Nn)’
  164 |     gcd(_Mn __m, _Nn __n) noexcept
      |     ^~~
answer.code:98:5: note:                 ‘int gcd [5005][5005]’
   98 | int gcd[N][N];
      |     ^~~
answer.code:107:22: error: reference to ‘gcd’ is ambiguous
  107 |                 else gcd[i][j] = gcd[j][i] = gcd[j][i % j];
      |                      ^~~
/usr/include/c++/13/numeric:164:5: note: candidates are: ‘template<class _Mn, class _Nn> constexpr std::common_type_t<_Tp1, _Tp2> std::gcd(_Mn, _Nn)’
  164 |     gcd(_Mn __m, _Nn __n) noexcept
      |     ^~~
answer.code:98:5: note:                 ‘int gcd [5005][5005]’
   98 | int gcd[N][N];
      |     ^~~
answer.code:107:34: error: reference to ‘gcd’ is ambiguous
  107 |                 else gcd[i][j] = gcd[j][i] = gcd[j][i % j];
      |                                  ^~~
/usr/include/c++/13/numeric:164:5: note: candidates are: ‘template<class _Mn, class _Nn> constexpr std::common_type_t<_Tp1, _Tp2> std::gcd(_Mn, _Nn)’
  164 |     gcd(_Mn __m, _Nn __n) noexcept
      |     ^~~
answer.code:98:5: note:                 ‘int gcd [5005][5005]’
   98 | int gcd[N][N];
      |     ^~~
answer.code:107:46: error: reference to ‘gcd’ is ambiguous
  107 |                 else gcd[i][j] = gcd[j][i] = gcd[j][i % j];
      |                                              ^~~
/usr/include/c++/13/numeric:164:5: note: candidates are: ‘template<class _Mn, class _Nn> constexpr std::common_type_t<_Tp1, _Tp2> std::gcd(_Mn, _Nn)’
  164 |     gcd(_Mn __m, _Nn __n) noexcept
      |     ^~~
answer.code:98:5: note:                 ‘int gcd [5005][5005]’
   98 | int gcd[N][N];
      |     ^~~
answer.code:111:42: error: reference to ‘gcd’ is ambiguous
  111 |                 lep (j, 1, n) pls (b[i], gcd[a[i]][a[j]]);
      |                                          ^~~
/usr/include/c++/13/numeric:164:5: note: candidates are: ‘template<class _Mn, class _Nn> constexpr std::common_type_t<_Tp1, _Tp2> std::gcd(_Mn, _Nn)’
  164 |     gcd(_Mn __m, _Nn __n) noexcept
      |     ^~~
answer.code:98:5: note:                 ‘int gcd [5005][5005]’
   98 | int gcd[N][N];
      |     ^~~