elephants.cpp:5:10: error: 'pair' was not declared in this scope
5 | bool cmp(pair<int, int>& a,
| ^~~~
elephants.cpp:5:15: error: expected primary-expression before 'int'
5 | bool cmp(pair<int, int>& a,
| ^~~
elephants.cpp:5:20: error: expected primary-expression before 'int'
5 | bool cmp(pair<int, int>& a,
| ^~~
elephants.cpp:6:9: error: 'pair' was not declared in this scope
6 | pair<int, int>& b)
| ^~~~
elephants.cpp:6:14: error: expected primary-expression before 'int'
6 | pair<int, int>& b)
| ^~~
elephants.cpp:6:19: error: expected primary-expression before 'int'
6 | pair<int, int>& b)
| ^~~
elephants.cpp:6:26: error: expression list treated as compound expression in initializer [-fpermissive]
6 | pair<int, int>& b)
| ^
elephants.cpp:11:8: error: 'pair' was not declared in this scope
11 | vector<pair<int, int> > A;
| ^~~~
elephants.cpp:11:8: error: 'pair' was not declared in this scope
elephants.cpp:11:8: error: 'pair' was not declared in this scope
elephants.cpp:11:8: error: 'pair' was not declared in this scope
elephants.cpp:11:8: error: 'pair' was not declared in this scope
elephants.cpp:11:8: error: 'pair' was not declared in this scope
elephants.cpp:11:8: error: 'pair' was not declared in this scope
elephants.cpp:11:8: error: 'pair' was not declared in this scope
elephants.cpp:11:8: error: 'pair' was not declared in this scope
elephants.cpp:11:1: error: 'vector' does not name a type
11 | vector<pair<int, int> > A;
| ^~~~~~
elephants.cpp:13:6: error: variable or field 'sort_map' declared void
13 | void sort_map(map<int, int>& M)
| ^~~~~~~~
elephants.cpp:13:15: error: 'map' was not declared in this scope
13 | void sort_map(map<int, int>& M)
| ^~~
elephants.cpp:13:19: error: expected primary-expression before 'int'
13 | void sort_map(map<int, int>& M)
| ^~~
elephants.cpp:13:24: error: expected primary-expression before 'int'
13 | void sort_map(map<int, int>& M)
| ^~~
elephants.cpp:24:1: error: 'map' does not name a type
24 | map<int,int> pos;
| ^~~
elephants.cpp: In function 'void init(int, int, int*)':
elephants.cpp:31:7: error: 'pos' was not declared in this scope
31 | pos[i]=X[i];
| ^~~
elephants.cpp: In function 'int update(int, int)':
elephants.cpp:39:4: error: 'pos' was not declared in this scope
39 | pos[i]=y;
| ^~~
elephants.cpp:40:4: error: 'sort_map' was not declared in this scope
40 | sort_map(pos);
| ^~~~~~~~
elephants.cpp:42:16: error: 'A' was not declared in this scope
42 | int start = A[0].second;
| ^