island.cpp: In function 'void Init(int, std::vector<int>, std::vector<int>, std::vector<int>)':
island.cpp:27:14: error: request for member 'insert' in 'second.std::vector<int>::operator[](((std::vector<int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}'
S[i].insert ({m, i});
^~~~~~
island.cpp:41:18: error: request for member 'insert' in 'second.std::vector<int>::operator[](((std::vector<int>::size_type)x))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}'
S[x].insert ({i, v});
^~~~~~
island.cpp: In function 'int Separate(int, int)':
island.cpp:50:25: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
int mid = l + r + 1 >> 1;
~~~~~~^~~
island.cpp:53:16: error: cannot convert 'const std::pair<int, int>' to 'int' in assignment
x = (*I);
^
island.cpp:55:16: error: cannot convert 'const std::pair<int, int>' to 'int' in assignment
y = (*I);
^