gondola.cpp: In function 'int valid(int, int*)':
gondola.cpp:5:2: error: 'map' was not declared in this scope
5 | map<int,int> mp;
| ^~~
gondola.cpp:5:6: error: expected primary-expression before 'int'
5 | map<int,int> mp;
| ^~~
gondola.cpp:9:7: error: 'mp' was not declared in this scope; did you mean 'p'?
9 | if (mp[inputSeq[i]]) return 0;
| ^~
| p
gondola.cpp:10:3: error: 'mp' was not declared in this scope; did you mean 'p'?
10 | mp[inputSeq[i]]++;
| ^~
| p
gondola.cpp:13:7: error: 'inputseQ' was not declared in this scope; did you mean 'inputSeq'?
13 | if (inputseQ[i]<=n){
| ^~~~~~~~
| inputSeq
gondola.cpp:20:7: error: 'inputseQ' was not declared in this scope; did you mean 'inputSeq'?
20 | if (inputseQ[i]>n) continue;
| ^~~~~~~~
| inputSeq
gondola.cpp:27:7: error: 'inputseQ' was not declared in this scope; did you mean 'inputSeq'?
27 | if (inputseQ[i]!=a) return 0;
| ^~~~~~~~
| inputSeq
gondola.cpp: In function 'int replacement(int, int*, int*)':
gondola.cpp:36:2: error: 'pair' was not declared in this scope
36 | pair<int,int> v[n];
| ^~~~
gondola.cpp:36:7: error: expected primary-expression before 'int'
36 | pair<int,int> v[n];
| ^~~
gondola.cpp:39:3: error: 'v' was not declared in this scope
39 | v[i]={gondolaSeq[i],i};
| ^
gondola.cpp:41:7: error: 'v' was not declared in this scope
41 | sort(v,v+n);
| ^
gondola.cpp:41:2: error: 'sort' was not declared in this scope; did you mean 'short'?
41 | sort(v,v+n);
| ^~~~
| short
gondola.cpp:45:45: warning: pointer to a function used in arithmetic [-Wpointer-arith]
45 | while (cnt<v[i].first-n) replacement[cnt++]=v[i].second;
| ^