city.cpp: In function 'int DistanceSum(int, int*, int*)':
city.cpp:41:20: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
41 | while(bfs.size()!=N)
| ~~~~~~~~~~^~~
city.cpp:48:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
48 | for(int k = 0; k < v[bfs[j]].size(); k++)
| ~~^~~~~~~~~~~~~~~~~~
city.cpp:39:9: warning: unused variable 'ok' [-Wunused-variable]
39 | bool ok=1;
| ^~
city.cpp:87:31: error: no matching function for call to 'std::vector<std::pair<int, long long int> >::push_back(int&, long long int)'
87 | v[X[i]].push_back(Y[i], 0LL);
| ^
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 city.cpp:2:
/usr/include/c++/9/bits/stl_vector.h:1184:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<int, long long int>; _Alloc = std::allocator<std::pair<int, long long int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, long long int>]'
1184 | push_back(const value_type& __x)
| ^~~~~~~~~
/usr/include/c++/9/bits/stl_vector.h:1184:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/9/bits/stl_vector.h:1200:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = std::pair<int, long long int>; _Alloc = std::allocator<std::pair<int, long long int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, long long int>]'
1200 | push_back(value_type&& __x)
| ^~~~~~~~~
/usr/include/c++/9/bits/stl_vector.h:1200:7: note: candidate expects 1 argument, 2 provided
city.cpp:95:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
95 | for(int j = 0; j < v[i-x_min].size(); j++)
| ~~^~~~~~~~~~~~~~~~~~~
city.cpp:109:54: error: conversion from '__normal_iterator<std::pair<int, long long int>*,vector<pair<[...],long long int>>>' to non-scalar type '__normal_iterator<std::pair<int, int>*,vector<pair<[...],int>>>' requested
109 | vector<pair<int, int> >::iterator it=lower_bound(v[i-x_min-1].begin(), v[i-x_min-1].end(), make_pair(v[i-x_min][j].first, 0LL));
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
city.cpp:110:11: error: no match for 'operator==' (operand types are 'std::vector<std::pair<int, int> >::iterator' {aka '__gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >'} and 'std::vector<std::pair<int, long long int> >::iterator' {aka '__gnu_cxx::__normal_iterator<std::pair<int, long long int>*, std::vector<std::pair<int, long long int> > >'})
110 | if(it==v[i-x_min-1].end())
| ~~^~~~~~~~~~~~~~~~~~~~
| | |
| | __normal_iterator<std::pair<int, long long int>*,vector<pair<[...],long long int>>>
| __normal_iterator<std::pair<int, int>*,vector<pair<[...],int>>>
In file included from /usr/include/c++/9/regex:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:110,
from city.cpp:2:
/usr/include/c++/9/bits/regex.h:1026:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const std::__cxx11::sub_match<_BiIter>&, const std::__cxx11::sub_match<_BiIter>&)'
1026 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/9/bits/regex.h:1026:5: note: template argument deduction/substitution failed:
city.cpp:110:30: note: 'std::vector<std::pair<int, int> >::iterator' {aka '__gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
110 | if(it==v[i-x_min-1].end())
| ^
In file included from /usr/include/c++/9/regex:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:110,
from city.cpp:2:
/usr/include/c++/9/bits/regex.h:1099:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const std::__cxx11::sub_match<_BiIter>&)'
1099 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/9/bits/regex.h:1099:5: note: template argument deduction/substitution failed:
city.cpp:110:30: note: 'std::vector<std::pair<int, int> >::iterator' {aka '__gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >'} is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
110 | if(it==v[i-x_min-1].end())
| ^
In file included from /usr/include/c++/9/regex:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:110,
from city.cpp:2:
/usr/include/c++/9/bits/regex.h:1173:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(const std::__cxx11::sub_match<_BiIter>&, std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1173 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/9/bits/regex.h:1173:5: note: template argument deduction/substitution failed:
city.cpp:110:30: note: 'std::vector<std::pair<int, int> >::iterator' {aka '__gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
110 | if(it==v[i-x_min-1].end())
| ^
In file included from /usr/include/c++/9/regex:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:110,
from city.cpp:2:
/usr/include/c++/9/bits/regex.h:1247:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const std::__cxx11::sub_match<_BiIter>&)'
1247 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/9/bits/regex.h:1247:5: note: template argument deduction/substitution failed:
city.cpp:110:30: note: 'std::vector<std::pair<int, long long int> >::iterator' {aka '__gnu_cxx::__normal_iterator<std::pair<int, long long int>*, std::vector<std::pair<int, long long int> > >'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
110 | if(it==v[i-x_min-1].end())
| ^
In file included from /usr/include/c++/9/regex:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:110,
from city.cpp:2:
/usr/include/c++/9/bits/regex.h:1321:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const std::__cxx11::sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1321 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/9/bits/regex.h:1321:5: note: template argument deduction/substitution failed:
city.cpp:110:30: note: 'std::vector<std::pair<int, int> >::iterator' {aka '__gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
110 | if(it==v[i-x_min-1].end())
| ^
In file included from /usr/include/c++/9/regex:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:110,
from city.cpp:2:
/usr/include/c++/9/bits/regex.h:1395:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const std::__cxx11::sub_match<_BiIter>&)'
1395 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/9/bits/regex.h:1395:5: note: template argument deduction/substitution failed:
city.cpp:110:30: note: 'std::vector<std::pair<int, long long int> >::iterator' {aka '__gnu_cxx::__normal_iterator<std::pair<int, long long int>*, std::vector<std::pair<int, long long int> > >'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
110 | if(it==v[i-x_min-1].end())
| ^
In file included from /usr/include/c++/9/regex:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:110,
from city.cpp:2:
/usr/include/c++/9/bits/regex.h:1473:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const std::__cxx11::sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1473 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/9/bits/regex.h:1473:5: note: template argument deduction/substitution failed:
city.cpp:110:30: note: 'std::vector<std::pair<int, int> >::iterator' {aka '__gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
110 | if(it==v[i-x_min-1].end())
| ^
In file included from /usr/include/c++/9/regex:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:110,
from city.cpp:2:
/usr/include/c++/9/bits/regex.h:1991:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const std::__cxx11::match_results<_BiIter, _Alloc>&, const std::__cxx11::match_results<_BiIter, _Alloc>&)'
1991 | operator==(const match_results<_Bi_iter, _Alloc>& __m1,
| ^~~~~~~~
/usr/include/c++/9/bits/regex.h:1991:5: note: template argument deduction/substitution failed:
city.cpp:110:30: note: 'std::vector<std::pair<int, int> >::iterator' {aka '__gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >'} is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>'
110 | if(it==v[i-x_min-1].end())
| ^
In file included from /usr/include/c++/9/iosfwd:40,
from /usr/include/c++/9/ios:38,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from city.cpp:2:
/usr/include/c++/9/bits/postypes.h:222:5: note: candidate: 'template<class _StateT> bool std::operator==(const std::fpos<_StateT>&, const std::fpos<_StateT>&)'
222 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
| ^~~~~~~~
/usr/include/c++/9/bits/postypes.h:222:5: note: template argument deduction/substitution failed:
city.cpp:110:30: note: 'std::vector<std::pair<int, int> >::iterator' {aka '__gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >'} is not derived from 'const std::fpos<_StateT>'
110 | if(it==v[i-x_min-1].end())
| ^
In file included from /usr/include/c++/9/bits/stl_algobase.h:64,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from city.cpp:2:
/usr/include/c++/9/bits/stl_pair.h:448:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)'
448 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/9/bits/stl_pair.h:448:5: note: template argument deduction/substitution failed:
city.cpp:110:30: note: 'std::vector<std::pair<int, int> >::iterator' {aka '__gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >'} is not derived from 'const std::pair<_T1, _T2>'
110 | if(it==v[i-x_min-1].end())
| ^
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from city.cpp:2:
/usr/include/c++/9/bits/stl_iterator.h:325:5: note: candidate: 'template<class _Iterator> bool std::operator==(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)'
325 | operator==(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:325:5: note: template argument deduction/substitution failed:
city.cpp:110:30: note: 'std::vector<std::pair<int, int> >::iterator' {aka '__gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >'} is not derived from 'const std::reverse_iterator<_Iterator>'
110 | if(it==v[i-x_min-1].end())
| ^
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from city.cpp:2:
/usr/include/c++/9/bits/stl_iterator.h:363:5: note: candidate: 'template<class _IteratorL, class _IteratorR> bool std::operator==(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)'
363 | operator==(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:363:5: note: template argument deduction/substitution failed:
city.cpp:110:30: note: 'std::vector<std::pair<int, int> >::iterator' {aka '__gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >'} is not derived from 'const std::reverse_iterator<_Iterator>'
110 | if(it==v[i-x_min-1].end())
| ^
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from city.cpp:2:
/usr/include/c++/9/bits/stl_iterator.h:1139:5: note: candidate: 'template<class _IteratorL, class _IteratorR> bool std::operator==(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)'
1139 | operator==(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:1139:5: note: template argument deduction/substitution failed:
city.cpp:110:30: note: 'std::vector<std::pair<int, int> >::iterator' {aka '__gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >'} is not derived from 'const std::move_iterator<_IteratorL>'
110 | if(it==v[i-x_min-1].end())
| ^
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from city.cpp:2:
/usr/include/c++/9/bits/stl_iterator.h:1145:5: note: candidate: 'template<class _Iterator> bool std::operator==(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorL>&)'
1145 | operator==(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:1145:5: note: template argument deduction/substitution failed:
city.cpp:110:30: note: 'std::vector<std::pair<int, int> >::iterator' {aka '__gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >'} is not derived from 'const std::move_iterator<_IteratorL>'
110 | if(it==v[i-x_min-1].end())
| ^
In file included from /usr/include/c++/9/string:41,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from city.cpp:2:
/usr/include/c++/9/bits/allocator.h:168:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const std::allocator<_CharT>&, const std::allocator<_T2>&)'
168 | operator==(const allocator<_T1>&, const allocator<_T2>&)
| ^~~~~~~~
/usr/include/c++/9/bits/allocator.h:168:5: note: template argument deduction/substitution failed:
city.cpp:110:30: note: 'std::vector<std::pair<int, int> >::iterator' {aka '__gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >'} is not derived from 'const std