0_0_16207103_32268.cpp:21:1: error: 'map' does not name a type
map<int,int> mp;
^
0_0_16207103_32268.cpp: In function 'int getans(int)':
0_0_16207103_32268.cpp:39:1: error: 'map' was not declared in this scope
map<int,int>::iterator it = mp.find(n);
^
0_0_16207103_32268.cpp:39:5: error: expected primary-expression before 'int'
map<int,int>::iterator it = mp.find(n);
^
0_0_16207103_32268.cpp:40:5: error: 'it' was not declared in this scope
if (it != mp.end()) return it->second;
^
0_0_16207103_32268.cpp:40:11: error: 'mp' was not declared in this scope
if (it != mp.end()) return it->second;
^
0_0_16207103_32268.cpp:47:1: error: 'mp' was not declared in this scope
mp.insert(pair<int,int>(n,r));
^
|