QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#688115#9528. New Energy Vehicleucup-team5126Compile Error//C++171.5kb2024-10-29 23:26:202024-10-29 23:26:20

Details

answer.code:6:7: error: ‘ll’ does not name a type
    6 | const ll maxn = 400005;
      |       ^~
answer.code:7:7: error: ‘ll’ does not name a type
    7 | const ll inf = 1e18+7;
      |       ^~
answer.code:9:5: error: ‘ll’ does not name a type
    9 |     ll id,val;
      |     ^~
answer.code: In member function ‘bool Node::operator<(const Node&) const’:
answer.code:11:12: error: ‘val’ was not declared in this scope
   11 |         if(val==p.val)return id < p.id;
      |            ^~~
answer.code:11:19: error: ‘const struct Node’ has no member named ‘val’
   11 |         if(val==p.val)return id < p.id;
      |                   ^~~
answer.code:11:30: error: ‘id’ was not declared in this scope
   11 |         if(val==p.val)return id < p.id;
      |                              ^~
answer.code:11:37: error: ‘const struct Node’ has no member named ‘id’
   11 |         if(val==p.val)return id < p.id;
      |                                     ^~
answer.code:12:29: error: ‘const struct Node’ has no member named ‘val’
   12 |         else return val < p.val;
      |                             ^~~
answer.code: At global scope:
answer.code:14:4: error: ‘maxn’ was not declared in this scope
   14 | }s[maxn];
      |    ^~~~
answer.code:15:1: error: ‘ll’ does not name a type
   15 | ll a[maxn],n,m,b[maxn];
      | ^~
answer.code: In function ‘void init()’:
answer.code:21:10: error: ‘n’ was not declared in this scope; did you mean ‘yn’?
   21 |     cin>>n>>m;
      |          ^
      |          yn
answer.code:21:13: error: ‘m’ was not declared in this scope; did you mean ‘tm’?
   21 |     cin>>n>>m;
      |             ^
      |             tm
answer.code:22:9: error: ‘ll’ was not declared in this scope
   22 |     for(ll i=1;i<=n;i++)cin>>a[i],b[i]=a[i];
      |         ^~
answer.code:22:16: error: ‘i’ was not declared in this scope
   22 |     for(ll i=1;i<=n;i++)cin>>a[i],b[i]=a[i];
      |                ^
answer.code:22:30: error: ‘a’ was not declared in this scope
   22 |     for(ll i=1;i<=n;i++)cin>>a[i],b[i]=a[i];
      |                              ^
answer.code:22:35: error: ‘b’ was not declared in this scope
   22 |     for(ll i=1;i<=n;i++)cin>>a[i],b[i]=a[i];
      |                                   ^
answer.code:23:9: error: ‘ll’ was not declared in this scope
   23 |     for(ll i=1;i<=m;i++){
      |         ^~
answer.code:23:16: error: ‘i’ was not declared in this scope
   23 |     for(ll i=1;i<=m;i++){
      |                ^
answer.code:24:14: error: ‘s’ was not declared in this scope; did you mean ‘st’?
   24 |         cin>>s[i].val>>s[i].id;
      |              ^
      |              st
answer.code:25:18: error: no matching function for call to ‘std::set<Node>::insert(<brace-enclosed initializer list>)’
   25 |         st.insert({s[i].id,s[i].val});
      |         ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/13/set:63,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:158,
                 from answer.code:4:
/usr/include/c++/13/bits/stl_set.h:568:9: note: candidate: ‘template<class _InputIterator> void std::set<_Key, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _Key = Node; _Compare = std::less<Node>; _Alloc = std::allocator<Node>]’
  568 |         insert(_InputIterator __first, _InputIterator __last)
      |         ^~~~~~
/usr/include/c++/13/bits/stl_set.h:568:9: note:   template argument deduction/substitution failed:
answer.code:25:18: note:   candidate expects 2 arguments, 1 provided
   25 |         st.insert({s[i].id,s[i].val});
      |         ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_set.h:511:7: note: candidate: ‘std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = Node; _Compare = std::less<Node>; _Alloc = std::allocator<Node>; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<Node, Node, std::_Identity<Node>, std::less<Node>, std::allocator<Node> >::const_iterator; typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other = std::allocator<Node>; typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key> = __gnu_cxx::__alloc_traits<std::allocator<Node>, Node>::rebind<Node>; typename _Alloc::value_type = Node; value_type = Node]’
  511 |       insert(const value_type& __x)
      |       ^~~~~~
/usr/include/c++/13/bits/stl_set.h:511:32: note:   no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const std::set<Node>::value_type&’ {aka ‘const Node&’}
  511 |       insert(const value_type& __x)
      |              ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_set.h:520:7: note: candidate: ‘std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename...