swap.cpp:39:1: error: 'vector' does not name a type
39 | vector<pair<int, int>> g[200005];
| ^~~~~~
swap.cpp:40:1: error: 'pair' does not name a type
40 | pair<int, int> p[200005];
| ^~~~
swap.cpp:41:1: error: 'map' does not name a type
41 | map<pair<int, int>, int> mp, pos;
| ^~~
swap.cpp:42:1: error: 'set' does not name a type
42 | set<pair<int, int>> st;
| ^~~
swap.cpp: In function 'int getMinimumFuelCapacity(int, int)':
swap.cpp:50:21: error: 'mp' was not declared in this scope; did you mean 'mx'?
50 | if(X != 1) mx = mp[{1, X}];
| ^~
| mx
swap.cpp:51:29: error: 'mp' was not declared in this scope; did you mean 'mx'?
51 | if(Y != 1) mx = max(mx, mp[{1, Y}]);
| ^~
| mx
swap.cpp:51:21: error: 'max' was not declared in this scope; did you mean 'std::max'?
51 | if(Y != 1) mx = max(mx, mp[{1, Y}]);
| ^~~
| std::max
In file included from /usr/include/c++/10/algorithm:62,
from swap.cpp:25:
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: 'std::max' declared here
3486 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
swap.cpp:54:16: error: 'st' was not declared in this scope; did you mean 'std'?
54 | if(X != 1) st.erase({mp[{1, X}], pos[{1, X}]});
| ^~
| std
swap.cpp:54:26: error: 'mp' was not declared in this scope; did you mean 'mx'?
54 | if(X != 1) st.erase({mp[{1, X}], pos[{1, X}]});
| ^~
| mx
swap.cpp:54:38: error: 'pos' was not declared in this scope; did you mean 'pow'?
54 | if(X != 1) st.erase({mp[{1, X}], pos[{1, X}]});
| ^~~
| pow
swap.cpp:55:16: error: 'st' was not declared in this scope; did you mean 'std'?
55 | if(Y != 1) st.erase({mp[{1, Y}], pos[{1, Y}]});
| ^~
| std
swap.cpp:55:26: error: 'mp' was not declared in this scope; did you mean 'mx'?
55 | if(Y != 1) st.erase({mp[{1, Y}], pos[{1, Y}]});
| ^~
| mx
swap.cpp:55:38: error: 'pos' was not declared in this scope; did you mean 'pow'?
55 | if(Y != 1) st.erase({mp[{1, Y}], pos[{1, Y}]});
| ^~~
| pow
swap.cpp:57:5: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
57 | pair<int, int> p = *st.begin();
| ^~~~
| std::pair
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
from /usr/include/c++/10/deque:60,
from /usr/include/c++/10/stack:60,
from swap.cpp:3:
/usr/include/c++/10/bits/stl_pair.h:211:12: note: 'std::pair' declared here
211 | struct pair
| ^~~~
swap.cpp:57:10: error: expected primary-expression before 'int'
57 | pair<int, int> p = *st.begin();
| ^~~
swap.cpp:58:5: error: 'st' was not declared in this scope; did you mean 'std'?
58 | st.erase(st.begin());
| ^~
| std
swap.cpp:60:19: error: 'p' was not declared in this scope
60 | st.insert(p);
| ^
swap.cpp:61:31: error: 'mp' was not declared in this scope; did you mean 'mx'?
61 | if(X != 1) st.insert({mp[{1, X}], pos[{1, X}]});
| ^~
| mx
swap.cpp:61:43: error: 'pos' was not declared in this scope; did you mean 'pow'?
61 | if(X != 1) st.insert({mp[{1, X}], pos[{1, X}]});
| ^~~
| pow
swap.cpp:62:31: error: 'mp' was not declared in this scope; did you mean 'mx'?
62 | if(Y != 1) st.insert({mp[{1, Y}], pos[{1, Y}]});
| ^~
| mx
swap.cpp:62:43: error: 'pos' was not declared in this scope; did you mean 'pow'?
62 | if(Y != 1) st.insert({mp[{1, Y}], pos[{1, Y}]});
| ^~~
| pow
swap.cpp:63:16: error: 'max' was not declared in this scope; did you mean 'std::max'?
63 | return max(mx, p.first);
| ^~~
| std::max
In file included from /usr/include/c++/10/algorithm:62,
from swap.cpp:25:
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: 'std::max' declared here
3486 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
swap.cpp:66:14: error: expected primary-expression before 'int'
66 | pair<int, int> p1 = *st.begin();
| ^~~
swap.cpp:67:19: error: 'p1' was not declared in this scope; did you mean 'y1'?
67 | st.insert(p1);
| ^~
| y1
swap.cpp:68:19: error: 'p' was not declared in this scope
68 | st.insert(p);
| ^
swap.cpp:69:31: error: 'mp' was not declared in this scope; did you mean 'mx'?
69 | if(X != 1) st.insert({mp[{1, X}], pos[{1, X}]});
| ^~
| mx
swap.cpp:69:43: error: 'pos' was not declared in this scope; did you mean 'pow'?
69 | if(X != 1) st.insert({mp[{1, X}], pos[{1, X}]});
| ^~~
| pow
swap.cpp:70:31: error: 'mp' was not declared in this scope; did you mean 'mx'?
70 | if(Y != 1) st.insert({mp[{1, Y}], pos[{1, Y}]});
| ^~
| mx
swap.cpp:70:43: error: 'pos' was not declared in this scope; did you mean 'pow'?
70 | if(Y != 1) st.insert({mp[{1, Y}], pos[{1, Y}]});
| ^~~
| pow
swap.cpp:71:16: error: 'max' was not declared in this scope; did you mean 'std::max'?
71 | return max({mx, p.first, p1.first});
| ^~~
| std::max
In file included from /usr/include/c++/10/algorithm:62,
from swap.cpp:25:
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: 'std::max' declared here
3486 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
swap.cpp: In function 'int main()':
swap.cpp:81:5: error: 'g' was not declared in this scope
81 | g[a].push_back({b, c});
| ^
swap.cpp:83:5: error: 'mp' was not declared in this scope
83 | mp[{a, b}] = c;
| ^~
swap.cpp:86:5: error: 'pos' was not declared in this scope; did you mean 'pow'?
86 | pos[{a, b}] = i + 1;
| ^~~
| pow
swap.cpp:89:5: error: 'st' was not declared in this scope; did you mean 'std'?
89 | st.insert({c, i + 1});
| ^~
| std