QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#175903#7185. Poor Studentsucup-team1089Compile Error//C++176.6kb2023-09-11 04:43:052023-09-11 04:43:05

Details

answer.code:19:39: error: ‘numeric_limits’ was not declared in this scope
   19 |     static constexpr cost_t INFCOST = numeric_limits<cost_t>::max() / 2;
      |                                       ^~~~~~~~~~~~~~
answer.code:19:60: error: expected primary-expression before ‘>’ token
   19 |     static constexpr cost_t INFCOST = numeric_limits<cost_t>::max() / 2;
      |                                                            ^
answer.code:19:66: error: no matching function for call to ‘max()’
   19 |     static constexpr cost_t INFCOST = numeric_limits<cost_t>::max() / 2;
      |                                                             ~~~~~^~
In file included from /usr/include/c++/11/bits/char_traits.h:39,
                 from /usr/include/c++/11/ios:40,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/iostream:39,
                 from answer.code:1:
/usr/include/c++/11/bits/stl_algobase.h:254:5: note: candidate: ‘template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)’
  254 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/11/bits/stl_algobase.h:254:5: note:   template argument deduction/substitution failed:
answer.code:19:66: note:   candidate expects 2 arguments, 0 provided
   19 |     static constexpr cost_t INFCOST = numeric_limits<cost_t>::max() / 2;
      |                                                             ~~~~~^~
In file included from /usr/include/c++/11/bits/char_traits.h:39,
                 from /usr/include/c++/11/ios:40,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/iostream:39,
                 from answer.code:1:
/usr/include/c++/11/bits/stl_algobase.h:300:5: note: candidate: ‘template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)’
  300 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/11/bits/stl_algobase.h:300:5: note:   template argument deduction/substitution failed:
answer.code:19:66: note:   candidate expects 3 arguments, 0 provided
   19 |     static constexpr cost_t INFCOST = numeric_limits<cost_t>::max() / 2;
      |                                                             ~~~~~^~
answer.code: In member function ‘void mcSFlow<flow_t, cost_t>::add_edge(int, int, cost_t, flow_t)’:
answer.code:30:9: error: there are no arguments to ‘assert’ that depend on a template parameter, so a declaration of ‘assert’ must be available [-fpermissive]
   30 |         assert(a >= 0 && a < N && b >= 0 && b < N);
      |         ^~~~~~
answer.code:30:9: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
answer.code: In instantiation of ‘void mcSFlow<flow_t, cost_t>::add_edge(int, int, cost_t, flow_t) [with flow_t = int; cost_t = long long int]’:
answer.code:210:19:   required from here
answer.code:29:15: error: ‘assert’ was not declared in this scope
   29 |         assert(cap >= 0);
      |         ~~~~~~^~~~~~~~~~
answer.code:4:1: note: ‘assert’ is defined in header ‘<cassert>’; did you forget to ‘#include <cassert>’?
    3 | #include <queue>
  +++ |+#include <cassert>
    4 | 
answer.code:30:15: error: ‘assert’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
   30 |         assert(a >= 0 && a < N && b >= 0 && b < N);
      |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
answer.code:33:19: error: ‘assert’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
   33 |             assert(cost >= 0);
      |             ~~~~~~^~~~~~~~~~~