worldmap.cpp: In function 'std::vector<std::vector<int> > create_map(int, int, vi, vi)':
worldmap.cpp:111:24: error: conflicting declaration 'std::set<std::pair<int, int> > seen'
111 | set<pair<int,int>> seen;
| ^~~~
worldmap.cpp:61:18: note: previous declaration as 'std::vector<bool> seen'
61 | vector<bool> seen(n + 1);
| ^~~~
worldmap.cpp:120:40: error: no matching function for call to 'std::vector<bool>::insert(<brace-enclosed initializer list>)'
120 | if (u != v) seen.insert({u, v});
| ~~~~~~~~~~~^~~~~~~~
In file included from /usr/include/c++/11/vector:68,
from /usr/include/c++/11/functional:62,
from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/11/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from worldmap.cpp:1:
/usr/include/c++/11/bits/stl_bvector.h:1016:9: note: candidate: 'template<class _InputIterator, class> std::vector<bool, _Alloc>::iterator std::vector<bool, _Alloc>::insert(std::vector<bool, _Alloc>::const_iterator, _InputIterator, _InputIterator) [with _InputIterator = _InputIterator; <template-parameter-2-2> = <template-parameter-1-2>; _Alloc = std::allocator<bool>]'
1016 | insert(const_iterator __position,
| ^~~~~~
/usr/include/c++/11/bits/stl_bvector.h:1016:9: note: template argument deduction/substitution failed:
worldmap.cpp:120:40: note: candidate expects 3 arguments, 1 provided
120 | if (u != v) seen.insert({u, v});
| ~~~~~~~~~~~^~~~~~~~
In file included from /usr/include/c++/11/vector:68,
from /usr/include/c++/11/functional:62,
from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/11/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from worldmap.cpp:1:
/usr/include/c++/11/bits/stl_bvector.h:998:7: note: candidate: 'std::vector<bool, _Alloc>::iterator std::vector<bool, _Alloc>::insert(std::vector<bool, _Alloc>::const_iterator, const bool&) [with _Alloc = std::allocator<bool>; std::vector<bool, _Alloc>::iterator = std::vector<bool>::iterator; std::vector<bool, _Alloc>::const_iterator = std::vector<bool>::const_iterator]' (near match)
998 | insert(const_iterator __position, const bool& __x = bool())
| ^~~~~~
/usr/include/c++/11/bits/stl_bvector.h:998:7: note: conversion of argument 1 would be ill-formed:
worldmap.cpp:120:42: error: invalid conversion from 'int' to 'std::_Bit_type*' {aka 'long unsigned int*'} [-fpermissive]
120 | if (u != v) seen.insert({u, v});
| ^
| |
| int
In file included from /usr/include/c++/11/vector:68,
from /usr/include/c++/11/functional:62,
from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/11/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from worldmap.cpp:1:
/usr/include/c++/11/bits/stl_bvector.h:336:37: note: initializing argument 1 of 'std::_Bit_const_iterator::_Bit_const_iterator(std::_Bit_type*, unsigned int)'
336 | _Bit_const_iterator(_Bit_type * __x, unsigned int __y)
| ~~~~~~~~~~~~^~~
worldmap.cpp:120:45: warning: narrowing conversion of 'v' from 'int' to 'unsigned int' [-Wnarrowing]
120 | if (u != v) seen.insert({u, v});
| ^
In file included from /usr/include/c++/11/vector:68,
from /usr/include/c++/11/functional:62,
from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/11/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from worldmap.cpp:1:
/usr/include/c++/11/bits/stl_bvector.h:1039:7: note: candidate: 'std::vector<bool, _Alloc>::iterator std::vector<bool, _Alloc>::insert(std::vector<bool, _Alloc>::const_iterator, std::vector<bool, _Alloc>::size_type, const bool&) [with _Alloc = std::allocator<bool>; std::vector<bool, _Alloc>::iterator = std::vector<bool>::iterator; std::vector<bool, _Alloc>::const_iterator = std::vector<bool>::const_iterator; std::vector<bool, _Alloc>::size_type = long unsigned int]'
1039 | insert(const_iterator __position, size_type __n, const bool& __x)
| ^~~~~~
/usr/include/c++/11/bits/stl_bvector.h:1039:7: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/11/bits/stl_bvector.h:1053:7: note: candidate: 'std::vector<bool, _Alloc>::iterator std::vector<bool, _Alloc>::insert(std::vector<bool, _Alloc>::const_iterator, std::initializer_list<bool>) [with _Alloc = std::allocator<bool>; std::vector<bool, _Alloc>::iterator = std::vector<bool>::iterator; std::vector<bool, _Alloc>::const_iterator = std::vector<bool>::const_iterator]'
1053 | insert(const_iterator __p, initializer_list<bool> __l)
| ^~~~~~
/usr/include/c++/11/bits/stl_bvector.h:1053:7: note: candidate expects 2 arguments, 1 provided
In file included from /usr/include/c++/11/cassert:44,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:33,
from worldmap.cpp:1:
worldmap.cpp:125:21: error: 'class std::vector<bool>' has no member named 'count'
125 | assert(seen.count({a[i], b[i]}) || seen.count({b[i], a[i]}));
| ^~~~~
worldmap.cpp:125:49: error: 'class std::vector<bool>' has no member named 'count'
125 | assert(seen.count({a[i], b[i]}) || seen.count({b[i], a[i]}));
| ^~~~~