prog.cpp:4:13: error: variable or field ‘unlock’ declared void
void unlock(map<long long int,int>m, int n, long long int k){
^~~
prog.cpp:4:13: error: ‘map’ was not declared in this scope
prog.cpp:4:13: note: suggested alternative:
In file included from /usr/include/c++/8/map:61,
from prog.cpp:2:
/usr/include/c++/8/bits/stl_map.h:100:11: note: ‘std::map’
class map
^~~
prog.cpp:4:17: error: expected primary-expression before ‘long’
void unlock(map<long long int,int>m, int n, long long int k){
^~~~
prog.cpp:4:31: error: expected primary-expression before ‘int’
void unlock(map<long long int,int>m, int n, long long int k){
^~~
prog.cpp:4:38: error: expected primary-expression before ‘int’
void unlock(map<long long int,int>m, int n, long long int k){
^~~
prog.cpp:4:45: error: expected primary-expression before ‘long’
void unlock(map<long long int,int>m, int n, long long int k){
^~~~
prog.cpp: In function ‘int main()’:
prog.cpp:17:33: error: expected initializer before ‘<’ token
long long int k,arr[100003],map<long long int,int>m;
^
prog.cpp:18:2: error: ‘cin’ was not declared in this scope
cin>>n>>k;
^~~
prog.cpp:18:2: note: suggested alternative:
In file included from prog.cpp:1:
/usr/include/c++/8/iostream:60:18: note: ‘std::cin’
extern istream cin; /// Linked to standard input
^~~
prog.cpp:21:3: error: ‘m’ was not declared in this scope
m.insert(make_pair(arr[i],i));
^
prog.cpp:21:12: error: ‘make_pair’ was not declared in this scope
m.insert(make_pair(arr[i],i));
^~~~~~~~~
prog.cpp:21:12: note: suggested alternative:
In file included from /usr/include/c++/8/bits/stl_algobase.h:64,
from /usr/include/c++/8/bits/char_traits.h:39,
from /usr/include/c++/8/ios:40,
from /usr/include/c++/8/ostream:38,
from /usr/include/c++/8/iostream:39,
from prog.cpp:1:
/usr/include/c++/8/bits/stl_pair.h:524:5: note: ‘std::make_pair’
make_pair(_T1&& __x, _T2&& __y)
^~~~~~~~~
prog.cpp:23:9: error: ‘m’ was not declared in this scope
unlock(m,n,k);
^
prog.cpp:23:2: error: ‘unlock’ was not declared in this scope
unlock(m,n,k);
^~~~~~
prog.cpp:23:2: note: suggested alternative: ‘unlockpt’
unlock(m,n,k);
^~~~~~
unlockpt
prog.cpp:24:15: error: unable to deduce ‘auto&&’ from ‘m’
for(auto it: m){
^
prog.cpp:25:9: error: ‘cout’ was not declared in this scope
cout<<it.first<<" ";
^~~~
prog.cpp:25:9: note: suggested alternative:
In file included from prog.cpp:1:
/usr/include/c++/8/iostream:61:18: note: ‘std::cout’
extern ostream cout; /// Linked to standard output
^~~~