Language: C++

#include<iostream>
    
using namespace std;
static const int MAX = 100;
static const int INFTY = (1<<21);
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;

int n, M[MAX][MAX];

void dijkstra() {
   int min;
   int d[MAX], color[MAX];

   for ( int i = 0; i < n; i++ ) {
      d[i] = INFTY; 
      color[i] = WHITE;
   }

   d[0] = 0;
   color[0] = GRAY;
   
   while ( 1 ) {
      min = INFTY; 
      int a = -1;
      for ( int i = 0; i < n; i++ ) {
         if ( min > d[i] && color[i] != BLACK ) {
             a = i;
             min = d[i];
         }
      }

      if ( a == -1 ) break;
      color[a] = BLACK;
      
      for ( int v = 0; v < n; v++ ) {
         if ( color[v] != BLACK && M[a][v] != INFTY ) {
            if ( d[v] > d[a] + M[a][v] ) {
               d[v] = d[a] + M[a][v];
               color[v] = GRAY;
            }
         }
      }
   }

   for ( int i = 0; i< n; i++ ) {
      cout << i << " " << ( d[i] == INFTY ? -1 : d[i] ) << endl;
   }
}

int main() {
   cin >> n;
   for ( int i = 0; i < n; i++ ) {
      for ( int j = 0; j < n; j++ ) {
         M[i][j] = INFTY;
      }
   }

   int k, c, u, v;
  
   for ( int i = 0; i < n; i++ ) {
      cin >> u >> k;  

?????????for ( int j = 0; j < n; j++ ) {
      cin >> v >> c;
      M[u][v] = c;
      }
   }

   dijkstra();

   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:65:1: error: expected primary-expression before '?' token
   65 | ?????????for ( int j = 0; j < n; j++ ) {
      | ^
a.cc:65:2: error: expected primary-expression before '?' token
   65 | ?????????for ( int j = 0; j < n; j++ ) {
      |  ^
a.cc:65:3: error: expected primary-expression before '?' token
   65 | ?????????for ( int j = 0; j < n; j++ ) {
      |   ^
a.cc:65:4: error: expected primary-expression before '?' token
   65 | ?????????for ( int j = 0; j < n; j++ ) {
      |    ^
a.cc:65:5: error: expected primary-expression before '?' token
   65 | ?????????for ( int j = 0; j < n; j++ ) {
      |     ^
a.cc:65:6: error: expected primary-expression before '?' token
   65 | ?????????for ( int j = 0; j < n; j++ ) {
      |      ^
a.cc:65:7: error: expected primary-expression before '?' token
   65 | ?????????for ( int j = 0; j < n; j++ ) {
      |       ^
a.cc:65:8: error: expected primary-expression before '?' token
   65 | ?????????for ( int j = 0; j < n; j++ ) {
      |        ^
a.cc:65:9: error: expected primary-expression before '?' token
   65 | ?????????for ( int j = 0; j < n; j++ ) {
      |         ^
a.cc:65:10: error: expected primary-expression before 'for'
   65 | ?????????for ( int j = 0; j < n; j++ ) {
      |          ^~~
a.cc:65:10: error: expected ':' before 'for'
   65 | ?????????for ( int j = 0; j < n; j++ ) {
      |          ^~~
      |          :
a.cc:65:10: error: expected primary-expression before 'for'
   65 | ?????????for ( int j = 0; j < n; j++ ) {
      |          ^~~
a.cc:65:10: error: expected ':' before 'for'
   65 | ?????????for ( int j = 0; j < n; j++ ) {
      |          ^~~
      |          :
a.cc:65:10: error: expected primary-expression before 'for'
   65 | ?????????for ( int j = 0; j < n; j++ ) {
      |          ^~~
a.cc:65:10: error: expected ':' before 'for'
   65 | ?????????for ( int j = 0; j < n; j++ ) {
      |          ^~~
      |          :
a.cc:65:10: error: expected primary-expression before 'for'
   65 | ?????????for ( int j = 0; j < n; j++ ) {
      |          ^~~
a.cc:65:10: error: expected ':' before 'for'
   65 | ?????????for ( int j = 0; j < n; j++ ) {
      |          ^~~
      |          :
a.cc:65:10: error: expected primary-expression before 'for'
   65 | ?????????for ( int j = 0; j < n; j++ ) {
      |          ^~~
a.cc:65:10: error: expected ':' before 'for'
   65 | ?????????for ( int j = 0; j < n; j++ ) {
      |          ^~~
      |          :
a.cc:65:10: error: expected primary-expression before 'for'
   65 | ?????????for ( int j = 0; j < n; j++ ) {
      |          ^~~
a.cc:65:10: error: expected ':' before 'for'
   65 | ?????????for ( int j = 0; j < n; j++ ) {
      |          ^~~
      |          :
a.cc:65:10: error: expected primary-expression before 'for'
   65 | ?????????for ( int j = 0; j < n; j++ ) {
      |          ^~~
a.cc:65:10: error: expected ':' before 'for'
   65 | ?????????for ( int j = 0; j < n; j++ ) {
      |          ^~~
      |          :
a.cc:65:10: error: expected primary-expression before 'for'
   65 | ?????????for ( int j = 0; j < n; j++ ) {
      |          ^~~
a.cc:65:10: error: expected ':' before 'for'
   65 | ?????????for ( int j = 0; j < n; j++ ) {
      |          ^~~
      |          :
a.cc:65:10: error: expected primary-expression before 'for'
   65 | ?????????for ( int j = 0; j < n; j++ ) {
      |          ^~~
a.cc:65:10: error: expected ':' before 'for'
   65 | ?????????for ( int j = 0; j < n; j++ ) {
      |          ^~~
      |          :
a.cc:65:10: error: expected primary-expression before 'for'
   65 | ?????????for ( int j = 0; j < n; j++ ) {
      |          ^~~
a.cc:65:27: error: 'j' was not declared in this scope
   65 | ?????????for ( int j = 0; j < n; j++ ) {
      |                           ^