crocodile.cpp: In function 'int travel_plan(int, int, int (*)[2], int*, int, int*)':
crocodile.cpp:11:52: error: no matching function for call to 'std::priority_queue<std::pair<int, int>, std::vector<int>, std::greater<int> >::push(std::pair<int, int>)'
for(int i=0; i<K; i++) q.push(make_pair(0,P[i]));
^
In file included from /usr/include/c++/5/queue:64:0,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:85,
from crocodile.cpp:2:
/usr/include/c++/5/bits/stl_queue.h:499:7: note: candidate: void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = std::pair<int, int>; _Sequence = std::vector<int>; _Compare = std::greater<int>; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = int]
push(const value_type& __x)
^
/usr/include/c++/5/bits/stl_queue.h:499:7: note: no known conversion for argument 1 from 'std::pair<int, int>' to 'const value_type& {aka const int&}'
crocodile.cpp:13:22: error: conversion from 'const int' to non-scalar type 'std::pair<int, int>' requested
ii e = q.top();
^
crocodile.cpp:15:15: error: invalid use of non-static member function
q.pop;
^
crocodile.cpp:17:18: error: lvalue required as increment operand
visit++;
^
crocodile.cpp:20:15: error: lvalue required as increment operand
visit++;
^
crocodile.cpp:25:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0; i<adj[v].size(); i++) {
^
crocodile.cpp:26:29: error: 'class std::vector<std::pair<int, int> >' has no member named 'first'
if(visit[adj[v].first]<2) q.push(make_pair(e.first+L[adj[v].second], adj[v].first ));
^
crocodile.cpp:26:73: error: 'class std::vector<std::pair<int, int> >' has no member named 'second'
if(visit[adj[v].first]<2) q.push(make_pair(e.first+L[adj[v].second], adj[v].first ));
^
crocodile.cpp:26:89: error: 'class std::vector<std::pair<int, int> >' has no member named 'first'
if(visit[adj[v].first]<2) q.push(make_pair(e.first+L[adj[v].second], adj[v].first ));
^