QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#182022#4584. Not OneZhangYiDeCompile Error//C++17955b2023-09-17 09:42:292023-09-17 09:42:29

Details

answer.code: In function ‘void dfs2(int, int)’:
answer.code:22:9: error: reference to ‘gcd’ is ambiguous
   22 |         gcd[u] = __gcd(gcd[u], gcd[v]);
      |         ^~~
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:84,
                 from answer.code:1:
/usr/include/c++/11/numeric:164:5: note: candidates are: ‘template<class _Mn, class _Nn> constexpr std::common_type_t<_Mn, _Nn> std::gcd(_Mn, _Nn)’
  164 |     gcd(_Mn __m, _Nn __n) noexcept
      |     ^~~
answer.code:5:28: note:                 ‘int gcd [100005]’
    5 | int a[N], siz[N], siz2[N], gcd[N];
      |                            ^~~
answer.code:22:24: error: reference to ‘gcd’ is ambiguous
   22 |         gcd[u] = __gcd(gcd[u], gcd[v]);
      |                        ^~~
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:84,
                 from answer.code:1:
/usr/include/c++/11/numeric:164:5: note: candidates are: ‘template<class _Mn, class _Nn> constexpr std::common_type_t<_Mn, _Nn> std::gcd(_Mn, _Nn)’
  164 |     gcd(_Mn __m, _Nn __n) noexcept
      |     ^~~
answer.code:5:28: note:                 ‘int gcd [100005]’
    5 | int a[N], siz[N], siz2[N], gcd[N];
      |                            ^~~
answer.code:22:32: error: reference to ‘gcd’ is ambiguous
   22 |         gcd[u] = __gcd(gcd[u], gcd[v]);
      |                                ^~~
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:84,
                 from answer.code:1:
/usr/include/c++/11/numeric:164:5: note: candidates are: ‘template<class _Mn, class _Nn> constexpr std::common_type_t<_Mn, _Nn> std::gcd(_Mn, _Nn)’
  164 |     gcd(_Mn __m, _Nn __n) noexcept
      |     ^~~
answer.code:5:28: note:                 ‘int gcd [100005]’
    5 | int a[N], siz[N], siz2[N], gcd[N];
      |                            ^~~
answer.code:26:17: error: reference to ‘gcd’ is ambiguous
   26 |             if (gcd[u] != 1)
      |                 ^~~
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:84,
                 from answer.code:1:
/usr/include/c++/11/numeric:164:5: note: candidates are: ‘template<class _Mn, class _Nn> constexpr std::common_type_t<_Mn, _Nn> std::gcd(_Mn, _Nn)’
  164 |     gcd(_Mn __m, _Nn __n) noexcept
      |     ^~~
answer.code:5:28: note:                 ‘int gcd [100005]’
    5 | int a[N], siz[N], siz2[N], gcd[N];
      |                            ^~~
answer.code: In function ‘int main()’:
answer.code:41:9: error: reference to ‘gcd’ is ambiguous
   41 |         gcd[i] = a[i];
      |         ^~~
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:84,
                 from answer.code:1:
/usr/include/c++/11/numeric:164:5: note: candidates are: ‘template<class _Mn, class _Nn> constexpr std::common_type_t<_Mn, _Nn> std::gcd(_Mn, _Nn)’
  164 |     gcd(_Mn __m, _Nn __n) noexcept
      |     ^~~
answer.code:5:28: note:                 ‘int gcd [100005]’
    5 | int a[N], siz[N], siz2[N], gcd[N];
      |                            ^~~