carnival.cpp: In function 'int ask(int, int)':
carnival.cpp:9:13: error: could not convert 'mp.std::map<std::pair<int, int>, int>::find(std::pair<int, int>(x, y))' from 'std::map<std::pair<int, int>, int>::iterator' {aka 'std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, int>, std::_Select1st<std::pair<const std::pair<int, int>, int> >, std::less<std::pair<int, int> >, std::allocator<std::pair<const std::pair<int, int>, int> > >::iterator'} to 'bool'
9 | if(mp.find({x, y}))
| ~~~~~~~^~~~~~~~
| |
| std::map<std::pair<int, int>, int>::iterator {aka std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, int>, std::_Select1st<std::pair<const std::pair<int, int>, int> >, std::less<std::pair<int, int> >, std::allocator<std::pair<const std::pair<int, int>, int> > >::iterator}
carnival.cpp: In function 'int main()':
carnival.cpp:36:3: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
36 | for(int i=0;i<n;i++) cout << a[i] << " "; cout << endl;
| ^~~
carnival.cpp:36:45: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
36 | for(int i=0;i<n;i++) cout << a[i] << " "; cout << endl;
| ^~~~