Language: C

#include<stdio.h>
#include<math.h>
#include<stdlib.h>
#include 
#include<string.h>
#include
#include
#define ll long long
#define hengheng main ()

const int INF=0x3f3f3f3f;
const int MAX=1e6+5;
using namespace std;
struct node{
int to,len;
int next;
}edge[MAX];
int head[MAX],cnt=0;
void initedge(int n)
{
memset(head+1,-1,sizeof(head));
cnt=0;
}
void addedge(int u,int v,int w)
{
edge[cnt].to=v;
edge[cnt].len=w;
edge[cnt].next=head[u];
head[u]=cnt++;
}
struct paidui{
int id;
int len;
};
int n,m;
int dis[1000010],vis[1000010];
bool operator<(paidui a,paidui b)
{
return a.len<b.len;
}

void dijikstra(int S)
{
for(int i=1;i<=n;i++)
dis[i]=INF;
cnt=0;
dis[S]=0;

priority_queue<paidui> q;
q.push({S,0});
while(!q.empty() )
{
	 paidui k=q.top(); q.pop();
   if(k.len!=dis[k.id]) continue;
 
    for(int i=head[k.id];i!=-1;i=edge[i].next)
    {
        int t=edge[i].to;
        if(dis[t]>dis[k.id]+edge[i].len)
        {
            dis[t]=dis[k.id]+edge[i].len;
            q.push(paidui{t,dis[t]});
        }
    }
}

}

int lu1[1000100],lu2[1000100],len[1000100];
int hengheng
{
int t;
scanf("%d",&t);
while(t–)
{

	scanf("%d%d",&n,&m);
	initedge(n);
	for(int i=0;i<m;i++)
	{
		scanf("%d%d%d",&lu1[i],&lu2[i],&len[i]);
		addedge(lu1[i],lu2[i],len[i]);
	}
	dijikstra(1);
	long long sum=0;
	for(int i=1;i<=n;i++)  sum+=dis[i];// 第一个图 
	initedge(n); //初始化 
	for(int i=0;i<m;i++) addedge(lu2[i],lu1[i],len[i]);//第二个图 
	dijikstra(1);
	
	for(int i=1;i<=n;i++)  sum+=dis[i];
	printf("%lld\n",sum);
}

}


Compiler output:
main.c:4:10: error: #include expects "FILENAME" or <FILENAME>
    4 | #include
      |          ^
main.c:6:9: error: #include expects "FILENAME" or <FILENAME>
    6 | #include
      |         ^
main.c:7:9: error: #include expects "FILENAME" or <FILENAME>
    7 | #include
      |         ^
main.c:13:1: error: unknown type name 'using'
   13 | using namespace std;
      | ^~~~~
main.c:13:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
   13 | using namespace std;
      |                 ^~~
main.c:17:2: error: variably modified 'edge' at file scope
   17 | }edge[MAX];
      |  ^~~~
main.c:18:5: error: variably modified 'head' at file scope
   18 | int head[MAX],cnt=0;
      |     ^~~~
main.c:37:1: error: unknown type name 'bool'
   37 | bool operator<(paidui a,paidui b)
      | ^~~~
main.c:6:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    5 | #include<string.h>
  +++ |+#include <stdbool.h>
    6 | #include
main.c:37:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   37 | bool operator<(paidui a,paidui b)
      |              ^
main.c: In function 'dijikstra':
main.c:49:1: error: 'priority_queue' undeclared (first use in this function)
   49 | priority_queue<paidui> q;
      | ^~~~~~~~~~~~~~
main.c:49:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:49:16: error: 'paidui' undeclared (first use in this function)
   49 | priority_queue<paidui> q;
      |                ^~~~~~
main.c:49:24: error: 'q' undeclared (first use in this function)
   49 | priority_queue<paidui> q;
      |                        ^
main.c:50:8: error: expected expression before '{' token
   50 | q.push({S,0});
      |        ^
main.c:53:16: error: expected ';' before 'k'
   53 |          paidui k=q.top(); q.pop();
      |                ^~
      |                ;
main.c:54:7: error: 'k' undeclared (first use in this function)
   54 |    if(k.len!=dis[k.id]) continue;
      |       ^
main.c:62:26: error: expected ')' before '{' token
   62 |             q.push(paidui{t,dis[t]});
      |                   ~      ^
      |                          )
main.c: In function 'main':
main.c:74:8: error: stray '\342' in program
   74 | while(t<U+2013>)
      |        ^~~~~~~~