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_39415816_25451.cpp: In function 'int main()':
0_0_39415816_25451.cpp:31:41: error: reference to 'gcd' is ambiguous
   31 |         rep(i, 0, 1000) rep(j, 0, 1000) gcd[i][j] = __gcd(i, j);
      |                                         ^~~
In file included from .\stdc++.h:58:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/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
      |     ^~~
0_0_39415816_25451.cpp:28:33: note:                 'long long int gcd [1005][1005]'
   28 | int n, a[1005], dp[1005][1005], gcd[1005][1005];
      |                                 ^~~
0_0_39415816_25451.cpp:40:35: error: reference to 'gcd' is ambiguous
   40 |                         dp[i + 1][gcd[j][a[i + 1]]] = (dp[i + 1][gcd[j][a[i + 1]]] + dp[i][j]) % mod;
      |                                   ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/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
      |     ^~~
0_0_39415816_25451.cpp:28:33: note:                 'long long int gcd [1005][1005]'
   28 | int n, a[1005], dp[1005][1005], gcd[1005][1005];
      |                                 ^~~
0_0_39415816_25451.cpp:40:66: error: reference to 'gcd' is ambiguous
   40 |                         dp[i + 1][gcd[j][a[i + 1]]] = (dp[i + 1][gcd[j][a[i + 1]]] + dp[i][j]) % mod;
      |                                                                  ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/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
      |     ^~~
0_0_39415816_25451.cpp:28:33: note:                 'long long int gcd [1005][1005]'
   28 | int n, a[1005], dp[1005][1005], gcd[1005][1005];
      |                                 ^~~


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-25 05:29:03, Gzip enabled