advisor.cpp: In function 'void ComputeAdvice(int*, int, int, int)':
advisor.cpp:12:17: error: 'P' was not declared in this scope
priority_queue<P>d;
^
advisor.cpp:12:18: error: template argument 1 is invalid
priority_queue<P>d;
^
advisor.cpp:12:18: error: template argument 2 is invalid
advisor.cpp:12:18: error: template argument 3 is invalid
advisor.cpp:13:24: error: request for member 'push' in 'd', which is of non-class type 'int'
for(int i=0;i<k;i++)d.push(P(p[i],i)),ex[i]=i;
^~~~
advisor.cpp:20:9: error: request for member 'top' in 'd', which is of non-class type 'int'
y=d.top().S;
^~~
advisor.cpp:21:7: error: request for member 'pop' in 'd', which is of non-class type 'int'
d.pop();
^~~
advisor.cpp:27:5: error: request for member 'push' in 'd', which is of non-class type 'int'
d.push(P(nex[i],c));
^~~~
advisor.cpp:29:24: error: 'WriteAidvise' was not declared in this scope
for(int i=0;i<k+n;i++)WriteAidvise(ans[i]);
^~~~~~~~~~~~
advisor.cpp:29:24: note: suggested alternative: 'WriteAdvice'
for(int i=0;i<k+n;i++)WriteAidvise(ans[i]);
^~~~~~~~~~~~
WriteAdvice
assistant.cpp: In function 'void Assist(unsigned char*, int, int, int)':
assistant.cpp:8:16: error: 'k' was not declared in this scope
for(int i=0;i<k;i++){
^
assistant.cpp:12:12: error: 'k' was not declared in this scope
for(int i=k;i<k+n;i++){
^
assistant.cpp:12:18: error: 'n' was not declared in this scope
for(int i=k;i<k+n;i++){
^