QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#441582#8579. 경찰과 도둑ZhangYiDeCompile Error//C++235.1kb2024-06-14 16:24:192024-06-14 16:24:20

Details

answer.code: In function ‘void dfs1(int, int)’:
answer.code:59:14: error: no match for ‘operator=’ (operand types are ‘std::pair<long long int, long long int>’ and ‘int’)
   59 |     ddp[v] = 0;
      |              ^
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:1:
/usr/include/c++/13/bits/stl_pair.h:439:9: note: candidate: ‘template<class _U1, class _U2> constexpr std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(const std::pair<_U1, _U2>&) requires  _S_assignable<const _U1&, const _U2&>() [with _U2 = _U1; _T1 = long long int; _T2 = long long int]’
  439 |         operator=(const pair<_U1, _U2>& __p)
      |         ^~~~~~~~
/usr/include/c++/13/bits/stl_pair.h:439:9: note:   template argument deduction/substitution failed:
answer.code:59:14: note:   mismatched types ‘const std::pair<_T1, _T2>’ and ‘int’
   59 |     ddp[v] = 0;
      |              ^
/usr/include/c++/13/bits/stl_pair.h:451:9: note: candidate: ‘template<class _U1, class _U2> constexpr std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(std::pair<_U1, _U2>&&) requires  _S_assignable<_U1, _U2>() [with _U2 = _U1; _T1 = long long int; _T2 = long long int]’
  451 |         operator=(pair<_U1, _U2>&& __p)
      |         ^~~~~~~~
/usr/include/c++/13/bits/stl_pair.h:451:9: note:   template argument deduction/substitution failed:
answer.code:59:14: note:   mismatched types ‘std::pair<_T1, _T2>’ and ‘int’
   59 |     ddp[v] = 0;
      |              ^
/usr/include/c++/13/bits/stl_pair.h:486:9: note: candidate: ‘template<class _U1, class _U2> constexpr const std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(const std::pair<_U1, _U2>&) const requires (is_assignable_v<const first_type&, const _U1&>) && (is_assignable_v<const second_type&, const _U2&>) [with _U2 = _U1; _T1 = long long int; _T2 = long long int]’
  486 |         operator=(const pair<_U1, _U2>& __p) const
      |         ^~~~~~~~
/usr/include/c++/13/bits/stl_pair.h:486:9: note:   template argument deduction/substitution failed:
answer.code:59:14: note:   mismatched types ‘const std::pair<_T1, _T2>’ and ‘int’
   59 |     ddp[v] = 0;
      |              ^
/usr/include/c++/13/bits/stl_pair.h:498:9: note: candidate: ‘template<class _U1, class _U2> constexpr const std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(std::pair<_U1, _U2>&&) const requires (is_assignable_v<const first_type&, _U1>) && (is_assignable_v<const second_type&, _U2>) [with _U2 = _U1; _T1 = long long int; _T2 = long long int]’
  498 |         operator=(pair<_U1, _U2>&& __p) const
      |         ^~~~~~~~
/usr/include/c++/13/bits/stl_pair.h:498:9: note:   template argument deduction/substitution failed:
answer.code:59:14: note:   mismatched types ‘std::pair<_T1, _T2>’ and ‘int’
   59 |     ddp[v] = 0;
      |              ^
/usr/include/c++/13/bits/stl_pair.h:416:7: note: candidate: ‘constexpr std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(const std::pair<_T1, _T2>&) requires  _S_assignable<const _T1&, const _T2&>() [with _T1 = long long int; _T2 = long long int]’
  416 |       operator=(const pair& __p)
      |       ^~~~~~~~
/usr/include/c++/13/bits/stl_pair.h:416:29: note:   no known conversion for argument 1 from ‘int’ to ‘const std::pair<long long int, long long int>&’
  416 |       operator=(const pair& __p)
      |                 ~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_pair.h:427:7: note: candidate: ‘constexpr std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(std::pair<_T1, _T2>&&) requires  _S_assignable<_T1, _T2>() [with _T1 = long long int; _T2 = long long int]’
  427 |       operator=(pair&& __p)
      |       ^~~~~~~~
/usr/include/c++/13/bits/stl_pair.h:427:24: note:   no known conversion for argument 1 from ‘int’ to ‘std::pair<long long int, long long int>&&’
  427 |       operator=(pair&& __p)
      |                 ~~~~~~~^~~
/usr/include/c++/13/bits/stl_pair.h:463:7: note: candidate: ‘constexpr const std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(const std::pair<_T1, _T2>&) const requires (is_copy_assignable_v<const first_type>) && (is_copy_assignable_v<const second_type>) [with _T1 = long long int; _T2 = long long int]’
  463 |       operator=(const pair& __p) const
      |       ^~~~~~~~
/usr/include/c++/13/bits/stl_pair.h:463:7: note: constraints not satisfied
/usr/include/c++/13/bits/stl_pair.h: In instantiation of ‘constexpr const std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(const std::pair<_T1, _T2>&) const requires (is_copy_assignable_v<const first_type>) && (is_copy_assignable_v<const second_type>) [with _T1 = long long int; _T2 = long long int]’:
answer.code:59:14:   required from here
/usr/include/c++/13/bits/stl_pair.h:463:7:   required by the constraints of ‘template<class _T1, class _T2> constexpr const std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(const std::pair<_T1, _T2>&) ...