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_39523809_9135.cpp: In function 'void pre()':
0_0_39523809_9135.cpp:30:52: error: reference to 'lcm' is ambiguous
   30 |                                 if(LCM(u, v) == i) lcm[i].push_back(make_pair(u, v));
      |                                                    ^~~
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_39523809_9135.cpp:8:26: note:                 'std::vector<std::pair<int, int> > lcm [100000]'
    8 | vector< pair<int, int> > lcm[N];
      |                          ^~~
0_0_39523809_9135.cpp: In function 'int main()':
0_0_39523809_9135.cpp:118:52: error: reference to 'lcm' is ambiguous
  118 |                                 for(int j = 0; j < lcm[cur].size(); j++){
      |                                                    ^~~
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_39523809_9135.cpp:8:26: note:                 'std::vector<std::pair<int, int> > lcm [100000]'
    8 | vector< pair<int, int> > lcm[N];
      |                          ^~~
0_0_39523809_9135.cpp:119:49: error: reference to 'lcm' is ambiguous
  119 |                                         int u = lcm[cur][j].first, v = lcm[cur][j].second;
      |                                                 ^~~
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_39523809_9135.cpp:8:26: note:                 'std::vector<std::pair<int, int> > lcm [100000]'
    8 | vector< pair<int, int> > lcm[N];
      |                          ^~~
0_0_39523809_9135.cpp:120:53: error: 'v' was not declared in this scope
  120 |                                         if(u > n || v > n) continue;
      |                                                     ^
0_0_39523809_9135.cpp:121:49: error: 'v' was not declared in this scope
  121 |                                         if(u == v) add(lca(u, v), 1);
      |                                                 ^


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-15 06:16:11, Gzip enabled