islands.cpp: In function 'void dfs(int, int, int)':
islands.cpp:2:12: error: 'class std::vector<std::pair<int, int> >' has no member named 'first'
2 | #define fi first
| ^~~~~
islands.cpp:25:13: note: in expansion of macro 'fi'
25 | if(!vis[i.fi]){
| ^~
islands.cpp:2:12: error: 'class std::vector<std::pair<int, int> >' has no member named 'first'
2 | #define fi first
| ^~~~~
islands.cpp:26:8: note: in expansion of macro 'fi'
26 | p[i.fi] = v;
| ^~
islands.cpp:2:12: error: 'class std::vector<std::pair<int, int> >' has no member named 'first'
2 | #define fi first
| ^~~~~
islands.cpp:27:14: note: in expansion of macro 'fi'
27 | dfs(id, i.fi, v);
| ^~
islands.cpp:2:12: error: 'class std::vector<std::pair<int, int> >' has no member named 'first'
2 | #define fi first
| ^~~~~
islands.cpp:28:8: note: in expansion of macro 'fi'
28 | w[i.fi] = i.se;
| ^~
islands.cpp:3:12: error: 'class std::vector<std::pair<int, int> >' has no member named 'second'
3 | #define se second
| ^~~~~~
islands.cpp:28:16: note: in expansion of macro 'se'
28 | w[i.fi] = i.se;
| ^~
islands.cpp:2:12: error: 'class std::vector<std::pair<int, int> >' has no member named 'first'
2 | #define fi first
| ^~~~~
islands.cpp:29:14: note: in expansion of macro 'fi'
29 | }else if(i.fi != pa){
| ^~
islands.cpp:2:12: error: 'class std::vector<std::pair<int, int> >' has no member named 'first'
2 | #define fi first
| ^~~~~
islands.cpp:30:22: note: in expansion of macro 'fi'
30 | extra[id] = {v, i.fi, i.se};
| ^~
islands.cpp:3:12: error: 'class std::vector<std::pair<int, int> >' has no member named 'second'
3 | #define se second
| ^~~~~~
islands.cpp:30:28: note: in expansion of macro 'se'
30 | extra[id] = {v, i.fi, i.se};
| ^~
islands.cpp:30:30: error: no match for 'operator=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<edge>, edge>::value_type' {aka 'edge'} and '<brace-enclosed initializer list>')
30 | extra[id] = {v, i.fi, i.se};
| ^
islands.cpp:17:8: note: candidate: 'constexpr edge& edge::operator=(const edge&)'
17 | struct edge{
| ^~~~
islands.cpp:17:8: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const edge&'
islands.cpp:17:8: note: candidate: 'constexpr edge& edge::operator=(edge&&)'
islands.cpp:17:8: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'edge&&'
islands.cpp: In function 'long long int dfs_dp(int, int, int)':
islands.cpp:2:12: error: 'class std::vector<std::pair<int, int> >' has no member named 'first'
2 | #define fi first
| ^~~~~
islands.cpp:43:13: note: in expansion of macro 'fi'
43 | if(!cyc[i.fi] && i.fi != pa){
| ^~
islands.cpp:2:12: error: 'class std::vector<std::pair<int, int> >' has no member named 'first'
2 | #define fi first
| ^~~~~
islands.cpp:43:22: note: in expansion of macro 'fi'
43 | if(!cyc[i.fi] && i.fi != pa){
| ^~
islands.cpp:2:12: error: 'class std::vector<std::pair<int, int> >' has no member named 'first'
2 | #define fi first
| ^~~~~
islands.cpp:44:31: note: in expansion of macro 'fi'
44 | long long r = dfs_dp(id, i.fi, v);
| ^~
islands.cpp:2:12: error: 'class std::vector<std::pair<int, int> >' has no member named 'first'
2 | #define fi first
| ^~~~~
islands.cpp:46:23: note: in expansion of macro 'fi'
46 | long long v = dp[i.fi] + i.se;
| ^~
islands.cpp:3:12: error: 'class std::vector<std::pair<int, int> >' has no member named 'second'
3 | #define se second
| ^~~~~~
islands.cpp:46:31: note: in expansion of macro 'se'
46 | long long v = dp[i.fi] + i.se;
| ^~
islands.cpp: In function 'int32_t main()':
islands.cpp:85:25: error: no matching function for call to 'std::vector<std::vector<std::pair<int, int> > >::push_back(<brace-enclosed initializer list>)'
85 | G[i].push_back({v, _w});
| ^
In file included from /usr/include/c++/10/vector:67,
from /usr/include/c++/10/queue:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
from islands.cpp:1:
/usr/include/c++/10/bits/stl_vector.h:1187:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::vector<std::pair<int, int> >; _Alloc = std::allocator<std::vector<std::pair<int, int> > >; std::vector<_Tp, _Alloc>::value_type = std::vector<std::pair<int, int> >]'
1187 | push_back(const value_type& __x)
| ^~~~~~~~~
/usr/include/c++/10/bits/stl_vector.h:1187:35: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type&' {aka 'const std::vector<std::pair<int, int> >&'}
1187 | push_back(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_vector.h:1203:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = std::vector<std::pair<int, int> >; _Alloc = std::allocator<std::vector<std::pair<int, int> > >; std::vector<_Tp, _Alloc>::value_type = std::vector<std::pair<int, int> >]'
1203 | push_back(value_type&& __x)
| ^~~~~~~~~
/usr/include/c++/10/bits/stl_vector.h:1203:30: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<std::vector<std::pair<int, int> > >::value_type&&' {aka 'std::vector<std::pair<int, int> >&&'}
1203 | push_back(value_type&& __x)
| ~~~~~~~~~~~~~^~~
islands.cpp:86:25: error: no matching function for call to 'std::vector<std::vector<std::pair<int, int> > >::push_back(<brace-enclosed initializer list>)'
86 | G[v].push_back({i, _w});
| ^
In file included from /usr/include/c++/10/vector:67,
from /usr/include/c++/10/queue:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
from islands.cpp:1:
/usr/include/c++/10/bits/stl_vector.h:1187:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::vector<std::pair<int, int> >; _Alloc = std::allocator<std::vector<std::pair<int, int> > >; std::vector<_Tp, _Alloc>::value_type = std::vector<std::pair<int, int> >]'
1187 | push_back(const value_type& __x)
| ^~~~~~~~~
/usr/include/c++/10/bits/stl_vector.h:1187:35: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type&' {aka 'const std::vector<std::pair<int, int> >&'}
1187 | push_back(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_vector.h:1203:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = std::vector<std::pair<int, int> >; _Alloc = std::allocator<std::vector<std::pair<int, int> > >; std::vector<_Tp, _Alloc>::value_type = std::vector<std::pair<int, int> >]'
1203 | push_back(value_type&& __x)
| ^~~~~~~~~
/usr/include/c++/10/bits/stl_vector.h:1203:30: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<std::vector<std::pair<int, int> > >::value_type&&' {aka 'std::vector<std::pair<int, int> >&&'}
1203 | push_back(value_type&& __x)
| ~~~~~~~~~~~~~^~~
islands.cpp:142:10: error: 'ans' was not declared in this scope; did you mean 'abs'?
142 | cout << ans << endl;
| ^~~
| abs