Borderou de evaluare (job #2352318)
Utilizator | Data | 23 februarie 2019 11:04:53 | |
---|---|---|---|
Problema | TollRoads | Status | done |
Runda | Info Oltenia 2019 Proba pe Echipe Clasele 11 - 12 | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:11:1: error: 'vector' does not name a type
vector<pair<int,int> >g[100005];
^~~~~~
main.cpp:12:1: error: 'vector' does not name a type
vector<int>num[100005];
^~~~~~
main.cpp: In function 'int calc(int)':
main.cpp:26:13: error: 'g' was not declared in this scope
for(auto it:g[nr.second])
^
main.cpp:28:34: error: no matching function for call to 'std::set<std::pair<long long int, int> >::erase(<brace-enclosed initializer list>)'
s.erase({dist[it.first],it.first});
^
In file included from /usr/include/c++/6/set:61:0,
from main.cpp:2:
/usr/include/c++/6/bits/stl_set.h:571:7: note: candidate: std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::erase(std::set<_Key, _Compare, _Alloc>::const_iterator) [with _Key = std::pair<long long int, int>; _Compare = std::less<std::pair<long long int, int> >; _Alloc = std::allocator<std::pair<long long int, int> >; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree_const_iterator<std::pair<long long int, int> >; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree_const_iterator<std::pair<long long int, int> >]
erase(const_iterator __position)
^~~~~
/usr/include/c++/6/bits/stl_set.h:571:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::set<std::pair<long long int, int> >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<long long int, int> >}'
/usr/include/c++/6/bits/stl_set.h:601:7: note: candidate: std::set<_Key, _Compare, _Alloc>::size_type std::set<_Key, _Compare, _Alloc>::erase(const key_type&) [with _Key = std::pair<long long int, int>; _Compare = std::less<std::pair<long long int, int> >; _Alloc = std::allocator<std::pair<long long int, int> >; std::set<_Key, _Compare, _Alloc>::size_type = long unsigned int; std::set<_Key, _Compare, _Alloc>::key_type = std::pair<long long int, int>]
erase(const key_type& __x)
^~~~~
/usr/include/c++/6/bits/stl_set.h:601:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const key_type& {aka const std::pair<long long int, int>&}'
/usr/include/c++/6/bits/stl_set.h:623:7: note: candidate: std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::erase(std::set<_Key, _Compare, _Alloc>::const_iterator, std::set<_Key, _Compare, _Alloc>::const_iterator) [with _Key = std::pair<long long int, int>; _Compare = std::less<std::pair<long long int, int> >; _Alloc = std::allocator<std::pair<long long int, int> >; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree_const_iterator<std::pair<long long int, int> >; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree_const_iterator<std::pair<long long int, int> >]
erase(const_iterator __first, const_iterator __last)
^~~~~
/usr/include/c++/6/bits/stl_set.h:623:7: note: candidate expects 2 arguments, 1 provided
main.cpp:30:35: error: no matching function for call to 'std::set<std::pair<long long int, int> >::insert(<brace-enclosed initializer list>)'
s.insert({dist[it.first],it.first});}}}
^
In file included from /usr/include/c++/6/set:61:0,
from main.cpp:2:
/usr/include/c++/6/bits/stl_set.h:480:7: note: candidate: std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = std::pair<long long int, int>; _Compare = std::less<std::pair<long long int, int> >; _Alloc = std::allocator<std::pair<long long int, int> >; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator = std::_Rb_tree_const_iterator<std::pair<long long int, int> >; std::set<_Key, _Compare, _Alloc>::value_type = std::pair<long long int, int>]
insert(const value_type& __x)
^~~~~~
/usr/include/c++/6/bits/stl_set.h:480:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type& {aka const std::pair<long long int, int>&}'
/usr/include/c++/6/bits/stl_set.h:489:7: note: candidate: std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::value_type&&) [with _Key = std::pair<long long int, int>; _Compare = std::less<std::pair<long long int, int> >; _Alloc = std::allocator<std::pair<long long int, int> >; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator = std::_Rb_tree_const_iterator<std::pair<long long int, int> >; std::set<_Key, _Compare, _Alloc>::value_type = std::pair<long long int, int>]
insert(value_type&& __x)
^~~~~~
/usr/include/c++/6/bits/stl_set.h:489:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::set<std::pair<long long int, int> >::value_type&& {aka std::pair<long long int, int>&&}'
/usr/include/c++/6/bits/stl_set.h:517:7: note: candidate: std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::const_iterator, const value_type&) [with _Key = std::pair<long long int, int>; _Compare = std::less<std::pair<long long int, int> >; _Alloc = std::allocator<std::pair<long long int, int> >; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree_const_iterator<std::pair<long long int, int> >; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree_const_iterator<std::pair<long long int, int> >; std::set<_Key, _Compare, _Alloc>::value_type = std::pair<long long int, int>]
insert(const_iterator __position, const value_type& __x)
^~~~~~
/usr/include/c++/6/bits/stl_set.h:517:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/6/bits/stl_set.h:522:7: note: candidate: std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::const_iterator, std::set<_Key, _Compare, _Alloc>::value_type&&) [with _Key = std::pair<long long int, int>; _Compare = std::less<std::pair<long long int, int> >; _Alloc = std::allocator<std::pair<long long int, int> >; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree_const_iterator<std::pair<long long int, int> >; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree_const_iterator<std::pair<long long int, int> >; std::set<_Key, _Compare, _Alloc>::value_type = std::pair<long long int, int>]
insert(const_iterator __position, value_type&& __x)
^~~~~~
/usr/include/c++/6/bits/stl_set.h:522:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/6/bits/stl_set.h:537:2: note: candidate: template<class _InputIterator> void std::set<_Key, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _InputIterator = _InputIterator; _Key = std::pair<long long int, int>; _Compare = std::less<std::pair<long long int, int> >; _Alloc = std::allocator<std::pair<long long int, int> >]
insert(_InputIterator __first, _InputIterator __last)
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !