QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#393336#5259. Skills in Pillsucup-team2880Compile Error//C++202.0kb2024-04-18 15:24:492024-04-18 15:24:50

详细

answer.code: In function ‘std::pair<long long int, long long int> calc(long long int, long long int)’:
answer.code:13:26: error: reference to ‘lcm’ is ambiguous
   13 |         ll mn = min(x / (lcm / a), (-y) / (lcm / b));
      |                          ^~~
In file included from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:58,
                 from answer.code:1:
/usr/include/c++/13/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
      |     ^~~
answer.code:5:13: note:                 ‘long long int lcm’
    5 | ll n, a, b, lcm;
      |             ^~~
answer.code:13:44: error: reference to ‘lcm’ is ambiguous
   13 |         ll mn = min(x / (lcm / a), (-y) / (lcm / b));
      |                                            ^~~
/usr/include/c++/13/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
      |     ^~~
answer.code:5:13: note:                 ‘long long int lcm’
    5 | ll n, a, b, lcm;
      |             ^~~
answer.code:14:20: error: reference to ‘lcm’ is ambiguous
   14 |         x -= mn * (lcm / a), y += mn * (lcm / b);
      |                    ^~~
/usr/include/c++/13/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
      |     ^~~
answer.code:5:13: note:                 ‘long long int lcm’
    5 | ll n, a, b, lcm;
      |             ^~~
answer.code:14:41: error: reference to ‘lcm’ is ambiguous
   14 |         x -= mn * (lcm / a), y += mn * (lcm / b);
      |                                         ^~~
/usr/include/c++/13/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
      |     ^~~
answer.code:5:13: note:                 ‘long long int lcm’
    5 | ll n, a, b, lcm;
      |             ^~~
answer.code:17:27: error: reference to ‘lcm’ is ambiguous
   17 |         ll mn = min(-x / (lcm / a), y / (lcm / b)) + 1;
      |                           ^~~
/usr/include/c++/13/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
      |     ^~~
answer.code:5:13: note:                 ‘long long int lcm’
    5 | ll n, a, b, lcm;
      |             ^~~
answer.code:17:42: error: reference to ‘lcm’ is ambiguous
   17 |         ll mn = min(-x / (lcm / a), y / (lcm / b)) + 1;
      |                                          ^~~
/usr/include/c++/13/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
      |     ^~~
answer.code:5:13: note:                 ‘long long int lcm’
    5 | ll n, a, b, lcm;
      |             ^~~
answer.code:18:20: error: reference to ‘lcm’ is ambiguous
   18 |         x += mn * (lcm / a), y -= mn * (lcm / b);
      |                    ^~~
/usr/include/c++/13/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
      |     ^~~
answer.code:5:13: note:                 ‘long long int lcm’
    5 | ll n, a, b, lcm;
      |             ^~~
answer.code:18:41: error: reference to ‘lcm’ is ambiguous
   18 |         x += mn * (lcm / a), y -= mn * (lcm / b);
      |                                         ^~~
/usr/include/c++/13/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
      |     ^~~
answer.code:5:13: note:                 ‘long long int lcm’
    5 | ll n, a, b, lcm;
      |             ^~~
answer.code: In function ‘int main()’:
answer.code:33:5: error: reference to ‘lcm’ is ambiguous
   33 |     lcm = a * b / g;
      |     ^~~
/usr/include/c++/13/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
      |     ^~~
answer.code:5:13: note:                 ‘long long int lcm’
    5 | ll n, a, b, lcm;
      |             ^~~
answer.code:34:12: error: reference to ‘lcm’ is ambiguous
   34 |     if(n < lcm) return cout << n / a + n / b << '\n', 0;
      |            ^~~
/usr/include/c++/13/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
      |     ^~~
answer.code:5:13: note:                 ‘long long int lcm’
    5 | ll n, a, b, lcm;
      |             ^~~
answer.code:36:18: ...