QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#685756#6308. MagicHuangHanShengCompile Error//C++141.8kb2024-10-28 21:08:272024-10-28 21:08:28

Details

answer.code: In function ‘short int dfs(short int, short int)’:
answer.code:51:27: error: no matching function for call to ‘min(int, short int&)’
   51 |     int tmp = dfs (v, min (1, f));
      |                       ~~~~^~~~~~
In file included from /usr/include/c++/13/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:51,
                 from answer.code:2:
/usr/include/c++/13/bits/stl_algobase.h:233:5: note: candidate: ‘template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)’
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/13/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
answer.code:51:27: note:   deduced conflicting types for parameter ‘const _Tp’ (‘int’ and ‘short int’)
   51 |     int tmp = dfs (v, min (1, f));
      |                       ~~~~^~~~~~
/usr/include/c++/13/bits/stl_algobase.h:281:5: note: candidate: ‘template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)’
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/13/bits/stl_algobase.h:281:5: note:   template argument deduction/substitution failed:
answer.code:51:27: note:   deduced conflicting types for parameter ‘const _Tp’ (‘int’ and ‘short int’)
   51 |     int tmp = dfs (v, min (1, f));
      |                       ~~~~^~~~~~
In file included from /usr/include/c++/13/algorithm:61:
/usr/include/c++/13/bits/stl_algo.h:5775:5: note: candidate: ‘template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)’
 5775 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/13/bits/stl_algo.h:5775:5: note:   template argument deduction/substitution failed:
answer.code:51:27: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘int’
   51 |     int tmp = dfs (v, min (1, f));
      |                       ~~~~^~~~~~
/usr/include/c++/13/bits/stl_algo.h:5785:5: note: candidate: ‘template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)’
 5785 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/13/bits/stl_algo.h:5785:5: note:   template argument deduction/substitution failed:
answer.code:51:27: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘int’
   51 |     int tmp = dfs (v, min (1, f));
      |                       ~~~~^~~~~~
answer.code: In function ‘int main()’:
answer.code:8:13: warning: overflow in conversion from ‘int’ to ‘short int’ changes value from ‘1000000000’ to ‘-13824’ [-Woverflow]
    8 | #define inf 1000000000
      |             ^~~~~~~~~~
answer.code:78:33: note: in expansion of macro ‘inf’
   78 |   while (bfs ()) ret += dfs (0, inf);
      |                                 ^~~