QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#177853#7185. Poor Studentsucup-team1130Compile Error//C++146.4kb2023-09-13 14:45:472023-09-13 14:45:48

Details

answer.code:36:39: error: ‘numeric_limits’ was not declared in this scope
   36 |     static constexpr cost_t INFCOST = numeric_limits<cost_t>::max()/2;
      |                                       ^~~~~~~~~~~~~~
answer.code:36:60: error: expected primary-expression before ‘>’ token
   36 |     static constexpr cost_t INFCOST = numeric_limits<cost_t>::max()/2;
      |                                                            ^
answer.code:36:66: error: no matching function for call to ‘max()’
   36 |     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:36:66: note:   candidate expects 2 arguments, 0 provided
   36 |     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:36:66: note:   candidate expects 3 arguments, 0 provided
   36 |     static constexpr cost_t INFCOST = numeric_limits<cost_t>::max()/2;
      |                                                             ~~~~~^~
In file included from /usr/include/c++/11/algorithm:62,
                 from answer.code:2:
/usr/include/c++/11/bits/stl_algo.h:3461:5: note: candidate: ‘template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)’
 3461 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/11/bits/stl_algo.h:3461:5: note:   template argument deduction/substitution failed:
answer.code:36:66: note:   candidate expects 1 argument, 0 provided
   36 |     static constexpr cost_t INFCOST = numeric_limits<cost_t>::max()/2;
      |                                                             ~~~~~^~
In file included from /usr/include/c++/11/algorithm:62,
                 from answer.code:2:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: candidate: ‘template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)’
 3467 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/11/bits/stl_algo.h:3467:5: note:   template argument deduction/substitution failed:
answer.code:36:66: note:   candidate expects 2 arguments, 0 provided
   36 |     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:46:9: error: there are no arguments to ‘assert’ that depend on a template parameter, so a declaration of ‘assert’ must be available [-fpermissive]
   46 |         assert(a>=0&&a<N&&b>=0&&b<N);
      |         ^~~~~~
answer.code:46:9: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
answer.code: In function ‘void solve()’:
answer.code:192:13: error: missing template arguments before ‘flow’
  192 |     mcSFlow flow(n + k + 2, source, sink);
      |             ^~~~
answer.code:194:9: error: ‘flow’ was not declared in this scope
  194 |         flow.add_edge(source, i, 0, 1);
      |         ^~~~
answer.code:197:9: error: ‘flow’ was not declared in this scope
  197 |         flow.add_edge(j + n, sink, 0, a[j]);
      |         ^~~~
answer.code:201:13: error: ‘flow’ was not declared in this scope
  201 |             flow.add_edge(i, j + n, c[i][j], 1);
      |             ^~~~
answer.code:204:14: error: ‘flow’ was not declared in this scope
  204 |     ii res = flow.minCostMaxFlow();
      |              ^~~~