pipes.cpp: In function 'int main()':
pipes.cpp:108:66: error: no matching function for call to 'lower_bound(std::vector<std::pair<int, int> >::iterator, std::vector<std::pair<int, int> >::iterator, <brace-enclosed initializer list>)'
auto p = lower_bound(bri.begin(), bri.end(), {pos, -1});
^
In file included from /usr/include/c++/7/vector:60:0,
from pipes.cpp:2:
/usr/include/c++/7/bits/stl_algobase.h:984:5: note: candidate: template<class _ForwardIterator, class _Tp> _ForwardIterator std::lower_bound(_ForwardIterator, _ForwardIterator, const _Tp&)
lower_bound(_ForwardIterator __first, _ForwardIterator __last,
^~~~~~~~~~~
/usr/include/c++/7/bits/stl_algobase.h:984:5: note: template argument deduction/substitution failed:
pipes.cpp:108:66: note: couldn't deduce template parameter '_Tp'
auto p = lower_bound(bri.begin(), bri.end(), {pos, -1});
^
In file included from /usr/include/c++/7/algorithm:62:0,
from pipes.cpp:3:
/usr/include/c++/7/bits/stl_algo.h:2023:5: note: candidate: template<class _FIter, class _Tp, class _Compare> _FIter std::lower_bound(_FIter, _FIter, const _Tp&, _Compare)
lower_bound(_ForwardIterator __first, _ForwardIterator __last,
^~~~~~~~~~~
/usr/include/c++/7/bits/stl_algo.h:2023:5: note: template argument deduction/substitution failed:
pipes.cpp:108:66: note: candidate expects 4 arguments, 3 provided
auto p = lower_bound(bri.begin(), bri.end(), {pos, -1});
^
pipes.cpp:109:39: error: expected primary-expression before '.' token
while(p < bri.end() && disj.find(bri[p].first) != pos){
^
pipes.cpp:72:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d\n",&n,&m);
~~~~~^~~~~~~~~~~~~~~~~
pipes.cpp:78:14: warning: ignoring return value of 'char* fgets(char*, int, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
fgets(str,15,stdin);
~~~~~^~~~~~~~~~~~~~