QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#652379#7878. Matrix DistancesHuangHanShengCompile Error//C++204.8kb2024-10-18 18:38:412024-10-18 18:38:42

Details

answer.code: In function ‘void solve()’:
answer.code:21:12: error: reference to ‘make_pair’ is ambiguous
   21 | #define mp make_pair
      |            ^~~~~~~~~
answer.code:195:13: note: in expansion of macro ‘mp’
  195 |             mp[v[i][j]].pb(i + 1);
      |             ^~
In file included from /usr/include/c++/13/bits/stl_algobase.h:64,
                 from /usr/include/c++/13/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:51,
                 from answer.code:3:
/usr/include/c++/13/bits/stl_pair.h:922:5: note: candidates are: ‘template<class _T1, class _T2> constexpr std::pair<typename std::__strip_reference_wrapper<typename std::decay<_Tp>::type>::__type, typename std::__strip_reference_wrapper<typename std::decay<_Tp2>::type>::__type> std::make_pair(_T1&&, _T2&&)’
  922 |     make_pair(_T1&& __x, _T2&& __y)
      |     ^~~~~~~~~
answer.code:21:12: note:                 ‘std::map<int, std::vector<int> > make_pair’
   21 | #define mp make_pair
      |            ^~~~~~~~~
answer.code:168:14: note: in expansion of macro ‘mp’
  168 | map<int, vi> mp, mp1;
      |              ^~
answer.code:21:12: error: reference to ‘make_pair’ is ambiguous
   21 | #define mp make_pair
      |            ^~~~~~~~~
answer.code:199:20: note: in expansion of macro ‘mp’
  199 |     for (auto it : mp)
      |                    ^~
/usr/include/c++/13/bits/stl_pair.h:922:5: note: candidates are: ‘template<class _T1, class _T2> constexpr std::pair<typename std::__strip_reference_wrapper<typename std::decay<_Tp>::type>::__type, typename std::__strip_reference_wrapper<typename std::decay<_Tp2>::type>::__type> std::make_pair(_T1&&, _T2&&)’
  922 |     make_pair(_T1&& __x, _T2&& __y)
      |     ^~~~~~~~~
answer.code:21:12: note:                 ‘std::map<int, std::vector<int> > make_pair’
   21 | #define mp make_pair
      |            ^~~~~~~~~
answer.code:168:14: note: in expansion of macro ‘mp’
  168 | map<int, vi> mp, mp1;
      |              ^~