prog.cpp:13:28: error: 'vector' has not been declared
int longestConsecutive(vector<int>& a) {
^
prog.cpp:13:34: error: expected ',' or '...' before '<' token
int longestConsecutive(vector<int>& a) {
^
prog.cpp: In member function 'int Solution::longestConsecutive(int)':
prog.cpp:15:9: error: 'priority_queue' was not declared in this scope
priority_queue <int> pq;
^
prog.cpp:15:25: error: expected primary-expression before 'int'
priority_queue <int> pq;
^
prog.cpp:16:17: error: 'a' was not declared in this scope
int n = a.size();
^
prog.cpp:18:13: error: 'pq' was not declared in this scope
pq.push(a[i]);
^
prog.cpp:21:16: error: 'pq' was not declared in this scope
while(!pq.empty()){
^
prog.cpp:33:37: error: 'max' was not declared in this scope
maxLen = max(maxLen, len);
^