Language: Java

#include <stdio.h>

#define inf 1000000000

struct company_info{
	int rail[100][100];
	int p;
	int dst[51];
	int cost[10001];
};

int main(){
	int n, m, c, s, g;
	struct company_info company[20];
	int i, j, k, l;
	int x, y, d, ci;
	int r;
	int dp[100][100];

	while(1){
		scanf("%d %d %d %d %d", &n, &m, &c, &s, &g);

		s--; g--;

		for(i=0; i<c; i++){
			for(j=0; j<n; j++){
				for(k=0; k<n; k++){
					if(j==k){
						company[i].rail[j][k] = 0;
						dp[j][k] = 0;
					}else{
						company[i].rail[j][k] = inf;
						dp[j][k] = inf;
					}
				}
			}
		}

		for(i=0; i<m; i++){
			scanf("%d %d %d %d", &x, &y, &d, &ci);
			x--; y--; ci--;
			company[ci].rail[x][y] = d;
			company[ci].rail[y][x] = d;
		}

		for(i=0; i<c; i++){
			scanf("%d", &(company[i].p));
		}

		for(i=0; i<c; i++){
			for(j=1; j<company[i].p; j++){
				scanf("%d", &(company[i].dst[j]));
			}
			company[i].dst[j] = 10000;
			k = 1;
			company[i].cost[0] = 0;
			for(j=1; j<=company[i].p; j++){
				scanf("%d", &r);
				for(k; k<=company[i].dst[j]; k++){
					company[i].cost[k] = company[i].cost[k-1] + r;
				}
			}
		}

		for(l=0; l<c; l++){
			for(k=0; k<n; k++){
				for(i=0; i<n; i++){
					for(j=0; j<n; j++){
						if(company[l].rail[i][j]>company[l].rail[i][k] + company[l].rail[k][j]){
							company[l].rail[i][j] = company[l].rail[i][k] + company[l].rail[k][j];
						}
					}
				}
			}
			for(i=0; i<n; i++){
				for(j=0; j<n; j++){
					if(company[l].rail[i][j]!=inf){
						company[l].rail[i][j] = company[l].cost[company[l].rail[i][j]];
					}
					if(dp[i][j]>company[l].rail[i][j]){
						dp[i][j] = company[l].rail[i][j];
					}
				}
			}
		}

		for(k=0; k<n; k++){
			for(i=0; i<n; i++){
				for(j=0; j<n; j++){
					if(dp[i][j]>dp[i][k] + dp[k][j]){
						dp[i][j] = dp[i][k] + dp[k][j];
					}
				}
			}
		}

		printf("%d\n", dp[s][g]);
	}

}

Compiler output:
Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
         ^
Main.java:3: error: illegal character: '#'
#define inf 1000000000
^
Main.java:7: error: unnamed classes are a preview feature and are disabled by default.
	int p;
	^
  (use --enable-preview to enable unnamed classes)
Main.java:8: error: class, interface, enum, or record expected
	int dst[51];
	^
Main.java:9: error: class, interface, enum, or record expected
	int cost[10001];
	^
Main.java:10: error: class, interface, enum, or record expected
};
^
Main.java:14: error: not a statement
	struct company_info company[20];
	                           ^
Main.java:59: error: not a statement
				for(k; k<=company[i].dst[j]; k++){
				    ^
Main.java:14: error: ';' expected
	struct company_info company[20];
	                   ^
Main.java:18: error: ']' expected
	int dp[100][100];
	       ^
Main.java:21: error: illegal start of expression
		scanf("%d %d %d %d %d", &n, &m, &c, &s, &g);
		                        ^
Main.java:21: error: illegal start of expression
		scanf("%d %d %d %d %d", &n, &m, &c, &s, &g);
		                            ^
Main.java:21: error: illegal start of expression
		scanf("%d %d %d %d %d", &n, &m, &c, &s, &g);
		                                ^
Main.java:21: error: illegal start of expression
		scanf("%d %d %d %d %d", &n, &m, &c, &s, &g);
		                                    ^
Main.java:21: error: illegal start of expression
		scanf("%d %d %d %d %d", &n, &m, &c, &s, &g);
		                                        ^
Main.java:40: error: illegal start of expression
			scanf("%d %d %d %d", &x, &y, &d, &ci);
			                     ^
Main.java:40: error: illegal start of expression
			scanf("%d %d %d %d", &x, &y, &d, &ci);
			                         ^
Main.java:40: error: illegal start of expression
			scanf("%d %d %d %d", &x, &y, &d, &ci);
			                             ^
Main.java:40: error: illegal start of expression
			scanf("%d %d %d %d", &x, &y, &d, &ci);
			                                 ^
Main.java:47: error: illegal start of expression
			scanf("%d", &(company[i].p));
			            ^
Main.java:52: error: illegal start of expression
				scanf("%d", &(company[i].dst[j]));
				            ^
Main.java:58: error: illegal start of expression
				scanf("%d", &r);
				            ^
23 errors