QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#856714#9791. Intrusive Donkeyucup-team5082#Compile Error//C++203.6kb2025-01-14 15:28:362025-01-14 15:28:36

詳細信息

answer.code: In function ‘Node merge(const Node&, const Node&)’:
answer.code:32:1: warning: no return statement in function returning non-void [-Wreturn-type]
   32 | }
      | ^
answer.code: In function ‘void getup(Node*, int)’:
answer.code:36:21: error: no matching function for call to ‘min(long long int, long int)’
   36 |     seg[p].val = min(seg[lc(p)].val + seg[rc(p)].val, INF);
      |                  ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from answer.code:1:
/usr/include/c++/14/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++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
answer.code:36:21: note:   deduced conflicting types for parameter ‘const _Tp’ (‘long long int’ and ‘long int’)
   36 |     seg[p].val = min(seg[lc(p)].val + seg[rc(p)].val, INF);
      |                  ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/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++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5685:5: note: candidate: ‘template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)’
 5685 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5685:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5695:5: note: candidate: ‘template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)’
 5695 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5695:5: note:   template argument deduction/substitution failed:
answer.code:36:21: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘long long int’
   36 |     seg[p].val = min(seg[lc(p)].val + seg[rc(p)].val, INF);
      |                  ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
answer.code: In function ‘void pushdown(Node*, int)’:
answer.code:44:25: error: no matching function for call to ‘min(long long int, long int)’
   44 |     seg[lc(p)].val = min(seg[lc(p)].val * x, INF);
      |                      ~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/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++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
answer.code:44:25: note:   deduced conflicting types for parameter ‘const _Tp’ (‘long long int’ and ‘long int’)
   44 |     seg[lc(p)].val = min(seg[lc(p)].val * x, INF);
      |                      ~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/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++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5685:5: note: candidate: ‘template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)’
 5685 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5685:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5695:5: note: candidate: ‘template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)’
 5695 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5695:5: note:   template argument deduction/substitution failed:
answer.code:44:25: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘long long int’
   44 |     seg[lc(p)].val = min(seg[lc(p)].val * x, INF);
      |                      ~~~^~~~~~~~~~~~~~~~~~~~~~~~~
answer.code:45:25: error: no matching function for call to ‘min(long long int, long int)’
   45 |     seg[lc(p)].tag = min(seg[lc(p)].tag * x, INF);
      |                      ~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/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++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
answer.code:45:25: note:   deduced conflicting types for parameter ‘const _Tp’ (‘long long int’ and...