Language: C++

#include <iostream>
#include <queue>
#include <vector>
#define INF 1000000001
using namespace std;
struct E{
????int rel,cost;
};
vector <E> grh[100000];
int v,e,r;

void dijkstra(){
????
	priority_queue < pair <int,int> > Q;
	int sum = 0;
	int d[100000];
	for(int i=0;i<v;i++) d[i] = INF;
	d[r] = 0;
????????Q.push(make_pair(0,r));
??????
????int s,f;
????while(!Q.empty()) {
????????f = Q.top().first;
????????s = Q.top().second;
????????Q.pop();
??????????
??????????
????????for(int i=0;i<grh[s].size();i++) {
????????????E e = grh[s][i];
????????????if(d[e.rel] > e.cost - f) {
????????d[e.rel] = e.cost - f;
????????Q.push(make_pair(-d[e.rel],e.rel));
????????????}
????????}
????}
??
????for(int i=0;i<v;i++) {
????????if(d[i] == INF ) cout << "INF"<<endl;
????????else?? cout << d[i] << endl;
????}
}
??
int main() {
??
????cin >> v >> e >> r; 
????int a,b,c;
????for(int i=0;i<e;i++) {
????????cin >> a >> b>> c;
????????grh[a].push_back((E){b,c});
????}
??????
????dijkstra();
??
????return 0;
??
}?????????? 

Compiler output:
a.cc:7:1: error: expected unqualified-id before '?' token
    7 | ????int rel,cost;
      | ^
a.cc: In function 'void dijkstra()':
a.cc:13:1: error: expected primary-expression before '?' token
   13 | ????
      | ^
a.cc:13:2: error: expected primary-expression before '?' token
   13 | ????
      |  ^
a.cc:13:3: error: expected primary-expression before '?' token
   13 | ????
      |   ^
a.cc:13:4: error: expected primary-expression before '?' token
   13 | ????
      |    ^
a.cc:14:43: error: expected primary-expression before 'Q'
   14 |         priority_queue < pair <int,int> > Q;
      |                                           ^
a.cc:14:42: error: expected ':' before 'Q'
   14 |         priority_queue < pair <int,int> > Q;
      |                                          ^~
      |                                          :
a.cc:14:43: error: 'Q' was not declared in this scope
   14 |         priority_queue < pair <int,int> > Q;
      |                                           ^
a.cc:14:44: error: expected ':' before ';' token
   14 |         priority_queue < pair <int,int> > Q;
      |                                            ^
      |                                            :
a.cc:14:44: error: expected primary-expression before ';' token
a.cc:14:44: error: expected ':' before ';' token
   14 |         priority_queue < pair <int,int> > Q;
      |                                            ^
      |                                            :
a.cc:14:44: error: expected primary-expression before ';' token
a.cc:14:44: error: expected ':' before ';' token
   14 |         priority_queue < pair <int,int> > Q;
      |                                            ^
      |                                            :
a.cc:14:44: error: expected primary-expression before ';' token
a.cc:19:1: error: expected primary-expression before '?' token
   19 | ????????Q.push(make_pair(0,r));
      | ^
a.cc:19:2: error: expected primary-expression before '?' token
   19 | ????????Q.push(make_pair(0,r));
      |  ^
a.cc:19:3: error: expected primary-expression before '?' token
   19 | ????????Q.push(make_pair(0,r));
      |   ^
a.cc:19:4: error: expected primary-expression before '?' token
   19 | ????????Q.push(make_pair(0,r));
      |    ^
a.cc:19:5: error: expected primary-expression before '?' token
   19 | ????????Q.push(make_pair(0,r));
      |     ^
a.cc:19:6: error: expected primary-expression before '?' token
   19 | ????????Q.push(make_pair(0,r));
      |      ^
a.cc:19:7: error: expected primary-expression before '?' token
   19 | ????????Q.push(make_pair(0,r));
      |       ^
a.cc:19:8: error: expected primary-expression before '?' token
   19 | ????????Q.push(make_pair(0,r));
      |        ^
a.cc:19:31: error: expected ':' before ';' token
   19 | ????????Q.push(make_pair(0,r));
      |                               ^
      |                               :
a.cc:19:31: error: expected primary-expression before ';' token
a.cc:19:31: error: expected ':' before ';' token
   19 | ????????Q.push(make_pair(0,r));
      |                               ^
      |                               :
a.cc:19:31: error: expected primary-expression before ';' token
a.cc:19:31: error: expected ':' before ';' token
   19 | ????????Q.push(make_pair(0,r));
      |                               ^
      |                               :
a.cc:19:31: error: expected primary-expression before ';' token
a.cc:19:31: error: expected ':' before ';' token
   19 | ????????Q.push(make_pair(0,r));
      |                               ^
      |                               :
a.cc:19:31: error: expected primary-expression before ';' token
a.cc:19:31: error: expected ':' before ';' token
   19 | ????????Q.push(make_pair(0,r));
      |                               ^
      |                               :
a.cc:19:31: error: expected primary-expression before ';' token
a.cc:19:31: error: expected ':' before ';' token
   19 | ????????Q.push(make_pair(0,r));
      |                               ^
      |                               :
a.cc:19:31: error: expected primary-expression before ';' token
a.cc:19:31: error: expected ':' before ';' token
   19 | ????????Q.push(make_pair(0,r));
      |                               ^
      |                               :
a.cc:19:31: error: expected primary-expression before ';' token
a.cc:19:31: error: expected ':' before ';' token
   19 | ????????Q.push(make_pair(0,r));
      |                               ^
      |                               :
a.cc:19:31: error: expected primary-expression before ';' token
a.cc:20:1: error: expected primary-expression before '?' token
   20 | ??????
      | ^
a.cc:20:2: error: expected primary-expression before '?' token
   20 | ??????
      |  ^
a.cc:20:3: error: expected primary-expression before '?' token
   20 | ??????
      |   ^
a.cc:20:4: error: expected primary-expression before '?' token
   20 | ??????
      |    ^
a.cc:20:5: error: expected primary-expression before '?' token
   20 | ??????
      |     ^
a.cc:20:6: error: expected primary-expression before '?' token
   20 | ??????
      |      ^
a.cc:21:1: error: expected primary-expression before '?' token
   21 | ????int s,f;
      | ^
a.cc:21:2: error: expected primary-expression before '?' token
   21 | ????int s,f;
      |  ^
a.cc:21:3: error: expected primary-expression before '?' token
   21 | ????int s,f;
      |   ^
a.cc:21:4: error: expected primary-expression before '?' token
   21 | ????int s,f;
      |    ^
a.cc:21:5: error: expected primary-expression before 'int'
   21 | ????int s,f;
      |     ^~~
a.cc:21:5: error: expected ':' before 'int'
   21 | ????int s,f;
      |     ^~~
      |     :
a.cc:21:5: error: expected primary-expression before 'int'
   21 | ????int s,f;
      |     ^~~
a.cc:21:5: error: expected ':' before 'int'
   21 | ????int s,f;
      |     ^~~
      |     :
a.cc:21:5: error: expected primary-expression before 'int'
   21 | ????int s,f;
      |     ^~~
a.cc:21:5: error: expected ':' before 'int'
   21 | ????int s,f;
      |     ^~~
      |     :
a.cc:21:5: error: expected primary-expression before 'int'
   21 | ????int s,f;
      |     ^~~
a.cc:21:5: error: expected ':' before 'int'
   21 | ????int s,f;
      |     ^~~
      |     :
a.cc:21:5: error: expected primary-expression before 'int'
   21 | ????int s,f;
      |     ^~~
a.cc:21:5: error: expected ':' before 'int'
   21 | ????int s,f;
      |     ^~~
      |     :
a.cc:21:5: error: expected primary-expression before 'int'
   21 | ????int s,f;
      |     ^~~
a.cc:21:5: error: expected ':' before 'int'
   21 | ????int s,f;
      |     ^~~
      |     :
a.cc:21:5: error: expected primary-expression before 'int'
   21 | ????int s,f;
      |     ^~~
a.cc:21:5: error: expected ':' before 'int'
   21 | ????int s,f;
      |     ^~~
      |     :
a.cc:21:5: error: expected primary-expression before 'int'
   21 | ????int s,f;
      |     ^~~
a.cc:21:5: error: expected ':' before 'int'
   21 | ????int s,f;
      |     ^~~
      |     :
a.cc:21:5: error: expected primary-expression before 'int'
   21 | ????int s,f;
      |     ^~~
a.cc:21:5: error: expected ':' before 'int'
   21 | ????int s,f;
      |     ^~~
      |     :
a.cc:21:5: error: expected primary-expression before 'int'
   21 | ????int s,f;
      |     ^~~
a.cc:21:5: error: expected ':' before 'int'
   21 | ????int s,f;
      |     ^~~
      |     :
a.cc:21:5: error: expected primary-expression before 'int'
   21 | ????int s,f;
      |     ^~~
a.cc:22:1: error: expected primary-expression before '?' token
   22 | ????while(!Q.empty()) {
      | ^
a.cc:22:2: error: expected primary-expression before '?' token
   22 | ????while(!Q.empty()) {
      |  ^
a.cc:22:3: error: expected primary-expression before '?' token
   22 | ????while(!Q.empty()) {
      |   ^
a.cc:22:4: error: expected primary-expression before '?' token
   22 | ????while(!Q.empty()) {
      |    ^
a.cc:22:5: error: expected primary-expression before 'while'
   22 | ????while(!Q.empty()) {
      |     ^~~~~
a.cc:22:5: error: expected ':' before 'while'
   22 | ????while(!Q.empty()) {
      |     ^~~~~
      |     :
a.cc:22:5: error: expected primary-expression before 'while'
   22 | ????while(!Q.empty()) {
      |     ^~~~~
a.cc:22:5: error: expected ':' before 'while'
   22 | ????while(!Q.empty()) {
      |     ^~~~~
      |     :
a.cc:22:5: error: expected primary-expression before 'while'
   22 | ????while(!Q.empty()) {
      |     ^~~~~
a.cc:22:5: error: expected ':' before 'while'
   22 | ????while(!Q.empty()) {
      |     ^~~~~
      |     :
a.cc:22:5: error: expected primary-expression before 'while'
   22 | ????while(!Q.empty()) {
      |     ^~~~~
a.cc:22:5: error: expected ':' before 'while'
   22 | ????while(!Q.empty()) {
      |     ^~~~~
      |     :
a.cc:22:5: error: expected primary-expression before 'while'
   22 | ????while(!Q.empty()) {
      |     ^~~~~
a.cc:36:1: error: expected primary-expression before '?' token
   36 | ??
      | ^
a.cc:36:2: error: expected primary-expression before '?' token
   36 | ??
      |  ^
a.cc:37:1: error: expected primary-expression before '?' token
   37 | ????for(int i=0;i<v;i++) {
      | ^
a.cc:37:2: error: expected primary-expression before '?' token
   37 | ????for(int i=0;i<v;i++) {
      |  ^
a.cc:37:3: error: expected primary-expression before '?' token
   37 | ????for(int i=0;i<v;i++) {
      |   ^
a.cc:37:4: error: expected primary-expression before '?' token
   37 | ????for(int i=0;i<v;i++) {
      |    ^
a.cc:37:5: error: expected primary-expression before 'for'
   37 | ????for(int i=0;i<v;i++) {
      |     ^~~
a.cc:37:5: error: expected ':' before 'for'
   37 | ????for(int i=0;i<v;i++) {
      |     ^~~
      |     :
a.cc:37:5: error: expected primary-expression before 'for'
   37 | ????for(int i=0;i<v;i++) {
      |     ^~~
a.cc:37:5: error: expected ':' before 'for'
   37 | ????for(int i=0;i<v;i++) {
      |     ^~~
      |     :
a.cc:37:5: error: expected primary-expression before 'for'
   37 | ????for(int i=0;i<v;i++) {
      |     ^~~
a.cc:37:5: error: expected ':' before 'for'
   37 | ????for(int i=0;i<v;i++) {
      |     ^~~
      |     :
a.cc:37:5: