shoes.cpp: In function 'long long int count_swaps(std::vector<int>)':
shoes.cpp:9:9: error: 'map' was not declared in this scope
9 | map<int, int> mp;
| ^~~
shoes.cpp:2:1: note: 'std::map' is defined in header '<map>'; did you forget to '#include <map>'?
1 | #include "shoes.h"
+++ |+#include <map>
2 |
shoes.cpp:9:13: error: expected primary-expression before 'int'
9 | map<int, int> mp;
| ^~~
shoes.cpp:10:46: error: 'mp' was not declared in this scope
10 | for (int i = n * 2 - 1; i >= 0; --i) mp[s[i]] = i;
| ^~
shoes.cpp:14:24: error: 'mp' was not declared in this scope
14 | x = min(x, mp[-s[i]] + i + (mp[-s[i]] > i) - 1);
| ^~
shoes.cpp:19:22: error: 'mp' was not declared in this scope
19 | if (x == mp[-s[i]] + i + (mp[-s[i]] > i) - 1) {
| ^~