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_39130107_26618.cpp: In function 'int main()':
0_0_39130107_26618.cpp:23:16: error: reference to 'gcd' is ambiguous
   23 |         memset(gcd,0,sizeof(gcd));
      |                ^~~
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_39130107_26618.cpp:6:5: note:                 'int gcd [305][305]'
    6 | int gcd[305][305];
      |     ^~~
0_0_39130107_26618.cpp:23:29: error: reference to 'gcd' is ambiguous
   23 |         memset(gcd,0,sizeof(gcd));
      |                             ^~~
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_39130107_26618.cpp:6:5: note:                 'int gcd [305][305]'
    6 | int gcd[305][305];
      |     ^~~
0_0_39130107_26618.cpp:29:45: error: reference to 'gcd' is ambiguous
   29 |                 if(__gcd(key[i],key[j])!=1) gcd[i][j]=value[i]+value[j];
      |                                             ^~~
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_39130107_26618.cpp:6:5: note:                 'int gcd [305][305]'
    6 | int gcd[305][305];
      |     ^~~
0_0_39130107_26618.cpp:38:20: error: reference to 'gcd' is ambiguous
   38 |                 if(gcd[i][j]&&dp[i+1][j-1]==svalue[j-1]-svalue[i])
      |                    ^~~
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_39130107_26618.cpp:6:5: note:                 'int gcd [305][305]'
    6 | int gcd[305][305];
      |     ^~~


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-27 14:25:48, Gzip enabled