</pre><pre name="code" class="cpp">#include <stdio.h>
#include <iostream>
#include <memory.h>
#include <omp.h>
using namespace std;
#define NODENUM 264346
#define MAXNODENUM 1000000
#define MAXEDGENUM 4000000
#define THREADNUM 64
#define MAXINPUTLINE 512
#define s 0 // source
// Graph info
int f[MAXNODENUM]; // Distance to source
int route[MAXNODENUM]; //route store the route
int edge_l[MAXEDGENUM], edge_r[MAXEDGENUM], edge_dis[MAXEDGENUM]; // An edge's left and right endtime, and its distance
int ad_next[MAXEDGENUM], ad_head[MAXNODENUM]; // Use adjacency list to store graph. For each point, use a list to store its adjacent edges table.
//ad_head is the list's first element(edge id), ad_next is each element(edge id)'s next pointer.
int edge_cnt = 0; // Number of edges
// Computation share memory
int msg_head[2][THREADNUM][THREADNUM], msg_next[2][MAXEDGENUM]; // Use a list to