运行 ID 作者 题号 测评结果 分数 时间 内存 语言 代码长度 提交时间
272754 钢蛋 1696 - 弥明破阵法(25分) 编译错误 0 0 MS 0 KB C++ 1643 3年前
暂时无法获取本题测试点详情。

Main.cc: In function ‘int main()’:
Main.cc:23:28: error: no matching function for call to ‘std::queue<std::pair<int, int> >::push(int&, int&)’
23 | q.push(i, j);
| ^
In file included from /usr/include/c++/9/queue:64,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:86,
from Main.cc:1:
/usr/include/c++/9/bits/stl_queue.h:259:7: note: candidate: ‘void std::queue<_Tp, _Sequence>::push(const value_type&) [with _Tp = std::pair<int, int>; _Sequence = std::deque<std::pair<int, int>, std::allocator<std::pair<int, int> > >; std::queue<_Tp, _Sequence>::value_type = std::pair<int, int>]’
259 | push(const value_type& __x)
| ^~~~
/usr/include/c++/9/bits/stl_queue.h:259:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/9/bits/stl_queue.h:264:7: note: candidate: ‘void std::queue<_Tp, _Sequence>::push(std::queue<_Tp, _Sequence>::value_type&&) [with _Tp = std::pair<int, int>; _Sequence = std::deque<std::pair<int, int>, std::allocator<std::pair<int, int> > >; std::queue<_Tp, _Sequence>::value_type = std::pair<int, int>]’
264 | push(value_type&& __x)
| ^~~~
/usr/include/c++/9/bits/stl_queue.h:264:7: note: candidate expects 1 argument, 2 provided
Main.cc:27:26: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’
27 | auto [x, y] = q.front();
| ^
Main.cc:39:30: error: ‘class std::vector<std::vector<int> >’ has no member named ‘find’
39 | auto it = mp.find(cnt);
| ^~~~
Main.cc:41:34: error: no match for ‘operator=’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type’ {aka ‘std::vector<int>’} and ‘int’)
41 | mp[cnt *2] = 1;
| ^
In file included from /usr/include/c++/9/vector:72,
from /usr/include/c++/9/queue:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:86,
from Main.cc:1:
/usr/include/c++/9/bits/vector.tcc:198:5: note: candidate: ‘std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>]’
198 | vector<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/vector.tcc:199:42: note: no known conversion for argument 1 from ‘int’ to ‘const std::vector<int>&’
199 | operator=(const vector<_Tp, _Alloc>& __x)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/9/vector:67,
from /usr/include/c++/9/queue:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:86,
from Main.cc:1:
/usr/include/c++/9/bits/stl_vector.h:706:7: note: candidate: ‘std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator<int>]’
706 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ^~~~~~~~
/usr/include/c++/9/bits/stl_vector.h:706:26: note: no known conversion for argument 1 from ‘int’ to ‘std::vector<int>&&’
706 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ~~~~~~~~~^~~
/usr/include/c++/9/bits/stl_vector.h:727:7: note: candidate: ‘std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>]’
727 | operator=(initializer_list<value_type> __l)
| ^~~~~~~~
/usr/include/c++/9/bits/stl_vector.h:727:46: note: no known conversion for argument 1 from ‘int’ to ‘std::initializer_list<int>’
727 | operator=(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
Main.cc:42:33: error: no matching function for call to ‘std::vector<std::vector<int> >::erase(int&)’
42 | mp.erase(cnt);
| ^
In file included from /usr/include/c++/9/vector:67,
from /usr/include/c++/9/queue:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:86,
from Main.cc:1:
/usr/include/c++/9/bits/stl_vector.h:1427:7: note: candidate: ‘std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(std::vector<_Tp, _Alloc>::const_iterator) [with _Tp = std::vector<int>; _Alloc = std::allocator<std::vector<int> >; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<std::vector<int>*, std::vector<std::vector<int> > >; typename std::_Vector_base<_Tp, _Alloc>::pointer = std::vector<int>*; std::vector<_Tp, _Alloc>::const_iterator = __gnu_cxx::__normal_iterator<const std::vector<int>*, std::vector<std::vector<int> > >; typename __gnu_cxx::__alloc_traits<typename std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type>::const_pointer = const std::vector<int>*]’
1427 | erase(const_iterator __position)
| ^~~~~
/usr/include/c++/9/bits/stl_vector.h:1427:28: note: no known conversion for argument 1 from ‘int’ to ‘std::vector<std::vector<int> >::const_iterator’ {aka ‘__gnu_cxx::__normal_iterator<const std::vector<int>*, std::vector<std::vector<int> > >’}
1427 | erase(const_iterator __position)
| ~~~~~~~~~~~~~~~^~~~~~~~~~
/usr/include/c++/9/bits/stl_vector.h:1454:7: note: candidate: ‘std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(std::vector<_Tp, _Alloc>::const_iterator, std::vector<_Tp, _Alloc>::const_iterator) [with _Tp = std::vector<int>; _Alloc = std::allocator<std::vector<int> >; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<std::vector<int>*, std::vector<std::vector<int> > >; typename std::_Vector_base<_Tp, _Alloc>::pointer = std::vector<int>*; std::vector<_Tp, _Alloc>::const_iterator = __gnu_cxx::__normal_iterator<const std::vector<int>*, std::vector<std::vector<int> > >; typename __gnu_cxx::__alloc_traits<typename std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type>::const_pointer = const std::vector<int>*]’
1454 | erase(const_iterator __first, const_iterator __last)
| ^~~~~
/usr/include/c++/9/bits/stl_vector.h:1454:7: note: candidate expects 2 arguments, 1 provided
Main.cc:43:33: error: no match for ‘operator=’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type’ {aka ‘std::vector<int>’} and ‘int’)
43 | } else mp[cnt] =1;
| ^
In file included from /usr/include/c++/9/vector:72,
from /usr/include/c++/9/queue:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:86,
from Main.cc:1:
/usr/include/c++/9/bits/vector.tcc:198:5: note: candidate: ‘std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>]’
198 | vector<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/vector.tcc:199:42: note: no known conversion for argument 1 from ‘int’ to ‘const std::vector<int>&’
199 | operator=(const vector<_Tp, _Alloc>& __x)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/9/vector:67,
from /usr/include/c++/9/queue:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:86,
from Main.cc:1:
/usr/include/c++/9/bits/stl_vector.h:706:7: note: candidate: ‘std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator<int>]’
706 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ^~~~~~~~
/usr/include/c++/9/bits/stl_vector.h:706:26: note: no known conversion for argument 1 from ‘int’ to ‘std::vector<int>&&’
706 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ~~~~~~~~~^~~
/usr/include/c++/9/bits/stl_vector.h:727:7: note: candidate: ‘std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>]’
727 | operator=(initializer_list<value_type> __l)
| ^~~~~~~~
/usr/include/c++/9/bits/stl_vector.h:727:46: note: no known conversion for argument 1 from ‘int’ to ‘std::initializer_list<int>’
727 | operator=(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
Main.cc:49:21: error: base operand of ‘->’ has non-pointer type ‘std::vector<int>’
49 | if (ans < it->key) {
| ^~
Main.cc:50:21: error: base operand of ‘->’ has non-pointer type ‘std::vector<int>’
50 | ans = it->key;
| ^~