/in/foo.cc:3:1: error: 'map' does not name a type
map<char,int>mp;
^~~
/in/foo.cc: In function 'bool cmp(int, int)':
/in/foo.cc:7:12: error: 'mp' was not declared in this scope
if(mp[a[x][i]]<mp[a[y][i]]) return 1;
^~
/in/foo.cc:8:12: error: 'mp' was not declared in this scope
if(mp[a[x][i]]>mp[a[y][i]]) return 0;
^~
/in/foo.cc: In function 'int main()':
/in/foo.cc:17:9: error: 'cin' was not declared in this scope
cin>>t;
^~~
/in/foo.cc:18:9: error: 'mp' was not declared in this scope
mp[t]=i;
^~
/in/foo.cc:20:18: error: 'scanf' was not declared in this scope
scanf("%d",&n);
^
/in/foo.cc:26:27: error: 'sort' was not declared in this scope
sort(num+1,num+n+1,cmp);
^
/in/foo.cc:27:59: error: 'printf' was not declared in this scope
if(k==1) for(int i=1;i<=n;i++) printf("%s\n",a[num[i]]);
^
/in/foo.cc:28:55: error: 'printf' was not declared in this scope
else for(int i=n;i>=1;i--) printf("%s\n",a[num[i]]);
^