shoes.cpp: In function 'long long int count_swaps(std::vector<int>)':
shoes.cpp:31:13: error: cannot convert 'std::pair<const long long int, long long int>' to 'long long int' in assignment
31 | k = x;
| ^
| |
| std::pair<const long long int, long long int>
shoes.cpp:32:30: error: no match for 'operator[]' (operand types are 'std::vector<long long int> [(n + 4)][2]' and 'std::pair<const long long int, long long int>')
32 | for(ll i = 0; i < adj[x][0]; i++){
| ^
shoes.cpp:33:19: error: no match for 'operator[]' (operand types are 'std::vector<long long int> [(n + 4)][2]' and 'std::pair<const long long int, long long int>')
33 | if(adj[x][0][i] > adj[x][1][i]){
| ^
shoes.cpp:33:34: error: no match for 'operator[]' (operand types are 'std::vector<long long int> [(n + 4)][2]' and 'std::pair<const long long int, long long int>')
33 | if(adj[x][0][i] > adj[x][1][i]){
| ^
shoes.cpp:34:25: error: no match for 'operator[]' (operand types are 'std::vector<long long int> [(n + 4)][2]' and 'std::pair<const long long int, long long int>')
34 | ans+=adj[x][0][i] - adj[x][1][i] - 1;
| ^
shoes.cpp:34:40: error: no match for 'operator[]' (operand types are 'std::vector<long long int> [(n + 4)][2]' and 'std::pair<const long long int, long long int>')
34 | ans+=adj[x][0][i] - adj[x][1][i] - 1;
| ^
shoes.cpp:37:25: error: no match for 'operator[]' (operand types are 'std::vector<long long int> [(n + 4)][2]' and 'std::pair<const long long int, long long int>')
37 | ans+=adj[x][1][i] - adj[x][0][i] - 2;
| ^
shoes.cpp:37:40: error: no match for 'operator[]' (operand types are 'std::vector<long long int> [(n + 4)][2]' and 'std::pair<const long long int, long long int>')
37 | ans+=adj[x][1][i] - adj[x][0][i] - 2;
| ^
shoes.cpp:44:1: warning: control reaches end of non-void function [-Wreturn-type]
44 | }
| ^