criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.util.*;

public class Main {
  static final int MAX_S = 50*50+10;
  static long dp[][]; // [頂点][銀貨] 頂点で銀貨を持った状態にかかる最小時間
  static PriorityQueue<Data> q = new PriorityQueue<>(); //最適としてありうる状態を全て保持しておく優先度つきキュー、時間xが小さいほど先頭
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int m = sc.nextInt();
    int s = sc.nextInt();
    ArrayList<ArrayList<Edge>> g = new ArrayList<>(n); // g<頂点<辺>> 各頂点から出る辺
    dp = new long[n][MAX_S];
    for (int i = 0; i < m; i++) { // gの初期化
      int u = sc.nextInt();
      int v = sc.nextInt();
      int a = sc.nextInt();
      int b = sc.nextInt();
      u--; v--;
      g.get(u).add(new Edge(v, a, b));
      g.get(v).add(new Edge(u, a, b));
    }
    for (int i = 0; i < n; i++) { // dpの初期化
      for (int j = 0; j < MAX_S; j++) {
        dp[i][j] = Long.MAX_VALUE;
      }
    }
    s = Math.min(s, MAX_S);
    push(0, s, 0);
    ArrayList<Integer> c = new ArrayList<>(); //c<頂点> 各頂点で得られる銀貨
    ArrayList<Integer> d = new ArrayList<>(); //d<頂点> 各頂点で銀貨を得るのにかかる時間
    for (int i = 0; i < n; i++) {
      c.add(sc.nextInt());
      d.add(sc.nextInt());
    }

    while (!q.isEmpty()) { // ダイクストラ法を回す
      Data hoge = q.poll();
      int v = hoge.v;
      s = hoge.s;
      long x = hoge.x;
      if (dp[v][s] <= x) continue; // Data(v, s, x)より最適なものが既出ならスキップ
      // 以下お金を増やすパターンと辺を辿るパターンの遷移
      int ns = Math.min(c.get(v) ,MAX_S);
      push(v, ns, x+d.get(v));
      for (Edge e: g.get(v)) {
        push(e.to, s-e.a, x+e.b);
      }
    }
    for (int i = 1, i < n; i++) {
      long res = Long.MAX_VALUE;
      for (int j = 0; j < MAX_S; j++) {
        res = Math.min(res, dp[i][j]);
      }
      System.out.println(res);
    }
    sc.close();
  }

  static void push(int v, int s, long x) { // Data(v, s, x)が最適である時dpに追加するメソッド
    if (s < 0) return;
    if (dp[v][s] <= x) return;
    dp[v][s] = x;
    q.add(new Data(v, s, x));
  }

  static class Data implements Comparable<Data> {
    int v, s; // 頂点v,銀貨s
    long x; // 時間x
    Data(int v, int s, long x) {
      this.v = v;
      this.s = s;
      this.x = x;
    }

    @Override
    public int compareTo(Data o) {
      return Long.compare(x, o.x);
    }
  }

  static class Edge {
    int to, a, b;
    Edge(int to, int a, int b) {
      this.to = to;
      this.a = a;
      this.b = b;
    }
  }
}

Compiler output:
Main.java:50: error: ';' expected
    for (int i = 1, i < n; i++) {
                     ^
Main.java:50: error: > or ',' expected
    for (int i = 1, i < n; i++) {
                         ^
2 errors
Language: C++

//#include<bits/stdc++.h>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<vector>
#include<cctype>
#include<queue>
#include<algorithm>
#include<map>
#include<set>
#pragma GCC optimize(2)
using namespace std;
typedef long long LL;
typedef pair<int,int> pii;
typedef pair<double,double> pdd;
const int N=55;
const int M=2605;
const int inf=0x3f3f3f3f;
const int mod=300;
const double eps=1e-9;
const long double pi=acos(-1.0L);
#define ls (i<<1)
#define rs (i<<1|1)
#define fi first
#define se second
#define pb push_back
#define mk make_pair
#define mem(a,b) memset(a,b,sizeof(a))
LL read()
{
    LL x=0,t=1;
    char ch;
    while(!isdigit(ch=getchar())) if(ch=='-') t=-1;
    while(isdigit(ch)){ x=10*x+ch-'0'; ch=getchar(); }
    return x*t;
}
struct edge
{
    int t,c,v;
    egde(){}
    edge(int V,int T,int C){ v=V; t=T; c=C; }
};
struct node
{
    int id,co,disx;
    node(){}
    node(int T,int C,int D){ id=T; co=C; disx=D; }
    friend bool operator < (node x,node y)
    {
        return x.disx>y.disx;
    }
};
int vis[N][M],dis[N][M],n,m,s;
priority_queue<node,vector<node>,less<node> > q;
vector<edge> e[N];
void dijk()
{
    mem(dis,0x3f);
    dis[1][s]=0;
    q.push(node(1,s,0));
    while(!q.empty())
    {
        node u=q.top();
        q.pop();
        if(vis[u.id][u.co]) continue;
        vis[u.id][u.co]=1;
        for(auto x:e[u.id])
        {
            //puts("...");
            if(x.c+u.co>=0&&x.c+u.co<=2600&&dis[x.v][x.c+u.co]>dis[u.id][u.co]+x.t)
            {
                //printf("-- %d %d\n",x.v,x.c+u.co);
                dis[x.v][x.c+u.co]=dis[u.id][u.co]+x.t;
                q.push(node(x.v,x.c+u.co,dis[x.v][x.c+u.co]));
            }
        }
    }
}
int main()
{
    n=read(),m=read(),s=read();
    for(int i=1;i<=m;i++)
    {
        int u=read(),v=read(),c=read(),t=read();
        e[u].pb(edge(v,t,-c));
        e[v].pb(edge(u,t,-c));
    }
    for(int i=1;i<=n;i++)
    {
        int c=read(),t=read();
        e[i].pb(edge(i,t,c) );
    }
    dijk();
    for(int i=2;i<=n;i++)
    {
        int mi=inf;
        for(int j=0;j<=2500;j++)
            mi=min(dis[i][j],mi);
        printf("%d\n",mi);
    }
    return 0;
}



Compiler output:
a.cc:40:5: error: ISO C++ forbids declaration of 'egde' with no type [-fpermissive]
   40 |     egde(){}
      |     ^~~~
a.cc: In member function 'int edge::egde()':
a.cc:40:12: warning: no return statement in function returning non-void [-Wreturn-type]
   40 |     egde(){}
      |            ^
Language: C++

// Graph.h start--------------------------------------------
#pragma once

#include <bits/stdc++.h>
using namespace std;

template <typename Weight>
struct Vertex;
template <typename Weight>
struct Edge;

template <typename Weight>
struct Vertex
{
	int id;
	vector<int> ids_dst;
	vector<Edge<Weight>> edges;

	Vertex(const int id = 0) : id(id){};
	int &operator[](int n) { return ids_dst[n]; }
	const int &operator[](int n) const { return ids_dst[n]; }

	size_t size() const { return edges.size(); }
	void add_edge(const Edge<Weight> &);
};

template <typename Weight>
struct Edge
{
	int id_src, id_dst;
	Weight weight;

	Edge(const int id_src, const int id_dst) : id_src(id_src), id_dst(id_dst){};
	Edge(const int id_src, const int id_dst, const Weight weight) : id_src(id_src), id_dst(id_dst), weight(weight){};
};
template <typename Weight>
ostream &operator<<(ostream &os, const Edge<Weight> &e) { return os << "Edge(" << e.id_src << "->" << e.id_dst << "," << e.weight << ")"; }

template <typename Weight = long long>
struct Graph
{
	vector<Vertex<Weight>> vertices;
	vector<Edge<Weight>> edges;

	Graph(const int nvertices = 0);
	Vertex<Weight> &operator[](int n) { return vertices[n]; }
	const Vertex<Weight> &operator[](int n) const { return vertices[n]; }

	size_t size() const { return vertices.size(); }
	void add_edge(const Edge<Weight> &);
	void add_edge(const int id_src, const int id_dst) { add_edge({id_src, id_dst}); };
	void add_edge(const int id_src, const int id_dst, const Weight w) { add_edge({id_src, id_dst, w}); };
};
template <typename Weight>
ostream &operator<<(ostream &os, const Graph<Weight> &g)
{
	cout << "Graph(" << g.size() << ")"
			 << "[" << endl;
	;
	for (auto &e : g.edges)
		os << " " << e << "," << endl;
	cout << "]";
	return os;
}

//----------------------------------------------------------

template <typename Weight>
void Vertex<Weight>::add_edge(const Edge<Weight> &e)
{
	edges.push_back(e);
	ids_dst.push_back(e.id_dst);
}

template <typename Weight>
bool operator<(const Edge<Weight> &e1, const Edge<Weight> &e2)
{
	return e1.weight != e2.weight ? e1.weight > e2.weight : // !!INVERSE!!
						 e1.id_src != e2.id_src ? e1.id_src < e2.id_src : e1.id_dst < e2.id_dst;
}

template <typename Weight>
Graph<Weight>::Graph(const int nvertices)
{
	for (int id = 0; id < nvertices; id++)
		vertices.emplace_back(id);
}
template <typename Weight>
void Graph<Weight>::add_edge(const Edge<Weight> &e)
{
	edges.push_back(e);
	vertices[e.id_src].add_edge(e);
}

// Graph.h end----------------------------------------------

Compiler output:
a.cc:2:9: warning: #pragma once in main file
    2 | #pragma once
      |         ^~~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include<bits/stdc++.h>

using namespace std;
#define int long long 
#define N 666666
#define inf 9999999999999999
int dis[66][2666];
int n,m,s;
int C[N],D[N];
int cnt;
int head[N*10];
struct edge{
	int v,a,b,next;
}e[9*N];
addegde(int u,int v,int a,int b){
	e[++cnt].v=v;
	e[cnt].a=a;
	e[cnt].b=b;
	e[cnt].next=head[u];
	head[u]=cnt;
}
void init(){
	for(int i=0;i<=n;i++)
		for(int j=0;j<=2500;j++) 
			dis[i][j]=inf;
}
void dij(){
	queue<pair<int,int> > q;
	q.push(make_pair(1,s));
	dis[1][s]=0;
	while(!q.empty()){
		int u=q.front().first;
		int w=q.front().second;
		q.pop();
		for(int i=head[u];i;i=e[i].next){
			int v=e[i].v;
			int a=e[i].a;
			int b=e[i].b;
			if(w-a>=0&&dis[v][w-a]>dis[u][w]+b){
				dis[v][w-a]=dis[u][w]+b;
				q.push(make_pair(v,w-a));
				
			}
		}
		if(dis[u][w]+D[u]<dis[u][min(2500*1ll,w+C[u])]){
			dis[u][min(2500*1ll,w+C[u])]=dis[u][w]+D[u];
			q.push(make_pair(u,min(2500*1ll,w+C[u])));
		}
	}
}
signed main(){
	cin>>n>>m>>s;
	s=min(s,2500*1ll);
	init();
	for(int i=1;i<=m;i++){
		int a,b,c,d;
		cin>>a>>b>>c>>d;
		addegde(a,b,c,d);
		addegde(b,a,c,d);
	}
	for(int i=1;i<=n;i++) cin>>C[i]>>D[i];
	
	dij();
	//cout<<"==";
	for(int i=2;i<=n;i++){
		int res=inf;
		for(int j=0;j<2500;j++) res=min(res,dis[i][j]);
		cout<<res<<'\n';
	}
	return 0;
}

Compiler output:
a.cc:15:1: error: ISO C++ forbids declaration of 'addegde' with no type [-fpermissive]
   15 | addegde(int u,int v,int a,int b){
      | ^~~~~~~
a.cc: In function 'int addegde(long long int, long long int, long long int, long long int)':
a.cc:21:1: warning: no return statement in function returning non-void [-Wreturn-type]
   21 | }
      | ^
Language: C++

#include<bits/stdc++.h>

using namespace std;
#define int long long 
#define N 666666
#define inf 999999999999999999
int dis[66][2666];
int n,m,s;
int C[N],D[N];
int cnt;
int head[N];
struct edge{
	int v,a,b,next;
}e[9*N];
addegde(int u,int v,int a,int b){
	e[++cnt].v=v;
	e[cnt].a=a;
	e[cnt].b=b;
	e[cnt].next=head[u];
	head[u]=cnt;
}
void init(){
	for(int i=0;i<=n;i++)
		for(int j=0;j<=2500;j++) 
			dis[i][j]=inf;
}
void dij(){
	queue<pair<int,int> > q;
	q.push(make_pair(1,s));
	dis[1][s]=0;
	while(!q.empty()){
		int u=q.front().first;
		int w=q.front().second;
		q.pop();
		for(int i=head[u];i;i=e[i].next){
			int v=e[i].v;
			int a=e[i].a;
			int b=e[i].b;
			if(w-a>=0&&dis[v][w-a]>dis[u][w]+b){
				dis[v][w-a]=dis[u][w]+b;
				q.push(make_pair(v,w-a));
				
			}
		}
		if(dis[u][w]+D[u]<dis[u][min(2500*1ll,w+C[u])]){
			dis[u][min(2500*1ll,w+C[u])]=dis[u][w]+D[u];
			q.push(make_pair(u,min(2500*1ll,w+C[u])));
		}
	}
}
signed main(){
	cin>>n>>m>>s;
	s=min(s,2500*1ll);
	init();
	for(int i=1;i<=m;i++){
		int a,b,c,d;
		cin>>a>>b>>c>>d;
		addegde(a,b,c,d);
		addegde(b,a,c,d);
	}
	for(int i=1;i<=n;i++) cin>>C[i]>>D[i];
	
	dij();
	//cout<<"==";
	for(int i=2;i<=n;i++){
		int res=inf;
		for(int j=0;j<2500;j++) res=min(res,dis[i][j]);
		cout<<res<<'\n';
	}
	return 0;
}

Compiler output:
a.cc:15:1: error: ISO C++ forbids declaration of 'addegde' with no type [-fpermissive]
   15 | addegde(int u,int v,int a,int b){
      | ^~~~~~~
a.cc: In function 'int addegde(long long int, long long int, long long int, long long int)':
a.cc:21:1: warning: no return statement in function returning non-void [-Wreturn-type]
   21 | }
      | ^
Language: C++

#include<bits/stdc++.h>

using namespace std;
#define int long long 
#define N 666666
#define inf 9999999999999999
int dis[66][2666];
int n,m,s;
int C[N],D[N];
int cnt;
int head[N];
struct edge{
	int v,a,b,next;
}e[N];
addegde(int u,int v,int a,int b){
	e[++cnt].v=v;
	e[cnt].a=a;
	e[cnt].b=b;
	e[cnt].next=head[u];
	head[u]=cnt;
}
void init(){
	for(int i=0;i<=n;i++)
		for(int j=0;j<=2500;j++) 
			dis[i][j]=inf;
}
void dij(){
	queue<pair<int,int> > q;
	q.push(make_pair(1,s));
	dis[1][s]=0;
	while(!q.empty()){
		int u=q.front().first;
		int w=q.front().second;
		q.pop();
		for(int i=head[u];i;i=e[i].next){
			int v=e[i].v;
			int a=e[i].a;
			int b=e[i].b;
			if(w-a>=0&&dis[v][w-a]>dis[u][w]+b){
				dis[v][w-a]=dis[u][w]+b;
				q.push(make_pair(v,w-a));
				
			}
		}
		if(dis[u][w]+D[u]<dis[u][min(2500*1ll,w+C[u])]){
			dis[u][min(2500*1ll,w+C[u])]=dis[u][w]+D[u];
			q.push(make_pair(u,min(2500*1ll,w+C[u])));
		}
	}
}
signed main(){
	cin>>n>>m>>s;
	s=min(s,2500*1ll);
	init();
	for(int i=1;i<=m;i++){
		int a,b,c,d;
		cin>>a>>b>>c>>d;
		addegde(a,b,c,d);
		addegde(b,a,c,d);
	}
	for(int i=1;i<=n;i++) cin>>C[i]>>D[i];
	
	dij();
	//cout<<"==";
	for(int i=2;i<=n;i++){
		int res=inf;
		for(int j=0;j<2500;j++) res=min(res,dis[i][j]);
		cout<<res<<'\n';
	}
	return 0;
}

Compiler output:
a.cc:15:1: error: ISO C++ forbids declaration of 'addegde' with no type [-fpermissive]
   15 | addegde(int u,int v,int a,int b){
      | ^~~~~~~
a.cc: In function 'int addegde(long long int, long long int, long long int, long long int)':
a.cc:21:1: warning: no return statement in function returning non-void [-Wreturn-type]
   21 | }
      | ^
Language: C

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define ok() puts(ok?"Yes":"No");
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef vector<vi> vvi;
typedef vector<ii> vii;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef set<int> si;
typedef map<string, int> msi;
typedef greater<int> gt;
typedef priority_queue<int, vector<int>, gt> minq;
typedef long long ll;
typedef pair<ll,ll> pll;
const ll LINF = 1e18L + 1;
const int INF = 1e9 + 1;
//clang++ -std=c++11 -stdlib=libc++ 


int N,M; ll S;
ll MAX_S = 2505;
struct edge {
  int to;
  ll cost, t;
  edge(int to, ll cost, ll t):to(to), cost(cost), t(t) {}
};

struct Data {
  int v; ll s;
  ll x;
  Data(int v, ll s, ll x): v(v), s(s), x(x) {}
  bool operator<(const Data& a) const {
    return  x > a.x;
  }
};

int main() {  
  cin >> N>>M>>S;
  vector<ll> c(N);
  vector<ll> d(N);
  vector<vector<edge>> g(N, vector<edge>());
  rep(i,M) {
    int u,v; ll a,b; cin>>u>>v>>a>>b;
    u--;v--;
    g[u].emplace_back(v,a,b);
    g[v].emplace_back(u,a,b);
          // g[u].push_back(edge{v,a,b});
          // g[v].push_back(edge{u,a,b});
  } 
  
  rep(i, N) {
    cin >> c[i] >> d[i];
  }
  S = min(S, MAX_S);
  priority_queue<Data> q;
  vector<vector<ll>> dp(N, vector<ll>(MAX_S+5, LINF));
  auto push = [&] (int v, ll s, ll x) {
    if (s<0) return;
    // if (s>MAX_S) return ;
    if (dp[v][s] <= x) return ;
    dp[v][s] = x;
    // Data foo = Data(v,s,x);
    // q.push(Data{v,s,x});
    q.emplace(v,s,x);
    // q.push(foo);
  };
  push(0,S,0);
  while(q.size()) {
    Data foo = q.top(); q.pop();
    int v = foo.v;
    S=foo.s;
    ll x = foo.x;
    if (dp[v][S] != x) continue;
    ll ns =  min(S+c[v], MAX_S);
    push(v, ns , x+d[v]);
    rep(i, g[v].size()) {
      edge e = g[v][i];
      int nv = e.to;
      push(nv, S-e.cost, x+e.t);
    }
  }
  for (int i=1; i<dp.size();i++) {
    ll ans = LINF;
    rep(j, dp[i].size()) {
      ans = min(ans, dp[i][j]);
    }
    cout << ans << endl;
  }
  return 0;
}

Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
  int n,m,s;cin>>n>>m>>s;
  int* u=int[m];
  int* v=int[m];
  int* a=int[m];
  int* b=int[m];
  int* c=int[n];
  int* d=int[n];
  for(int i=0;i<n;i++) cin>>u[i]>>v[i]>>a[i]>>b[i];
  for(int i=0;i<n;i++) cin>>c[i]>>d[i];
  

  return 0;
}  


Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: expected primary-expression before 'int'
    6 |   int* u=int[m];
      |          ^~~
a.cc:7:10: error: expected primary-expression before 'int'
    7 |   int* v=int[m];
      |          ^~~
a.cc:8:10: error: expected primary-expression before 'int'
    8 |   int* a=int[m];
      |          ^~~
a.cc:9:10: error: expected primary-expression before 'int'
    9 |   int* b=int[m];
      |          ^~~
a.cc:10:10: error: expected primary-expression before 'int'
   10 |   int* c=int[n];
      |          ^~~
a.cc:11:10: error: expected primary-expression before 'int'
   11 |   int* d=int[n];
      |          ^~~
Language: C

#include <bits/stdc++.h>
using namespace std;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

using pll = pair<long long, long long>; // (money, time)
using Edge = pair<int, pll>;
using Graph = vector<vector<Edge>>;
const long long INF = 1LL<<60;
const int MAX = 2500;

int N, M;
long long S;
Graph G;
vector<long long> C, D; // money, time

void solve() {
    if (S >= MAX) S = MAX;
    vector<vector<long long>> dp(N, vector<long long>(MAX+1, INF));
    priority_queue<pair<long long, pll>, vector<pair<long long, pll> >, greater<pair<long long, pll> > > que;
    dp[0][S] = 0;
    que.push(make_pair(0, pll(0, S)));
    while (!que.empty()) {
        auto p = que.top(); que.pop();
        long long time = p.first;
        int v = p.second.first;
        long long s = p.second.second;
        if (time > dp[v][s]) continue;

        // 補充
        if (s + C[v] <= MAX) {
            long long ns = s + C[v];
            long long ntime = time + D[v];
            if (chmin(dp[v][ns], ntime)) {
                que.push(make_pair(ntime, pll(v, ns)));
            }
        }
        // 辺を通る
        for (auto e : G[v]) {
            if (s < e.second.first) continue;
            int nv = e.first;
            long long ns = s - e.second.first;
            long long ntime = time + e.second.second;
            if (chmin(dp[nv][ns], ntime)) {
                que.push(make_pair(ntime, pll(nv, ns)));
            }
        }
    }
    for (int v = 1; v < N; ++v) {
        long long res = INF;
        for (int s = 0; s <= MAX; ++s) chmin(res, dp[v][s]);
        cout << res << endl;
    }
}

int main() {
    cin >> N >> M >> S;
    G.assign(N, vector<Edge>());
    for (int i = 0; i < M; ++i) {
        long long u, v, a, b;
        cin >> u >> v >> a >> b;
        --u, --v;
        G[u].push_back(Edge(v, pll(a, b)));
        G[v].push_back(Edge(u, pll(a, b)));
    }
    C.resize(N); D.resize(N);
    for (int i = 0; i < N; ++i) cin >> C[i] >> D[i];
    solve();
}

Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C

#include <bits/stdc++.h>
using namespace std;
template<class T> inline bool chmax(T& a, T b){if(a < b){a = b; return 1;} return 0;}
template<class T> inline bool chmin(T& a, T b){if(a > b){a = b; return 1;} return 0;}

using pll = pair<long long, long long>;
using Edge = pair<int, pll>;
using Graph = vector<vector<Edge>>;
const long long INF = 1LL<<60;
const int MAX = 2500;

int N, M;
long long S;
Graph G;
vector<long long> C, D;

void solve() {
    if(S >= MAX) S = MAX;
    vector<vector<long long>> dp(N, vector<long long>(MAX+1, INF));
    priority_queue<pair<long long, pll>,  vector<pair<long long, pll>>, greater<pair<long long, pll>>> que;
    dp[0][S] = 0;
    que.push(make_pair(0, pll(0,S)));
    while (!que.empty())
    {
        auto p = que.top(); que.pop();
        long long time = p.first;
        int v = p.second.first;
        long long s = p.second.second;
        if(time > dp[v][s]) continue;

        if(s + C[v] <= MAX){
            long long ns = s + C[v];
            long long ntime = time + D[v];
            if(chmin(dp[v][ns], time)){
                que.push(make_pair(ntime, pll(v, ns)));
            }
        }

        for (auto e : G[v])
        {
            if(s < e.second.first) continue;
            int nv = e.first;
            long long ns = s - e.second.first;
            long long ntime = time + e.second.second;
            if(chmin(dp[nv][ns], ntime)){
                que.push(make_pair(ntime, pll(nv, ns)));
            }
        }
    }
    for (int v = 1; v < N; v++)
    {
        long long res = INF;
        for (int s = 0; s <= MAX; s++)
        {
            chmin(res, dp[v][s]);
        }
        cout << res << endl;
    }
}
int main() {
    cin >> N >> M >> S;
    G.assign(N, vector<Edge>());
    for (int i = 0; i < M; i++)
    {
        long long u, v, a, b;
        cin >> u >> v >> a >> b;
        --u, --v;
        G[u].push_back(Edge(v, pll(a, b)));
        G[v].push_back(Edge(u, pll(a, b)));
    }
    C.resize(N); D.resize(N);
    for (int i = 0; i < N; i++)
    {
        cin >> C[i] >> D[i];
    }
    solve();
}

Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C

#include<bits/stdc++.h>
using namespace std;
template<class T> inline bool chmax(T& a, T b){if(a < b){a = b; return 1;} return 0;}
template<class T> inline bool chmin(T& a, T b){if(a > b){a = b; return 1;} return 0;}

using pll = pair<long long, long long>;
using Edge = pair<int, pll>;
using Graph = vector<vector<Edge>>;
const long long INF = 1LL<<60;
const int MAX = 2500;

int N, M;
long long S;
Graph G;
vector<long long> C, D;

void solve() {
    if(S >= MAX) S = MAX;
    vector<vector<long long>> dp(N, vector<long long>(MAX+1, INF));
    priority_queue<pair<long long, pll>,  vector<pair<long long, pll>>, greater<pair<long long, pll>>> que;
    dp[0][S] = 0;
    que.push(make_pair(0, pll(0,S)));
    while (!que.empty())
    {
        auto p = que.top(); que.pop();
        long long time = p.first;
        int v = p.second.first;
        long long s = p.second.second;
        if(time > dp[v][s]) continue;

        if(s + C[v] <= MAX){
            long long ns = s + C[v];
            long long ntime = time + D[v];
            if(chmin(dp[v][ns], time)){
                que.push(make_pair(ntime, pll(v, ns)));
            }
        }

        for (auto e : G[v])
        {
            if(s < e.second.first) continue;
            int nv = e.first;
            long long ns = s - e.second.first;
            long long ntime = time + e.second.second;
            if(chmin(dp[nv][ns], ntime)){
                que.push(make_pair(ntime, pll(nv, ns)));
            }
        }
    }
    for (int v = 1; v < N; v++)
    {
        long long res = INF;
        for (int s = 0; s <= MAX; s++)
        {
            chmin(res, dp[v][s]);
        }
        cout << res << endl;
    }
}
int main() {
    cin >> N >> M >> S;
    G.assign(N, vector<Edge>());
    for (int i = 0; i < M; i++)
    {
        long long u, v, a, b;
        cin >> u >> v >> a >> b;
        --u, --v;
        G[u].push_back(Edge(v, pll(a, b)));
        G[v].push_back(Edge(u, pll(a, b)));
    }
    C.resize(N); D.resize(N);
    for (int i = 0; i < N; i++)
    {
        cin >> C[i] >> D[i];
    }
    solve();
}

Compiler output:
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
    1 | #include<bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C

# include <bits/stdc++.h>

using namespace std;

const int N = 55;
const int M = 2505;

int n, m, s;
int A[N], B[N], C[N], D[N];
long long f[N][M];
vector < pair <int, int> > g[N];

int main() {
    cin >> n >> m >> s;

    s = min(s, M - 1);

    for (int i = 0, u, v; i < m; i++) {
        cin >> u >> v >> A[i] >> B[i];
        g[u].emplace_back(v, i);
        g[v].emplace_back(u, i);
    }

    for (int i = 1; i <= n; i++) {
        cin >> C[i] >> D[i];
    }

    for (int i = 0; i < N; i++) {
        for (int j = 0; j < M; j++) {
            f[i][j] = 1e18;
        }
    }

    set < pair <long long, pair <int, int> > > st;

    for (int i = 0; i <= s; i++) {
        f[1][i] = 0;
    }
    
    st.insert({ f[1][s], {1, s} }); 

    while (!st.empty()) {
        int v = st.begin()->second.first, silver = st.begin()->second.second;
        st.erase(st.begin());
        if (silver + C[v] < M && f[v][silver] + D[v] < f[v][silver + C[v]]) {
            st.erase({ f[v][silver + C[v]], {v, silver + C[v]} });
            f[v][silver + C[v]] = f[v][silver] + D[v];
            st.insert({ f[v][silver + C[v]], {v, silver + C[v]} });
        }
        for (int i = 0; i < g[v].size(); i++) {
            int to = g[v][i].first, id = g[v][i].second;
            if (silver - A[id] >= 0 && f[v][silver] + B[id] < f[to][silver - A[id]]) {
                st.erase({ f[to][silver - A[id]], {to, silver - A[id]} });
                f[to][silver - A[id]] = f[v][silver] + B[id];
                st.insert({ f[to][silver - A[id]], {to, silver - A[id]} });
            }
        }
    }

    for (int i = 2; i <= n; i++) {
        long long ans = 1e18;
        for (int j = 0; j < M; j++) {
            ans = min(ans, f[i][j]);
        }
        cout << ans << endl;
    }
}


Compiler output:
main.c:1:11: fatal error: bits/stdc++.h: No such file or directory
    1 | # include <bits/stdc++.h>
      |           ^~~~~~~~~~~~~~~
compilation terminated.
Language: C

#include <bits/stdc++.h>
#define linf 9000000000000000000ll


using namespace std;
typedef long long ll;


struct edge
{
	ll to, len, cost;
	edge(ll to, ll len, ll cost) : to(to), len(len), cost(cost) {}
};

const int MAX_N = 50;
const int MAX_M = 100;
const int MAX_A = 2500;

int A[MAX_M], B[MAX_M], C[MAX_N], D[MAX_N];

int n, m, sil;

vector<edge> G[51];
vector<ll> _time[MAX_A + 1], min_time;
vector<int> prev[MAX_A + 1];

void dijkstra(int s)
{
	for (int i = 0; i <= MAX_A; i++)
	{
		_time[i].resize(n, linf);
	}

	min_time.resize(n, linf);
	_time[sil][s] = 0;
	min_time[s] = 0;

	using P = pair<ll, pair<int, int>>; // time, (pos, sil)
	priority_queue<P, vector<P>, greater<P>> Q;
	Q.push({0, {s, sil}});

	while (!Q.empty())
	{
		ll cur_time = Q.top().first;
		int cur_pos = Q.top().second.first;
		int cur_sil = Q.top().second.second;
		Q.pop();


		if (_time[cur_sil][cur_pos] < cur_time) continue;
		if (cur_sil != MAX_A)
		{
			int nx_sil = min(MAX_A, cur_sil + C[cur_pos]);
			ll nx_time = cur_time + D[cur_pos];
			if (_time[nx_sil][cur_pos] > nx_time)
			{
				_time[nx_sil][cur_pos] = nx_time;
				Q.push({nx_time,{cur_pos, nx_sil}});
			}
		}

		for (edge e : G[cur_pos])
		{
			ll nx_time = cur_time + e.len;
			int nx_pos = e.to;
			int nx_sil = cur_sil - e.cost;

			if (nx_sil >= 0 and nx_time < _time[nx_sil][nx_pos])
			{
				_time[nx_sil][nx_pos] = nx_time;
				min_time[nx_pos] = min(min_time[nx_pos], nx_time);
				Q.push({nx_time, {nx_pos, nx_sil}});
			}
		}

	}
}


int main()
{
	std::ios::sync_with_stdio(false);

	cin >> n >> m >> sil;
	sil = min(sil, MAX_A);

	for (int i = 0; i < m; i ++)
	{
		int u,v;
		cin >> u >> v >> A[i] >> B[i];
		u--;
		v--;
		G[u].push_back(edge(v, B[i], A[i]));
		G[v].push_back(edge(u, B[i], A[i]));
	}

	for (int i = 0; i < n; i++)
	{
		cin >> C[i] >> D[i];
	}

	dijkstra(0);

	for (int i = 1; i < n; i++)
		cout << min_time[i] << endl;

	return 0;
}

Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C

#include <iostream>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <bits/stdc++.h>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#define linf 9000000000000000000ll


using namespace std;
typedef long long ll;


struct edge
{
	ll to, len, cost;
	edge(ll to, ll len, ll cost) : to(to), len(len), cost(cost) {}
};

const int MAX_N = 50;
const int MAX_M = 100;
const int MAX_A = 2500;

int A[MAX_M], B[MAX_M], C[MAX_N], D[MAX_N];

int n, m, sil;

vector<edge> G[51];
vector<ll> _time[MAX_A + 1], min_time;
vector<int> prev[MAX_A + 1];

void dijkstra(int s)
{
	for (int i = 0; i <= MAX_A; i++)
	{
		_time[i].resize(n, linf);
	}

	min_time.resize(n, linf);
	_time[sil][s] = 0;
	min_time[s] = 0;

	using P = pair<ll, pair<int, int>>; // time, (pos, sil)
	priority_queue<P, vector<P>, greater<P>> Q;
	Q.push({0, {s, sil}});

	while (!Q.empty())
	{
		ll cur_time = Q.top().first;
		int cur_pos = Q.top().second.first;
		int cur_sil = Q.top().second.second;
		Q.pop();


		if (_time[cur_sil][cur_pos] < cur_time) continue;
		if (cur_sil != MAX_A)
		{
			int nx_sil = min(MAX_A, cur_sil + C[cur_pos]);
			ll nx_time = cur_time + D[cur_pos];
			if (_time[nx_sil][cur_pos] > nx_time)
			{
				_time[nx_sil][cur_pos] = nx_time;
				Q.push({nx_time,{cur_pos, nx_sil}});
			}
		}

		for (edge e : G[cur_pos])
		{
			ll nx_time = cur_time + e.len;
			int nx_pos = e.to;
			int nx_sil = cur_sil - e.cost;

			if (nx_sil >= 0 and nx_time < _time[nx_sil][nx_pos])
			{
				_time[nx_sil][nx_pos] = nx_time;
				min_time[nx_pos] = min(min_time[nx_pos], nx_time);
				Q.push({nx_time, {nx_pos, nx_sil}});
			}
		}

	}
}


int main()
{
	std::ios::sync_with_stdio(false);

	cin >> n >> m >> sil;
	sil = min(sil, MAX_A);

	for (int i = 0; i < m; i ++)
	{
		int u,v;
		cin >> u >> v >> A[i] >> B[i];
		u--;
		v--;
		G[u].push_back(edge(v, B[i], A[i]));
		G[v].push_back(edge(u, B[i], A[i]));
	}

	for (int i = 0; i < n; i++)
	{
		cin >> C[i] >> D[i];
	}

	dijkstra(0);

	for (int i = 1; i < n; i++)
		cout << min_time[i] << endl;

	return 0;
}

Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn=55;
const int maxm=2466;
const ll inf=0x3f3f3f3f3f3f3f3f;
#define tp tuple<ll,ll,ll>

vector<tp> G[maxn];
ll c[maxn],d[maxn];
ll dp[maxn][maxm];

int main(){
	int n,m,s;
	scanf("%d%d%d",&n,&m,&s);
	s=min(2450LL,s);
	for(int i=1;i<=m;i++){
		ll u,v,a,b;
		scanf("%lld%lld%lld%lld",&u,&v,&a,&b);
		G[u].push_back(tp(v,a,b)); //钱 时间 
		G[v].push_back(tp(u,a,b));
	}
	for(int i=1;i<=n;i++)
		scanf("%d%d",&c[i],&d[i]);
	fill(dp[0],dp[0]+54*2465,inf);
	dp[1][s]=0;
	
	priority_queue<tp,vector<tp>,greater<tp>> pq;
	pq.push(tp(0,1,s));
	while(!pq.empty()){
		tp cur;
		cur=pq.top();
		pq.pop();
		ll t=get<0>(cur),u=get<1>(cur),w=get<2>(cur);
		for(auto i:G[u]){
			ll v=get<0>(i),toa=get<1>(i),tob=get<2>(i);
			if(dp[v][w-toa]>t+tob&&w>=toa){
				dp[v][w-toa]=t+tob;
				pq.push(tp(t+tob,v,w-toa));
			}
		}
		if(dp[u][min(2450LL,w+c[u])]>t+d[u]){
			dp[u][min(2450LL,w+c[u])]=t+d[u];
			pq.push(tp(t+d[u],u,min(2450LL,w+c[u])));
		}
	}
	for(int i=2;i<=n;i++){
		ll ans=inf;
		for(int j=0;j<=2450;j++){
			ans=min(ans,dp[i][j]);
		}
		printf("%lld\n",ans);
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:14: error: no matching function for call to 'min(long long int, int&)'
   16 |         s=min(2450LL,s);
      |           ~~~^~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:16:14: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   16 |         s=min(2450LL,s);
      |           ~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:16:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   16 |         s=min(2450LL,s);
      |           ~~~^~~~~~~~~~
Language: C

// https://atcoder.jp/contests/abc164/tasks/abc164_e
#include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long ll;
typedef pair<int,int> P;
#define MAX_N 55
#define MAX_M 105
#define MAX_A 55
struct EDGE{int to,cost,time;};
struct NODE{int gain,time;};
vector<EDGE> edge[MAX_N]; 
NODE node[MAX_N];
ll dp[MAX_N][MAX_N*MAX_A];
const ll INF = 1e18;
int main() {
	int n,m,s;
	cin >> n >> m >> s;
	int cmax=0;
	rep(i,m){
		int from,to,c,t;
		cin >> from >> to >> c >>t;
		from--;to--;
		edge[from].push_back((EDGE){to,c,t});
		edge[to].push_back((EDGE){from,c,t});
		if(c>cmax)cmax=c;
	}
	cmax *= n;
	rep(i,n){
		int g,t;
		cin >> g >>t;
		node[i] = (NODE){g,t};
	}
	rep(i,n)rep(j,cmax) dp[i][j] = INF;
	rep(j,cmax){
		if(j<=s)dp[0][j]=0;
		else dp[0][j] = node[0].time * ((j-s)/node[0].gain+1);
	}
	while(true){
		bool updated = false;
		for(int i=0;i<n;i++){
			rep(j,cmax){
				for(int t=1;j-t*node[i].gain>=0;t++){
					ll stay_t = dp[i][j-t*node[i].gain]+t*node[i].time;
					if(stay_t < dp[i][j]){
						dp[i][j] = stay_t;
						updated=true;
					}

				}
				rep(v,edge[i].size()){
					ll move_t = dp[edge[i][v].to][min(cmax-1,j+edge[i][v].cost)]+edge[i][v].time;
					if(move_t < dp[i][j]){
						dp[i][j] = move_t;
						updated = true;
					}
				}
			}
		}
		if(!updated) break;
	}
	for(int i=1;i<n;i++){
		ll t_min=INF;
		rep(j,cmax)t_min = min(t_min,dp[i][j]);
		cout << t_min << endl;
	}


    return 0;
}



Compiler output:
main.c:2:9: fatal error: bits/stdc++.h: No such file or directory
    2 | #include<bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C

#include<bits/stdc++.h>

using namespace std;
using ll = long long;
using ull = unsigned long long;
using P = pair<int,int>;
using Pl = pair<ll,ll>;
#define REP(i,n) for(ll i = 0;i < (ll)n;i++)
#define REPD(i,n) for(ll i = (ll)n - 1;i >= 0;i--)
#define ALL(x) (x).begin(),(x).end()
#define FILLl(n,first_dimension_size,value) fill((ll*)n,(ll*)(n+first_dimension_size),value)
#define FILL(n,first_dimension_size,value) fill((int*)n,(int*)(n+first_dimension_size),value)
#define INF (1 << 30)
#define MOD 1000000007
//int dy[4] = {-1,0,0,1};
//int dx[4] = {0,1,-1,0};

struct edge{
  int to,s,t;
  bool operator<(const edge &other)const{
    return t > other.t;
  }
};

int main(){
  
  int n,m,S;
  cin >> n >> m >> S;
  const int max_S = 5000;
  S = min(max_S,S);
  vector<vector<edge>> v(n);
  REP(i,m){
    int fr,to,a,b;cin >> fr >> to >> a >> b;
    fr--,to--;
    v[fr].push_back({to,a,b});
    v[to].push_back({fr,a,b});
  }
  vector<P> cost(n);
  REP(i,n)cin >> cost[i].first >> cost[i].second;
  priority_queue<edge> que;
  que.push({0,S,0});
  vector<vector<int>> dist(n,vector<int>(5001,INF));
  dist[0][S] = 0;
  auto push = [&](edge vv,edge vvv){
    if(vv.s < vvv.s)return ;
    int ns = min(vv.s-vvv.s,max_S);
    if(dist[vvv.to][ns] <= dist[vv.to][vv.s]+vvv.t)return ; 
    dist[vvv.to][ns] = dist[vv.to][vv.s]+vvv.t;
    que.push({vvv.to,ns,dist[vvv.to][ns]});
  };
  while(!que.empty()){
    edge e = que.top();que.pop();
    if(dist[e.to][e.s] != e.t)continue;
    push(e,{e.to,-cost[e.to].first,cost[e.to].second});
    for(auto nv : v[e.to])push(e,nv);
  }
  for(int i = 1;i < n;i++){
    ll res = INF;
    REP(j,5001)res = min(res,1ll*dist[i][j]);
    cout << res << endl;
  }



  

  return 0;
}

Compiler output:
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
    1 | #include<bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
#define REP(i,n) for(int i=1;i<=(n);i++)
typedef long long ll;
typedef pair<int,int> pii;

struct Edge{
    int to,mai,t;
    Edge(){}
    Edge(int to,int mai,int t){
        this->to = to;
        this->mai = mai;
        this->t = t;
    }
};

typedef vector<Edge> Edges;
typedef vector<Edges> Graph;

typedef tuple<ll,ll,ll> T;
const ll INF = 1e+15;
ll dp[50][2501];
ll c[50],d[50];
int main(){
    int n,m,s;
    cin>>n>>m>>s;

    Graph g(n);
    rep(i,m){
        int u,v,a,b;
        cin>>u>>v>>a>>b;
        u--;v--;
        g[u].push_back(Edge(v,a,b));
        g[v].push_back(Edge(u,a,b));
    }
    rep(i,n) cin>>c[i]>>d[i];


    rep(i,n) rep(j,2501) dp[i][j]=INF;

    s = min(s,2500);
    priority_queue<T,vector<T>,greater<T>> que;
    que.push(T(0,0,s));

    while(!que.empty()){
        T now = que.top();que.pop();

        ll t = get<0>(now);
        ll pos =get<1>(now);
        ll mai = get<2>(now);
        if(dp[pos][mai]<=t) continue;
        dp[pos][mai]=t;
        rep(i,g[pos].size()){
            Edge e = g[pos][i];
            if(mai>=e.mai){
                que.push(T(t+e.t,e.to,mai-e.mai));
            } 
        }
        que.push(T(t+d[pos],pos,min((ll)2500,mai+c[pos])));
    }
    
    for(int i = 1;i<n;i++){
        ll ans = INF;
        rep(j,2501){
            ans = min(ans,dp[i][j]);
        }
        cout<<ans<<endl;
    }
    return 0;

}

Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C

#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL_DEBUG
  #include "LOCAL_DEBUG.hpp"
#endif
#define int long long

template<class T> vector<T> make_vec(size_t a) { return vector<T>(a); }
template<class T, class... Ts> auto make_vec(size_t a, Ts... ts) {
  return vector<decltype(make_vec<T>(ts...))>(a, make_vec<T>(ts...));
}
template<class T, class V>
typename enable_if<is_class<T>::value == 0>::type fill(T &t, const V &v) {
    t = v;
}
template<class T, class V>
typename enable_if<is_class<T>::value != 0>::type fill(T &t, const V &v) {
    for (auto &e : t) fill(e, v);
}
// auto v = make_vec<int>(h, w);
// fill(v, 0);
const int INF = 1LL << 60;

struct edge{ 
  int to, cost, time;
  bool operator<(const edge& a) const {
    return time > a.time;
  }
 };

signed main(){

  int n, m, s; cin >> n >> m >> s;
  vector<vector<edge>> g(n);
  vector<int> a(m), b(m), c(n), d(n);
  for(int i = 0; i < m; i++){
    int u, v; cin >> u >> v;
    u--, v--;
    cin >> a[i] >> b[i];
    g[u].push_back({v, a[i], b[i]});
    g[v].push_back({u, a[i] ,b[i]});
  }
  for(int i = 0; i < n; i++){
    cin >> c[i] >> d[i];

  }

  auto dp = make_vec<int>(n, n * 55);
  fill(dp, INF);
  priority_queue<edge> q; //最小値
  q.push({0, s, 0});
  dp[0][s] = 0;
  while(!q.empty()){
    edge p = q.top(); q.pop();
    int u = p.to, cost = p.cost, t = p.time;
    if(dp[u][cost] < t) continue;
    if(cost + c[u] < n*50 && dp[u][cost + c[u]] > dp[u][cost] + d[u]){
      dp[u][cost + c[u]] = dp[u][cost] + d[u];
      q.push({u, cost + c[u], dp[u][cost + c[u]]});
    }
    for(auto e : g[u]){
      if(cost - e.cost >= 0 && dp[e.to][cost - e.cost] > dp[u][cost] + e.time){
        dp[e.to][cost - e.cost] = dp[u][cost] + e.time;
        q.push({e.to, cost - e.cost, dp[e.to][cost - e.cost]});
      }
    }
  }

  for(int i = 1; i < n; i++){
    //cout << dp[i] << endl;
    cout << *min_element(dp[i].begin(), dp[i].end()) << endl;
  }

  return 0;
}

Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C

#include <bits/stdc++.h>
#define rep(i,n) for (ll i = 0; i < n; ++i)
using namespace std;
using ll = long long;
using ull = long long unsigned;
using P = pair<ll,ll>;
const ll INF=1001001001;
typedef tuple<int,int,int> T;

class edge {
public:
    ll to;
    ll cost;
		ll time;
		edge(){}
    edge(ll t, ll c, ll d) {
        to = t;
        cost = c;
				time= d;
    }
};




int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	ll n,m,s;
	cin>>n>>m>>s;
	vector<vector<edge>> G(n);
	vector<vector<edge>> C(n);

	vector<vector<ll>> dist(n,vector<ll> (2500));


//	P G1(n);

//	P C1(n);
	rep(i,m){
		int u1,v1,a2,b2;
		cin>>u1>>v1>>a2>>b2;
		u1--;v1--;
	//	G1[i]=make_pair(u1,v1);
	//	C1[i]=make_pair(a2,b2);
		G[u1].push_back(edge(v1,a2,b2));
		G[v1].push_back(edge(u1,a2,b2));
	//	C[u1].push_back(edge(v1,b2));
	//	G[v1].push_back(edge(u1,b2));
	}


	vector<P> F(n);
	rep(i,n){
		ll c1,d1;
		cin>>c1>>d1;
		F[i]=make_pair(c1,d1);
	}

	rep(i,n)rep(j,2500) dist[i][j] = INF;
	priority_queue<T, vector<T>, greater<T>> que;
//	que.push(T(0,0,0));
	//dist[0][0]=0;
	if (s>2500)s=2500;

		dist[0][s] = 0;

		que.push(T(0,0,s));

//cost, to[1][],to[][1]
	while (!que.empty()) {
		T tnow=que.top();
		que.pop();
		ll c1,a1,b1;
	//	cout<<c1<<' '<<a1<<' '<<b1<<endl;
		tie(c1,a1,b1)=tnow;
		if (dist[a1][b1] < c1) continue;

//上に伸ばす

			ll cnow=F[a1].first;
			ll dnow=F[a1].second;
		//	cout<<cnow<<' '<<dnow<<endl;
	//		rep(j,cnow+1){
			//	cout<<j<<'j'<<endl;
			ll temp=b1+cnow;
				if (temp>2500) temp=2500;

					if (dist[a1][temp]>dist[a1][b1]+dnow){
						dist[a1][temp]=dist[a1][b1]+dnow;
						que.push(T(dist[a1][temp], a1,temp));

					}
		//	}


//横に伸ばす


			for (edge e : G[a1]) {
			//	cout<<e.time<<'t'<<e.cost<<'c'<<e.to<<"to"<<b1<<'b'<<endl;
				if (b1>=e.cost){
					if (dist[e.to][b1-e.cost] > dist[a1][b1] + e.time) {
							dist[e.to][b1-e.cost] = dist[a1][b1] + e.time;
							que.push(T(dist[e.to][b1-e.cost], e.to,b1-e.cost));
					}
			}
		}



	}

rep(i,n-1){
	ll ans=INF;
	rep(j,2500){
		ans=min(ans,dist[i+1][j]);
	}
	cout<<ans<<endl;


}

//cout<<ans;




}


Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: Java

import java.util.*;
import java.util.stream.*;

public class E {
    static final int MAX_V = 50;
    static final int MAX_S = MAX_V * 50 + 5;

    @SuppressWarnings("unchecked")
    static List<Edge>[] g = new ArrayList[MAX_V];
    static double[][] dist = new double[MAX_V][MAX_S + 5];

    static {
        for (int i = 0; i < MAX_V; i++) {
            g[i] = new ArrayList<>();
        }
    }

    public static void execute(Scanner sc) {
        int cities = sc.nextInt();
        int lines = sc.nextInt();
        int silvers = sc.nextInt();
        for (int i = 0; i < lines; i++) {
            int u = sc.nextInt();
            int v = sc.nextInt();
            int fare = sc.nextInt();
            int minutes = sc.nextInt();
            --u; --v;
            g[u].add(new Edge(v, fare, minutes));
            g[v].add(new Edge(u, fare, minutes));
        }
        List<Integer> c = new ArrayList<>(cities), d = new ArrayList<>(cities);
        for (int i = 0; i < cities; i++) {
            c.add(sc.nextInt());
            d.add(sc.nextInt());
        }
        for (int i = 0; i < cities; i++) {
            for (int j = 0; j < MAX_S + 5; j++) {
                dist[i][j] = Double.POSITIVE_INFINITY;
            }
        }
        silvers = Integer.min(silvers, MAX_S);

        PriorityQueue<Data> q = new PriorityQueue<>((a, b) -> {
            long diff = a.x - b.x;
            if (diff > 0) return 1;
            if (diff < 0) return -1;
            return 0;
        });
        TriConsumer<Integer, Integer, Long> push = (v, s, x) -> {
            if (s < 0) return;
            if (dist[v][s] <= x) return;
            dist[v][s] = x;
            q.add(new Data(v, s, x));
        };
        push.accept(0, silvers, 0L);
        while (!q.isEmpty()) {
            Data top = q.poll();
            int v = top.v, s = top.s;
            long x = top.x;
            if (dist[v][s] != x) continue;
            {
                int ns = Integer.min(s + c.get(v), MAX_S);
                push.accept(v, ns, x + d.get(v));
            }
            for (Edge e : g[v]) {
                push.accept(e.to, s - e.a, x + e.b);
            }
        }
        for (int i = 1; i < cities; i++) {
            double ans = Double.POSITIVE_INFINITY;
            for (int j = 0; j < MAX_S + 5; j++) {
                ans = Double.min(ans, dist[i][j]);
            }
            System.out.println((int) ans);
        }
    }

    private static class Edge {
        int to, a, b;
        Edge(int to, int a, int b) {
            this.to = to;
            this.a = a;
            this.b = b;
        }
    }

    private static class Data {
        int v, s;
        long x;
        Data(int v, int s, long x) {
            this.v = v;
            this.s = s;
            this.x = x;
        }
    }
}

interface TriConsumer<T, U, V> {
    void accept(T t, U u, V v);
}


Compiler output:
Main.java:4: error: class E is public, should be declared in a file named E.java
public class E {
       ^
1 error
Language: C

            #include <bits/stdc++.h>
            #include <ext/pb_ds/assoc_container.hpp>
            using namespace std;

            #define rep(i,a,b) for(ll i =a; i<b;++i)
            #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
            #define endl "\n"
            #define pb push_back
            #define F first
            #define S second
            #define print(a)       for(auto x : a) cout << x << " "; cout << endl
            #define print1(a)      for(auto x : a) cout << x.F << " " << x.S << endl
            #define print2(a,x,y)  for(int i = x; i < y; i++) cout<< a[i]<< " "; cout << endl
            #define mk(x,y)  make_pair(x,y)
            typedef  long long  int ll;
            const ll N = ( 2e3 + 5 );
            const ll mod = 1e18+7;
            ll n,m,a[N],s,b[N],c[N],d[N],u[N],v[N],dp[55][55*55],ans[N];
            vector < pair<ll, pair <ll,ll >> > g[N];
    ll pow_mod_m(ll a , ll n)
    {
        if(!n)
            return 1;
        ll pt =  pow_mod_m(a,n/2);
        pt *= pt ;
        if(n&1)
            pt *= a ;
        return pt;
    }

    void dfs(ll u)
    {

    }

/// dp_i_j min time taken to reach j from i

    int main()
    {
         IOS;
         int ts =1;
         //cin>>ts;
         while(ts--)
         {
             cin >> n >> m >> s;
             s = min(s,2500ll);
             rep(i,1,m+1)
             {
                 cin >> u[i] >> v[i] >> a[i] >> b[i];
                 g[u[i]].pb(mk(v[i],mk(a[i],b[i])));
                 g[v[i]].pb(mk(u[i],mk(a[i],b[i])));
             }
             rep(i,1,n+1)
             {
                 cin >> c[i] >> d[i];
             }
             memset(dp , -1 , sizeof(dp));
             using T = pair<ll, pair <ll,ll > >;
             priority_queue < T , vector <T> , greater<T> > pq; /// {time , { node, silver}}
             pq.push(mk(0,mk(1,s)));
             while(pq.empty() == false)
             {
                 T w = pq.top();
                 pq.pop();
                 ll node = w.S.F;
                 ll silver = w.S.S;
                 if(dp[node][silver] != -1) continue;
                 dp[node][silver] = w.F;
                 if(silver < 2500)
                 {
                     pq.push( mk (w.F + d[node] , mk( node , silver + c[node]) ) );
                 }
                 for(auto v : g[node])
                 {
                     if(v.S.F <= silver and dp[v.F][silver - v.S.F] == -1)
                     {
                         pq.push( mk ( w.F + v.S.S , mk( v.F , silver - v.S.F )));
                     }
                 }
             }
             rep(i,2,n+1)
             {
                 ans[i] = mod;
                 rep(j,0,2501)
                 {
                     ans[i] = min(ans[i],dp[i][j]);
                 }
                 cout << ans[i] << endl;
             }
         }
    }


Compiler output:
main.c:1:22: fatal error: bits/stdc++.h: No such file or directory
    1 |             #include <bits/stdc++.h>
      |                      ^~~~~~~~~~~~~~~
compilation terminated.