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_39639774_29980.cpp: In function 'void work()':
0_0_39639774_29980.cpp:57:21: error: reference to 'lcm' is ambiguous
   57 |         a[i] = 15 * lcm / p;
      |                     ^~~
In file included from .\stdc++.h:58:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/numeric:179:5: note: candidates are: 'template<class _Mn, class _Nn> constexpr std::common_type_t<_Tp1, _Tp2> std::lcm(_Mn, _Nn)'
  179 |     lcm(_Mn __m, _Nn __n) noexcept
      |     ^~~
0_0_39639774_29980.cpp:10:8: note:                 'int lcm'
   10 | int n, lcm = 1, ans;
      |        ^~~
0_0_39639774_29980.cpp:62:24: error: reference to 'lcm' is ambiguous
   62 |     int gcd = Gcd(ans, lcm);
      |                        ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/numeric:179:5: note: candidates are: 'template<class _Mn, class _Nn> constexpr std::common_type_t<_Tp1, _Tp2> std::lcm(_Mn, _Nn)'
  179 |     lcm(_Mn __m, _Nn __n) noexcept
      |     ^~~
0_0_39639774_29980.cpp:10:8: note:                 'int lcm'
   10 | int n, lcm = 1, ans;
      |        ^~~
0_0_39639774_29980.cpp:63:33: error: reference to 'lcm' is ambiguous
   63 |     cout << ans / gcd << "/" << lcm / gcd << "\n";
      |                                 ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/numeric:179:5: note: candidates are: 'template<class _Mn, class _Nn> constexpr std::common_type_t<_Tp1, _Tp2> std::lcm(_Mn, _Nn)'
  179 |     lcm(_Mn __m, _Nn __n) noexcept
      |     ^~~
0_0_39639774_29980.cpp:10:8: note:                 'int lcm'
   10 | int n, lcm = 1, ans;
      |        ^~~
0_0_39639774_29980.cpp: In function 'int main()':
0_0_39639774_29980.cpp:71:19: error: reference to 'lcm' is ambiguous
   71 |     rep(i, 1, 15) lcm = Lcm(lcm, i);
      |                   ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/numeric:179:5: note: candidates are: 'template<class _Mn, class _Nn> constexpr std::common_type_t<_Tp1, _Tp2> std::lcm(_Mn, _Nn)'
  179 |     lcm(_Mn __m, _Nn __n) noexcept
      |     ^~~
0_0_39639774_29980.cpp:10:8: note:                 'int lcm'
   10 | int n, lcm = 1, ans;
      |        ^~~
0_0_39639774_29980.cpp:71:29: error: reference to 'lcm' is ambiguous
   71 |     rep(i, 1, 15) lcm = Lcm(lcm, i);
      |                             ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/numeric:179:5: note: candidates are: 'template<class _Mn, class _Nn> constexpr std::common_type_t<_Tp1, _Tp2> std::lcm(_Mn, _Nn)'
  179 |     lcm(_Mn __m, _Nn __n) noexcept
      |     ^~~
0_0_39639774_29980.cpp:10:8: note:                 'int lcm'
   10 | int n, lcm = 1, ans;
      |        ^~~


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-09-20 12:08:33, Gzip enabled