foo.cc: In function ‘void init()’:
foo.cc:21:1: error: ‘cin’ was not declared in this scope
21 | cin>>n>>m;
| ^~~
foo.cc:5:1: note: ‘std::cin’ is defined in header ‘<iostream>’; this is probably fixable by adding ‘#include <iostream>’
4 | #include <queue>
+++ |+#include <iostream>
5 | using namespace std;
foo.cc: In function ‘void SPFA()’:
foo.cc:61:1: error: ‘cout’ was not declared in this scope
61 | cout<<"The patient will be dead."<<endl;
| ^~~~
foo.cc:61:1: note: ‘std::cout’ is defined in header ‘<iostream>’; this is probably fixable by adding ‘#include <iostream>’
foo.cc:61:36: error: ‘endl’ was not declared in this scope
61 | cout<<"The patient will be dead."<<endl;
| ^~~~
foo.cc:5:1: note: ‘std::endl’ is defined in header ‘<ostream>’; this is probably fixable by adding ‘#include <ostream>’
4 | #include <queue>
+++ |+#include <ostream>
5 | using namespace std;
foo.cc:63:1: error: ‘cout’ was not declared in this scope
63 | cout<<d[0]<<endl;
| ^~~~
foo.cc:63:1: note: ‘std::cout’ is defined in header ‘<iostream>’; this is probably fixable by adding ‘#include <iostream>’
foo.cc:63:13: error: ‘endl’ was not declared in this scope
63 | cout<<d[0]<<endl;
| ^~~~
foo.cc:63:13: note: ‘std::endl’ is defined in header ‘<ostream>’; this is probably fixable by adding ‘#include <ostream>’