foo.cpp:3:7: error: expected nested-name-specifier before 'nnamespace'
using nnamespace std;
^
foo.cpp:4:1: error: 'priority_queue' does not name a type
priority_queue<int,vector<int>,greater<int>> q;
^
foo.cpp: In function 'int main()':
foo.cpp:8:9: error: 'cin' was not declared in this scope
cin>>n;
^
foo.cpp:8:9: note: suggested alternative:
In file included from foo.cpp:1:0:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/iostream:60:18: note: 'std::cin'
extern istream cin; /// Linked to standard input
^
foo.cpp:11:17: error: 'q' was not declared in this scope
q.push(t);
^
foo.cpp:15:23: error: 'q' was not declared in this scope
int a=q.pop();
^
foo.cpp:22:9: error: 'cout' was not declared in this scope
cout<<ans;
^
foo.cpp:22:9: note: suggested alternative:
In file included from foo.cpp:1:0:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/iostream:61:18: note: 'std::cout'
extern ostream cout; /// Linked to standard output
^