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

/* dijkstra.cpp
    ダイクストラ法で、ある頂点から各頂点への最短距離を求めるアルゴリズム
    負の辺が含まれる場合はうまく計算出来ないので、ベルマンフォード法を用いる

    verified: AOJ GRL_1_A
        http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=GRL_1_A&lang=jp
*/

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

template <typename T>
struct Edge {
    int to;
    T cost;
};
using Graph = vector<vector<Edge<long long>>>;  // 距離/コストの型 T を指定する
const long long INF = (1LL << 60);              // 型 T のINF (完全な最大値は取らないように)

using ll = long long;

int S;

/* dijkstra(G,s,dis,prev)
    入力：グラフ G, 開始点 s, 距離を格納する dis, 最短経路の前の点を記録するprev
    計算量：O(|E|log|V|)
    副作用：dis, prevが書き換えられる
*/
template <typename T>
void dijkstra(const Graph &G, int s, vector<T> &dis, vector<int> &prev) {
    using P = pair<T, int>;

    int N = G.size();
    dis.resize(N, INF);
    prev.resize(N, -1);
    priority_queue<P, vector<P>, greater<P>> pq;  // the least element is top. first:cost, second: node
    dis[s] = 0;
    pq.emplace(dis[s], s);
    while (!pq.empty()) {
        P p = pq.top();  // the least element
        pq.pop();
        int v = p.second;
        if (dis[v] < p.first) {
            continue;
        }
        for (auto &e : G[v]) {
            if (dis[e.to] > dis[v] + e.cost) {
                dis[e.to] = dis[v] + e.cost;
                prev[e.to] = v;
                pq.emplace(dis[e.to], e.to);
            }
        }
    }
}

int main() {
    int N, M;
    cin >> N >> M >> S;
    Graph G(N * 2501);
    for (int i = 0; i < M; i++) {
        int u, v, a, b;
        cin >> u >> v >> a >> b;
        u--, v--;
        for (int j = 0; j < 2501; j++) {
            if (j - a >= 0) G[u * 2501 + j].push_back({v * 2501 + (j - a), b});
            if (j - a >= 0) G[v * 2501 + j].push_back({u * 2501 + (j - a), b});
        }
    }
    for (int u = 0; u < N; u++) {
        int c;
        ll d;
        cin >> c >> d;
        for (int j = 0; j < 2501 - 1; j++) {
            G[u * 2501 + j].push_back({u * 2501 + min(j + c, 2501 - 1), d});
        }
    }
    vector<long long> dis;
    vector<int> prev;
    dijkstra(G, min(S, 2500), dis, prev);
    for (int i = 1; i < N; i++) {
        ll ans = INF;
        for (int j = 0; j < 2501; j++) {
            ans = min(ans, dis[i * 2501 + j]);
        }
        cout << ans << endl;
    }

    return 0;
}


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

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;

#define print(a) {for(auto xxxxx : (a)) cout << xxxxx << ' '; cout << '\n';}
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define fi first
#define se second
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()

ll next(){ll x; cin >> x; return x;}
const int maxn = 50 + 3, intf = 2e9;
const ll inf = 1e18, mod = 998244353;
const ld eps = 1e-6;

#define int ll

struct edge{
	int to , a , b;
};

int n , m;
vector <edge> g[maxn];
int c[maxn], d[maxn];
const int C = 1000;
ll dp[maxn][C];

int F(int x){
	return min(x , C - 1);
}

void solve(){
	int S;
	cin >> n >> m >> S;

	for (int i = 0; i < m ; i ++){
		int u , v , a , b;
		cin >> u >> v >> a >> b;
		u-- , v--;
		g[u].pb({v , a , b});
		g[v].pb({u , a , b});
	}

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

	for (int i = 0; i < n; i ++){
		for (int j = 0; j < C; j ++){
			dp[i][j] = inf;
		}
	}

	dp[0][F(S)] = 0;
	for (int j = 0; j < C; j ++){
		dp[0][F(j + c[i])] = min(dp[0][F(j + c[i])] , dp[0][j] + d[i]);
	}

	for (int I = 0; I < 2*n + 5; I ++){

		for (int i = 0; i < n; i ++){
			for (auto t : g[i]){
				for (int j = 0; j < C; j ++){
					if (t.a > j)
						continue;

					dp[t.to][j - t.a] = min(dp[t.to][j - t.a] , dp[i][j] + t.b);
				}
			}
		}

		for (int i = 0; i < n; i ++){
			for (int j = 0; j < C; j ++){
				dp[i][F(j + c[i])] = min(dp[i][F(j + c[i])] , dp[i][j] + d[i]);
			}
		}

	}

	for (int i = 1; i < n; i ++){
		ll ans = inf;
		for (int j = 0; j < C;  j ++){
			ans = min(ans , dp[i][j]);
		}

		cout << ans << '\n';
	}
}


signed main(){
    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); cout.precision(20);
    
    for (int t = 1; t--;) {
    	solve();
    }

	return 0;
}
/*


*/



Compiler output:
a.cc: In function 'void solve()':
a.cc:64:31: error: 'i' was not declared in this scope
   64 |                 dp[0][F(j + c[i])] = min(dp[0][F(j + c[i])] , dp[0][j] + d[i]);
      |                               ^
Language: C

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<int,pii> piii;
typedef pair<ll,pii> plii;
#define mkp make_pair
#define fi first
#define se second
int n,m,S;
ll d[53][5003],ans;
vector<piii>g[53];
int C[53],D[53];
bool vis[53][5003];
priority_queue <plii,vector<plii>,greater<plii> >pq;
void GO(int a,int b,ll c){
	if (c<d[a][b]){
		d[a][b]=c;
		pq.push(mkp(c,mkp(a,b)));
	}
}
int main(){
	cin>>n>>m>>S;
	S=min(S,5000);
	for (int i=0;i<m;i++){
		int u,v,a,b;cin>>u>>v>>a>>b;
		g[u].push_back(mkp(v,mkp(a,b)));
		g[v].push_back(mkp(u,mkp(a,b)));
	}
	for (int i=1;i<=n;i++) cin>>C[i]>>D[i];
	for (int i=0;i<53;i++) for(int j=0;j<5003;j++)d[i][j]=1e18;
	d[1][S]=0;
	pq.push(mkp(0,mkp(1,S)));
	while (!pq.empty()){
		plii x=pq.top();pq.pop();
		if (vis[x.se.fi][x.se.se]) continue;vis[x.se.fi][x.se.se]=1;
		GO(x.se.fi,min(5000,x.se.se+C[x.se.fi]),x.fi+D[x.se.fi]);
		for (int i=0;i<g[x.se.fi].size();i++)
			if (g[x.se.fi][i].se.fi<=x.se.se)
				GO(g[x.se.fi][i].fi,x.se.se-g[x.se.fi][i].se.fi,x.fi+g[x.se.fi][i].se.se);
	}
	for (int i=2;i<=n;i++){
		ans=1e18;
		for (int j=0;j<=5000;j++) ans=min(ans,d[i][j]);
		cout<<ans<<"\n";
	}
}

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 <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <unordered_map>
#include <unordered_set>
#include <cstring>
#include <climits>
#define mk make_pair
#define pb push_back
#define scanf scanf_s
#define printf printf_s
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef pair<ll, ll> pos;
const ll N = 60, MOD = 1000000007;

ll mn(ll a, ll b) {
	if (a == -1)return b;
	if (b == -1)return a;
	return min(a, b);
}

int bb(int v1) {
	if (v1 % 2 == 0)return v1 / 2 - 1;
	else return v1 / 2;
}

ll pw(ll a, ll b) {
	ll v = 1;
	for (; b > 0; b = (b >> 1), a = (a * a) % MOD) {
		if ((b & 1) > 0)v = (v * a) % MOD;
	}
	return v;
}
ll n, m, s;
pos cd[N];
vector<pair<int, pos> > g[N];
ll dp[N][(50 * 50 + 2)],vs[N][(50 * 50 + 2)];

int main() {
	cin >> n >> m >> s;
	while (m--) {
		int v1, v2, v3, v4; 
		cin >> v1 >> v2 >> v3 >> v4;
		g[v1].pb(mk(v2, mk(v3, v4)));
		g[v2].pb(mk(v1, mk(v3, v4)));
	}
	for (int i = 1; i <= n; i++)cin >> cd[i].first >> cd[i].second;
	for (int t = 2; t <= n; t++) {
		memset(dp, -1, sizeof(dp));
		memset(vs, false, sizeof(vs));
		priority_queue < pair<ll, pair<int, int> > > q;
		q.push(mk(0, mk(min(s, (ll)2501), 1)));
		while (!q.empty()) {
			if (q.top().second.second == t)
			{ cout << -q.top().first << endl; break; }
			ll v1 = -q.top().first;
			int v2 = q.top().second.first, v3 = q.top().second.second;
			q.pop();
			if (vs[v3][v2] )continue;
			dp[v3][v2] = v1;
			vs[v3][v2] = true;
			for (int i = 1;; i++) {
				ll v23 = min(v2 + cd[v3].first * i,(ll)2501),nv1= cd[v3].second * i + v1;
				if (dp[v3][v23] != -1&&dp[v3][v23]<=nv1)break;
				dp[v3][v23] = nv1;
				q.push(mk(-nv1, mk(v23, v3)));
				if (v2 + cd[v3].first * i >= 2501)break;
			}

			for (int i = 0; i < g[v3].size(); i++) {
				if (v2 - g[v3][i].second.first < 0)continue;
				ll ni = g[v3][i].first,nv1=v1+g[v3][i].second.second,nv2= v2 - g[v3][i].second.first;
				if (dp[ni][nv2] != -1&&dp[ni][nv2]<=nv1)continue;
				q.push(mk(-nv1, mk(nv2, ni)));
				dp[ni][nv2] = nv1;
			}
		}
	}
	return 0;
}


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

#include<iostream>
#include<string>
#include<iomanip>
#include<cmath>
#include<vector>
#include<algorithm>
#include<utility>
#include<queue>

using namespace std;

#define int long long
#define endl "\n"

constexpr long long INF = (long long)1e18;
constexpr long long MOD = 1'000'000'007; 

struct fast_io {
	fast_io(){
		std::cin.tie(nullptr);
		std::ios::sync_with_stdio(false);
	};
// } ;
} fio;

void dijkstra(int s, vector<int> &d, vector<vector<pair<int,int>>> &G){
	priority_queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>>> q;
	
	d.clear();
	d.resize(G.size(),INF);
	d[s] = 0;
	q.push(make_pair(0,s));
	
	while(!q.empty()){
		pair<int,int> p = q.top();q.pop();
		int v = p.second;
		
		if(d[v] < p.first) continue;
		
		for(pair<int,int> e : G[v]){
			if(d[e.first] > d[v] + e.second){
				d[e.first] = d[v] + e.second;
				q.push(make_pair(d[e.first],e.first));
			}
		}
	}	
}

signed main(){
	cout<<fixed<<setprecision(10);
	
	const int maxA = 52;
	int N, M, S;
	int Z;
	vector<int> d;
	vector<vector<pair<int,int>>> G;
	vector<vector<pair<int,pair<int,int>>>> g;
	
	cin>>N>>M>>S;
	
	Z = M * maxA;
	
	G.resize(N * Z);
	g.resize(N);
	
	
	for(int i = 0; i < M; i++){// cout<<i<<endl;
		int U, V, A, B;
		
		cin>>U>>V>>A>>B;
		
		U--, V--;
		
		g[U].push_back({V,{A,B}});
		g[V].push_back({U,{A,B}});
	}
	
	for(int i = 0; i < N; i++){
		int C, D;
		
		cin>>C>>D;
		
		for(int j = 0; j < Z; j++){
			for(int k = 0; k < g[i].size(); k++){
				int A = g[i][k].second.first;
				int B = g[i][k].second.second;
				if(j - A < 0) continue;
				G[i * Z + j].push_back({g[i][k].first * Z + j - A, B});
				// G[g[i][k].first * Z + j - g[i][k].second.first ].push_back({i * Z + j,g[i][k].second.second});
			}
		}
		
		for(int j = 0; j < Z; j++){
			G[i * Z + j].push_back({i * Z + min(Z-1, j + C),D});
		}
	}
	
	S = min(S, Z-1);
	
	dijkstra(Z * 0 + S, d, G);
	
	
	for(int i = 1; i < N; i++){
		int ans = INF;
		for(int j = 0; j < Z; j++){
			ans = min(ans, d[i * Z + j]);
		}
		
		cout<<ans<<endl;
	}
	
	return 0;
}

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

import java.util.*;
 
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int m = sc.nextInt();
    int ginka = sc.nextInt(); 
    int move_time = new int[n][n];
    int move_fee = new int[n][n];
    int change_amount = new int[n];
    int change_time = new int[n];
    for(int i = 0; i<m ; i++){
      int src = sc.nextInt()-1;
      int dst = sc.nextInt()-1;
      move_time[src][dst] = sc.nextInt();
      move_time[dst][src] = move_time[src][dst];
      move_fee[src][dst] = sc.nextInt();
      move_fee[dst][src] = move_fee[src][dst];
    }
    for(int t = 1 ; t<n ; t++){
      // どう途中結果を格納すべきかわからん
    }
  }
}

Compiler output:
Main.java:9: error: incompatible types: int[][] cannot be converted to int
    int move_time = new int[n][n];
                    ^
Main.java:10: error: incompatible types: int[][] cannot be converted to int
    int move_fee = new int[n][n];
                   ^
Main.java:11: error: incompatible types: int[] cannot be converted to int
    int change_amount = new int[n];
                        ^
Main.java:12: error: incompatible types: int[] cannot be converted to int
    int change_time = new int[n];
                      ^
Main.java:16: error: array required, but int found
      move_time[src][dst] = sc.nextInt();
               ^
Main.java:17: error: array required, but int found
      move_time[dst][src] = move_time[src][dst];
               ^
Main.java:17: error: array required, but int found
      move_time[dst][src] = move_time[src][dst];
                                     ^
Main.java:18: error: array required, but int found
      move_fee[src][dst] = sc.nextInt();
              ^
Main.java:19: error: array required, but int found
      move_fee[dst][src] = move_fee[src][dst];
              ^
Main.java:19: error: array required, but int found
      move_fee[dst][src] = move_fee[src][dst];
                                   ^
10 errors
Language: C++

#include <iostream>
#include <string>
#include <sstream>
#include <utility>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <cmath>
#include <functional>
#include <chrono>
#include <cstring>

using namespace std;
typedef long long lint;
typedef vector<int> vi;
typedef pair<int,int> pii;
typedef vector<lint> vl;
typedef pair<lint,lint> pll;

#define mpr make_pair


int main()
{
    ios_base::sync_with_stdio(0);    cin.tie(NULL);    cout.tie(NULL);

    lint n, m, s; cin>>n>>m>>s;
    vector<vector<pair<lint, pair<lint, lint>>>> mp(n+1); // son, coin, time
    for (lint i=0; i<m; ++i){
        lint u, v, a, b;
        cin>>u>>v>>a>>b;
        mp[u].push_back({v, {a,b}});
        mp[v].push_back({u, {a,b}});

    }
    vl c(n+1); vl time(n+1);
    for (int i=1; i<=n; ++i){
        cin>>c[i]>>time[i];
    }
    lint maxcoin = (n+5)*50;
    vector<vl> dp(n+1, vl(maxcoin+1, LONG_LONG_MAX));

    queue<pll> bfs;
    auto push = [&](lint city, lint coin, lint time){
        //if (coin > maxcoin) return;
        coin = min(coin, maxcoin);
        if (time < dp[city][coin]){
            dp[city][coin] = time;
            bfs.push({city, coin});
        }
    };

    push(1, s, 0);
    while (!bfs.empty()) {
        pll p = bfs.front(); bfs.pop();
        //move
        lint city = p.first;
        lint coin = p.second;
        lint curtime = dp[city][coin];
        for (pair<lint, pair<lint, lint>> str : mp[city]){
            lint son = str.first;
            lint cost = str.second.first;
            lint time = str.second.second;
            if (coin >= cost){
                push(son, coin - cost, time + curtime);
            }
        }
        //change
        push(city, coin + c[city], curtime + time[city]);

    }
    for (int i=2; i<=n; ++i){
        lint res = LONG_LONG_MAX;
        for (int c=0;c<=maxcoin; ++c){

            res = min(res, dp[i][c]);
        }
        cout<<res<<"\n";
    }


}


Compiler output:
a.cc: In function 'int main()':
a.cc:45:38: error: 'LONG_LONG_MAX' was not declared in this scope
   45 |     vector<vl> dp(n+1, vl(maxcoin+1, LONG_LONG_MAX));
      |                                      ^~~~~~~~~~~~~
Language: C

#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
using namespace __gnu_pbds;   
#define ordered_set tree<ll, null_type,less<ll>, rb_tree_tag,tree_order_statistics_node_update> 
#define ld long double
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define all(a) a.begin(),a.end()
#define sz(a) (ll)(a.size())
#define pp pair<ll,pair<int,int> >
const int M=52;
bool ed[M][M],vis[M][M*M];
int cst[M][M];ll c[M];
ll w[M][M],d[M];
ll dp[M][M*M],ans[M];
int main()
{
	ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
	int n,m,s;
	cin>>n>>m>>s;
	for(int i=1;i<=m;i++)
	{
		int u,v,a,b;
		cin>>u>>v>>a>>b;
		ed[u][v]=1;cst[u][v]=a;w[u][v]=b;
		swap(u,v);
		ed[u][v]=1;cst[u][v]=a;w[u][v]=b;	
	}
	for(int i=1;i<=n;i++)
		cin>>c[i]>>d[i];
	// cout<<c[2]<<" "<<d[2]<<endl;
	for(int i=1;i<=n;i++)
	{
		ans[i] = 1e18;
		for(int j=0;j<=2500;j++)
		{
			dp[i][j] = 1e18;
		}
	}
	if(s>2500)
		s=2500;
	dp[1][s] = 0;
	priority_queue<pp,vector<pp>,greater<pp> > pq;
	pq.push({dp[1][s],{1,s}});
	int ct = 0;
	while(!pq.empty())
	{
		auto P = pq.top();
		pq.pop();
		int x = P.ss.ff;
		ll y = P.ss.ss;
		if(vis[x][y])
			continue;
		vis[x][y]=1;
		ans[x] = min(ans[x],P.ff);
		ll p=c[x]+y;
		p=min(p,(ll)2500);
		if(dp[x][p]>dp[x][y]+d[x])
		{
			dp[x][p]=dp[x][y]+d[x];
			pq.push({dp[x][p],{x,p}});
		}
		for(int u=1;u<=n;u++)
		{
			if(ed[x][u]==0)
				continue;
			if(cst[x][u]<=y)
			{
				if(dp[u][y-cst[x][u]]>dp[x][y]+w[x][u])
				{
					dp[u][y-cst[x][u]]=dp[x][y]+w[x][u];
					pq.push({dp[u][y-cst[x][u]],{u,y-cst[x][u]}});
				}
			}
		}
	}
	for(int i=2;i<=n;i++)
		cout<<ans[i]<<"\n";
	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<iomanip>
#include<cassert>
#include<math.h>
#include<complex>
#include<algorithm>
#include<utility>
#include<queue>
#include<string.h>
#include<string>
#include<set>
#include<map>
#include<unordered_map>
#include<functional>
#include<vector>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
const ll INF=2e18;
const ll MOD=1e9+7;
typedef pair<ll,P> Node;
ll N,M,S;
struct Edge{
    ll to,cost,time;
};
ll d[51][2501];
ll C[51],D[51];
vector<Edge> edgeList[51];
int main(){
    cin>>N>>M>>S;
    for(ll i=0;i<M;i++){
        ll u,v,a,b;
        cin>>u>>v>>a>>b;
        u--;v--;
        edgeList[u].push_back(Edge{v,a,b});
        edgeList[v].push_back(Edge{u,a,b});
    }
    for(ll i=0;i<N;i++){
        cin>>C[i]>>D[i];
    }
    for(ll i=0;i<N;i++){
        for(ll j=0;j<=50*N;j++){
            d[i][j]=INF;
        }
    }
    priority_queue<Node,vector<Node>,greater<Node>> pq;
    pq.push(Node(0,P(0,min(S,50*N))));
    d[0][min(S,50*N)]=0;
    while(!pq.empty()){
        ll now=pq.top().second.first;
        ll nowS=pq.top().second.second;
        ll nowTime=pq.top().first;
        pq.pop();
        if(nowTime>d[now][nowS])continue;
        for(auto e:edgeList[now]){
            if(nowS-e.cost<0)continue;
            ll newTime=nowTime+e.time;
            if(d[e.to][nowS-e.cost]>newTime){
                d[e.to][nowS-e.cost]=newTime;
                pq.push(Node(newTime,P(e.to,nowS-e.cost)));
            }
        }
        for(ll i=1;nowS+i*C[now]<=50*N;i++){
            ll newTime=nowTime+D[now]*i;
            ll newS=nowS+i*C[now];
            if(d[now][newS] > newTime){
                d[now][newS]=newTime;
                pq.push(Node(newTime,P(now,newS)));
            }
        }
    }
    for(ll i=1;i<N;i++){
        ll ans=INF;
        for(ll j=0;j<=50*N;j++){
            ans=min(ans,d[i][j]);
        }
        cout<<ans<<endl;
    }
    return 0;
}

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

//#include<bits\stdc++.h>
#include<iostream>
#include<iomanip>
#include<cstdio>
#include<cstring>
#include<string>
#include<ctime>
#include<cmath>
#include<cctype>
#include<cstdlib>
#include<queue>
#include<deque>
#include<stack>
#include<vector>
#include<algorithm>
#include<utility>
#include<bitset>
#include<set>
#include<map>
#define ll long long
#define db double
#define INF 1000000000
#define ldb long double
#define pb push_back
#define get(x) x=read()
#define gt(x) scanf("%d",&x)
#define gi(x) scanf("%lf",&x)
#define put(x) printf("%d\n",x)
#define putl(x) printf("%lld\n",x)
#define gc(a) scanf("%s",a+1)
#define rep(p,n,i) for(RE ll i=p;i<=n;++i)
#define go(x) for(ll i=lin[x],tn=ver[i];i;tn=ver[i=nex[i]])
#define fep(n,p,i) for(RE ll i=n;i>=p;--i)
#define pii pair<ll,ll>
#define mk make_pair
#define RE register
#define P 1000000007
#define mod 998244353
#define S second 
#define F first
#define gf(x) scanf("%lf",&x)
#define pf(x) ((x)*(x))
#define ull unsigned long long
#define ui unsigned
#define zz p<<1
#define yy p<<1|1
using namespace std;
char buf[1<<15],*fs,*ft;
inline char getc()
{
    return (fs==ft&&(ft=(fs=buf)+fread(buf,1,1<<15,stdin),fs==ft))?0:*fs++;
}
inline ll read()
{
    register ll x=0,f=1;register char ch=getc();
    while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getc();}
    while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getc();}
    return x*f;
}
const ll MAXN=250;
ll n,m,S,cnt,len;
ll w[MAXN],vis[MAXN],c[MAXN],ans[MAXN];
ll lin[MAXN],ver[MAXN],nex[MAXN],e[MAXN],e1[MAXN];
struct wy
{
	ll x,v,s;
	ll friend operator < (wy a,wy b){return a.v>b.v;}
};
inline void add(ll x,ll y,ll z,ll z1)
{
	ver[++len]=y;
	nex[len]=lin[x];
	lin[x]=len;
	e[len]=z;
	e1[len]=z1;
}
priority_queue<wy>q;
inline void dij()
{
	q.push((wy){1,0,S});
	vis[1]=1;
	while(q.size())
	{
		wy cc=q.top();
		q.pop();
		if(!vis[cc.x])vis[cc.x]=cc.v,--cnt;
		if(!cnt)return;
		q.push((wy){cc.x,cc.v+w[cc.x],cc.s+c[cc.x]});
		go(cc.x)
		{
			if(cc.s>=e1[i])q.push((wy){tn,cc.v+e[i],cc.s-e1[i]});
		}
	}
}
signed main()
{
	//freopen("1.in","r",stdin);
	get(n);get(m);get(S);cnt=n-1;
	rep(1,m,i)
	{
		ll get(x),get(y),get(z1),get(z);
		add(x,y,z,z1);add(y,x,z,z1);
	}
	rep(1,n,i)get(c[i]),get(w[i]);
	dij();
	rep(2,n,i)putl(vis[i]);
	return 0;
}


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

#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<queue>
#include<stack>
#include<vector>
#include<map>
#define int long long
using namespace std;
const int maxn = 110;

int read(){
	int x=0,f=1;
	char c=getchar();
	while(!isdigit(c)){if(c=='-')f=-1;c=getchar();}
	while(isdigit(c)){x=(x<<3)+(x<<1)+c-48;c=getchar();}
	return x*f;
}

int to[maxn<<1],net[maxn<<1],h[maxn],w[maxn<<1],cost[maxn<<1],e=1;
inline void add(int x,int y,int C,int z){
	to[++e]=y;net[e]=h[x];h[x]=e;w[e]=z;cost[e]=C;
}

int k,m,n;
struct node{
	int u,v,a,b;
}p[maxn];	
int c[maxn],d[maxn];
int dp[51][2501],max_=2500;
queue<pair<int,int> > q;
signed main(){
	n=read();m=read();int s=read();
	for(register int i=1;i<=m;i++){
		p[i].u=read();p[i].v=read();p[i].a=read();p[i].b=read();
		add(p[i].u,p[i].v,p[i].a,p[i].b);
		add(p[i].v,p[i].u,p[i].a,p[i].b);
	}
	for(register int i=1;i<=n;i++){
		c[i]=read();d[i]=read();
	}
	memset(dp,0x3f,sizeof(dp));
	for(register int i=0;i<=min(s,max_);i++)dp[1][i]=0;
	for(register int i=s+1;i<=max_;i++){
		int x=max(i-c[1],0ll);
		dp[1][i]=dp[1][x]+d[1];
	}
	for(register int i=0;i<=max_;i++)q.push(make_pair(1,i));
	while(!q.empty()){
		int x=q.front().first,now=q.front().second;q.pop();
		//cout<<x<<" "<<now<<" "<<dp[x][now]<<endl;
		for(register int i=1;i*c[x]+now<=max_;i++){
			if(dp[x][i*c[x]+now]>dp[x][now]+i*d[x]){
				dp[x][i*c[x]+now]=dp[x][now]+i*d[x];
				q.push(make_pair(x,i*c[x]+now));
			}
		}
		for(register int i=h[x];i;i=net[i]){
			int y=to[i];
			if(cost[i]>now)continue;
			if(dp[y][now-cost[i]]>dp[x][now]+w[i]){
				dp[y][now-cost[i]]=dp[x][now]+w[i];
				q.push(make_pair(y,now-cost[i]));
			}
		}
	}
	for(register int i=2;i<=n;i++){
		int min_=1e15;
		for(register int j=0;j<=max_;j++)min_=min(min_,dp[i][j]);
		printf("%lld\n",min_);
	}
	return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
#pragma GCC optimization ("Ofast")
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,n) for(int i=1;i<n;i++)
#define all(v) v.begin(),v.end()
#define P pair<int,int>
#define siz(s) (int)s.size()

template<class T> inline bool chmin(T &a, T b) {
	if(a>b){a=b;return true;}
	return false;
}
template<class T> inline bool chmax(T &a, T b) {
	if(a<b){a=b;return true;}
	return false;
}
template<class T> inline int getidx(vector<T> &v, T a) {
	return lower_bound(all(v), a) - v.begin();
}

constexpr int mod=998244353;
constexpr int inf=3e18;

struct Edge{
	int to,cost,tim;
};
int N,M,S;
vector<Edge>G[50];
int dist[50][2505];
int C[50],D[50];
struct Q{
	int tim,mon,v;
	bool operator<(const Q &a)const{return tim>a.tim;}
	bool operator>(const Q &a)const{return tim<a.tim;}
};
signed main(){
	cin.tie(0);ios::sync_with_stdio(false);
	cin>>N>>M>>S;
	rep(i,M){
		int a,b,c,d;cin>>a>>b>>c>>d;a--;b--;
		G[a].push_back({b,c,d});
		G[b].push_back({a,c,d});
	}
	rep(i,N){
		cin>>C[i]>>D[i];
	}
	rep(i,N)rep(j,2501)dist[i][j]=inf;
	dist[0][min(S,2500ll)]=0;
	priority_queue<Q>que;
	que.push({0,min(S,2500ll),0});
	while(!que.empty()){
		Q p=que.top();que.pop();
		if(dist[p.v][p.mon]<p.tim)continue;
		if(dist[p.v][min(2500ll,p.mon+C[p.v])]>p.tim+D[p.v]){
			dist[p.v][min(2500ll,p.mon+C[p.v])]=p.tim+D[p.v];
			que.push({dist[p.v][min(2500ll,p.mon+C[p.v])],min(2500ll,p.mon+C[p.v]),p.v});
		}
		for(Edge e:G[p.v]){
			if(e.cost>p.mon)continue;
			if(dist[e.to][p.mon-e.cost]>p.tim+e.tim){
				dist[e.to][p.mon-e.cost]=p.tim+e.tim;
				que.push({dist[e.to][p.mon-e.cost],p.mon-e.cost,e.to});
			}
		}
	}
	REP(i,N){
		int ans=inf;
		rep(j,2501)chmin(ans,dist[i][j]);
		cout<<ans<<endl;
	}
}


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 ll long long
#define P pair<int,int>
#define fi first
#define se second
#define rep(i,n) for(int i=0;i<n;i++)
template<class T>void chmax(T &a,T b){if(a<b)a=b;}
template<class T>void chmin(T &a,T b){if(a>b)a=b;}
constexpr ll INF=1000000000000000000;
struct edge{int to,silver;ll cost;};
#define PP pair<ll,P>
int n,m,s,c[50];
ll d[50];
ll dist[50][2501];
vector<edge>v[50];
void dijkstra(){
    rep(i,50){
        rep(j,2501){
            dist[i][j]=INF;
        }
    }
    priority_queue<PP,vector<PP>,greater<PP>>q;
    q.push({0,{0,s}});
    dist[0][s]=0;
    while(!q.empty()){
        PP p=q.top();
        q.pop();
        if(dist[p.se.fi][p.se.se]!=p.fi)continue;
        for(int i=0;p.se.se+c[p.se.fi]*i<=2500;i++){
            for(edge e:v[p.se.fi]){
                if(p.se.se+c[p.se.fi]*i-e.silver<0)continue;
                if(dist[e.to][p.se.se+c[p.se.fi]*i-e.silver]>p.fi+d[p.se.fi]*i+e.cost){
                    dist[e.to][p.se.se+c[p.se.fi]*i-e.silver]=p.fi+d[p.se.fi]*i+e.cost;
                    q.push({dist[e.to][p.se.se+c[p.se.fi]*i-e.silver],{e.to,p.se.se+c[p.se.fi]*i-e.silver}});
                }
            }
        }
    }
}
int main(){
    cin>>n>>m>>s;
    chmin(s,2500);
    rep(i,m){
        int u,w,a;
        ll b;
        cin>>u>>w>>a>>b;
        u--,w--;
        v[u].pb({w,a,b});
        v[w].pb({u,a,b});
    }
    rep(i,n)cin>>c[i]>>d[i];
    dijkstra();
    rep(i,n){
        if(i){
            ll ans=INF;
            rep(j,2501)chmin(ans,dist[i][j]);
            cout<<ans<<endl;
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:49:14: error: 'class std::vector<edge>' has no member named 'pb'
   49 |         v[u].pb({w,a,b});
      |              ^~
a.cc:50:14: error: 'class std::vector<edge>' has no member named 'pb'
   50 |         v[w].pb({u,a,b});
      |              ^~
Language: C

#include <bits/stdc++.h>
#include <stdlib.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vec;
typedef vector<vec> mat;
typedef pair<ll,ll> P;
typedef priority_queue<P,vector<P>,greater<P>> P_queue;

#define REP(i,a,b) for(int i=(int)a;i<(int)b;i++)
#define rep(i,n) REP(i,0,n)
#define pb push_back
#define mp make_pair
#define ALL(a) a.begin(),a.end()
#define SORT(a) sort(ALL(a))
#define U_ERASE(V) V.erase(unique(ALL(V)), V.end());

const ll MOD=998244353;
const ll mod=1000000007;
const ll INF=1e15;
vec dx={1,0,-1,0};
vec dy={0,1,0,-1};

ll dp[51][5001];
ll Kokan[51][2];
ll Nedan[102];
ll Jikan[102];
vector<P> d[51];
int main(){
    ll N,M,S; cin>>N>>M>>S;
    rep(i,51) rep(j,5001) dp[i][j]=INF;
    if(S>=5000) S=5000;
    rep(i,M){
        ll U,V,A,B; cin>>U>>V>>A>>B;
        U--; V--;
        d[U].pb(mp(V,i));
        d[V].pb(mp(U,i));
        Nedan[i]=A;
        Jikan[i]=B;
    }
    rep(i,N) cin>>Kokan[i][0]>>Kokan[i][1];
    dp[0][S]=0;
    P_queue Q;
    Q.push(mp(0,S));
    vec ans(N,INF);
    ll count=0;
    while(!Q.empty()){
        ll A=Q.top().first, P=Q.top().second/10000, Money=Q.top().second%10000;
        //cout<<A<<' '<<P<<' '<<Money<<endl;
        if(ans[P]>A) {ans[P]=A; count++;}
        if(count==N) break;
        Q.pop();
        ll x=Money+Kokan[P][0];
        if(x>=5000) x=5000;
        if(Money!=5000) if(A+Kokan[P][1]<dp[P][x]) {dp[P][x]=A+Kokan[P][1]; Q.push(mp(A+Kokan[P][1],P*10000+x));}
        rep(i,d[P].size()){
            ll saki=d[P][i].first, Ned=Nedan[d[P][i].second], Jik=Jikan[d[P][i].second];
            if(Money-Ned>=0) if(A+Jik<dp[saki][Money-Ned]) {dp[saki][Money-Ned]=A+Jik; Q.push(mp(A+Jik,saki*10000+(Money-Ned)));}
        }
        
    }
    REP(i,1,N) cout<<ans[i]<<endl;

}

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;
#define ll long long
#define P pair<int,int>
#define fi first
#define se second
#define rep(i,n) for(int i=0;i<n;i++)
template<class T>void chmax(T &a,T b){if(a<b)a=b;}
template<class T>void chmin(T &a,T b){if(a>b)a=b;}
constexpr ll INF=1000000000000000000;
struct edge{int to,silver;ll cost;};
#define PP pair<ll,P>
int n,m,s,c[50];
ll d[50];
ll dist[50][2501];
vector<edge>v[50];
void dijkstra(){
    rep(i,50){
        rep(j,2501){
            dist[i][j]=INF;
        }
    }
    priority_queue<PP,vector<PP>,greater<PP>>q;
    q.push({0,{0,s}});
    dist[0][s]=0;
    while(!q.empty()){
        PP p=q.top();
        q.pop();
        if(dist[p.se.fi][p.se.se]!=p.fi)continue;
        for(int i=0;p.se.se+c[p.se.fi]*i<=2500;i++){
            for(edge e:v[p.se.fi]){
                if(p.se.se+c[p.se.fi]*i-e.silver<0)continue;
                if(dist[e.to][p.se.se+c[p.se.fi]*i-e.silver]>p.fi+d[p.se.fi]*i+e.cost){
                    dist[e.to][p.se.se+c[p.se.fi]*i-e.silver]=p.fi+d[p.se.fi]*i+e.cost;
                    q.push({dist[e.to][p.se.se+c[p.se.fi]*i-e.silver],{e.to,p.se.se+c[p.se.fi]*i-e.silver}});
                }
            }
        }
    }
}
int main(){
    cin>>n>>m>>s;
    chmin(s,2500);
    rep(i,m){
        int u,w,a;
        ll b;
        cin>>u>>w>>a>>b;
        u--,w--;
        v[u].pb({w,a,b});
        v[w].pb({u,a,b});
    }
    rep(i,n)cin>>c[i]>>d[i];
    dijkstra();
    rep(i,n){
        if(i){
            int ans=INF;
            rep(j,2501)chmin(ans,dist[i][j]);
            cout<<ans<<endl;
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:49:14: error: 'class std::vector<edge>' has no member named 'pb'
   49 |         v[u].pb({w,a,b});
      |              ^~
a.cc:50:14: error: 'class std::vector<edge>' has no member named 'pb'
   50 |         v[w].pb({u,a,b});
      |              ^~
a.cc:56:21: warning: overflow in conversion from 'long long int' to 'int' changes value from '1000000000000000000' to '-1486618624' [-Woverflow]
   56 |             int ans=INF;
      |                     ^~~
a.cc:57:29: error: no matching function for call to 'chmin(int&, long long int&)'
   57 |             rep(j,2501)chmin(ans,dist[i][j]);
      |                        ~~~~~^~~~~~~~~~~~~~~~
a.cc:9:23: note: candidate: 'template<class T> void chmin(T&, T)'
    9 | template<class T>void chmin(T &a,T b){if(a>b)a=b;}
      |                       ^~~~~
a.cc:9:23: note:   template argument deduction/substitution failed:
a.cc:57:29: note:   deduced conflicting types for parameter 'T' ('int' and 'long long int')
   57 |             rep(j,2501)chmin(ans,dist[i][j]);
      |                        ~~~~~^~~~~~~~~~~~~~~~
Language: C

//raja1999

//#pragma comment(linker, "/stack:200000000")
//#pragma GCC optimize("Ofast")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,avx,avx2")

#include <bits/stdc++.h>
#include <vector>
#include <set>
#include <map>
#include <string> 
#include <cstdio>
#include <cstdlib>
#include <climits>
#include <utility>
#include <algorithm>
#include <cmath>
#include <queue>
#include <stack>
#include <iomanip> 
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp> 
//setbase - cout << setbase (16)a; cout << 100 << endl; Prints 64
//setfill -   cout << setfill ('x') << setw (5); cout << 77 <<endl;prints xxx77
//setprecision - cout << setprecision (14) << f << endl; Prints x.xxxx
//cout.precision(x)  cout<<fixed<<val;  // prints x digits after decimal in val

using namespace std;
using namespace __gnu_pbds;
#define f(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) f(i,0,n)
#define fd(i,a,b) for(i=a;i>=b;i--)
#define pb push_back
#define mp make_pair
#define vi vector< int >
#define vl vector< ll >
#define ss second
#define ff first
#define ll long long
#define pii pair< int,int >
#define pll pair< ll,ll >
#define sz(a) a.size()
#define inf (1000*1000*1000+5)
#define all(a) a.begin(),a.end()
#define tri pair<int,pii>
#define vii vector<pii>
#define vll vector<pll>
#define viii vector<tri>
#define mod (1000*1000*1000+7)
#define pqueue priority_queue< int >
#define pdqueue priority_queue< tri,vector<tri> ,greater< tri > >
#define int ll

typedef tree<
int,
null_type,
less<int>,
rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;


//std::ios::sync_with_stdio(false);
pdqueue pq;
int c[55],d[55],dist[55][3005];
vector<vi>adj(55),cost(55),wt(55);
pii par[55][3005];
main(){
	std::ios::sync_with_stdio(false); cin.tie(NULL);
	double clk=clock();
	int n,m,s,u,v,a,b,i,j,dis,x,y,ans,y1;
	tri p;
	cin>>n>>m>>s;
	rep(i,m){
		cin>>u>>v>>a>>b;
		u--;
		v--;
		adj[u].pb(v);
		adj[v].pb(u);
		cost[u].pb(a);
		cost[v].pb(a);
		wt[u].pb(b);
		wt[v].pb(b);
	}
	rep(i,n){
		cin>>c[i]>>d[i];
	}
	s=min(s,2502LL);
	int iinf=inf;
	iinf*=inf;
	rep(i,n){
		rep(j,2503){
			dist[i][j]=iinf;
		}
	}
	dist[0][s]=0;
	pq.push(mp(dist[0][s],mp(0,s)));
	while(!pq.empty()){
		p=pq.top();
		dis=p.ff;
		x=p.ss.ff;
		y=p.ss.ss;
		pq.pop();
		if(dist[x][y]<dis){
			continue;
		}
		rep(i,adj[x].size()){
			if(y>=cost[x][i]){
				if(dist[adj[x][i]][y-cost[x][i]]>dis+wt[x][i]){
					par[adj[x][i]][y-cost[x][i]]=mp(x,y);
					dist[adj[x][i]][y-cost[x][i]]=dis+wt[x][i];
					pq.push(mp(dist[adj[x][i]][y-cost[x][i]],mp(adj[x][i],y-cost[x][i])));
				}
			}
		}
		y1=y;
		dis+=d[x];
		y+=c[x];
		while(y<2503){
			if(dist[x][y]>dis){
				par[x][y]=mp(x,y1);
				dist[x][y]=dis;
				pq.push(mp(dis,mp(x,y)));
			}
			dis+=d[x];
			y+=c[x];
		}
	}
	//cout<<dist[0][3]<<endl;
	f(i,1,n){
		ans=iinf;
		rep(j,2503){
			ans=min(ans,dist[i][j]);
		}
		cout<<ans<<endl;
	}
	//cerr<<(clock()-clk)/CLOCKS_PER_SEC<<endl;
	return 0;
} 


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

#include<iostream>
#include<string>
#include<cstdio>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<bitset>
#include<stack>
#include<unordered_map>
#include<utility>
#include<tuple>
using namespace std;
typedef long long ll;
typedef unsigned int ui;
const ll mod = 1000000007;
const ll INF = (ll)1000000007 * 1000000007;
typedef pair<int, int> P;
#define stop char nyaa;cin>>nyaa;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define Per(i,sta,n) for(int i=n-1;i>=sta;i--)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
typedef long double ld;
const ld eps = 1e-8;
const ld pi = acos(-1.0);
typedef pair<ll, ll> LP;
int dx[4]={1,-1,0,0};
int dy[4]={0,0,1,-1};

template <typename T>
vector<T> dijkstra(int s,vector<vector<pair<T,int>>> & G){
    const T inf=numeric_limits<T>::max();
    using edge=pair<T,int>;
    priority_queue<edge, vector<edge>, greater<edge> > que;
    int n=G.size();
    vector<T> d(n,inf);
    vector<int> b(n,-1);
    d[s]=0;
    que.emplace(d[s],s);
    while (!que.empty()){
        edge p = que.top(); que.pop();
        int v = p.second;
        if (d[v]<p.first) continue;
        for(auto& e:G[v]){
            int u=e.second;
            T c=e.first;
            if (d[u]>d[v]+c){
                d[u]=d[v]+c;
                b[u]=v;
                que.emplace(d[u],u);
            }
        }
    }
    return d;
}

int n,m,S,max_c=0;
int u[155],v[155],a[155],b[155],c[55],d[55];
vector<vector<pair<ll,int>>> G;

void solve(){
    cin >> n >> m >> S;
    rep(i,m){
        cin >> u[i] >> v[i] >> a[i] >> b[i];
        u[i]--;v[i]--;
        max_c+=a[i];
    }
    rep(i,n){
        cin >> c[i] >> d[i];
    }
    max_c+=1;
    G.resize(n*max_c);
    rep(i,m){
        rep(t,max_c){
            if(t>=a[i]){
                G[u[i]*max_c+t].emplace_back(b[i],v[i]*max_c+t-a[i]);
                G[v[i]*max_c+t].emplace_back(b[i],u[i]*max_c+t-a[i]);
            }
        }
    }
    //cout << G.size() << endl;
    rep(i,n){
        rep(t,max_c){
            G[i*max_c+t].emplace_back(d[i],i*max_c+min(max_c-1,t+c[i]));
        }
    }
    vector<ll> D=dijkstra(0+min(max_c-1,S),G);
    //cout << D.size() << endl;
    Rep(t,1,n){
        ll ans=INF;
        rep(j,max_c){
            ans=min(ans,D[t*max_c+j]);
        }
        cout << ans << endl;
    }
}

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout << fixed << setprecision(50);
    solve();
}

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

#include <bits/stdc++.h>

using namespace std;

#define INF 100000000
#define YJ 1145141919
#define INF_INT_MAX 2147483647
#define INF_LL 9223372036854775
#define INF_LL_MAX 9223372036854775807
#define EPS 1e-10
#define MOD 1000000007
#define MOD9 998244353
#define Pi acos(-1)
#define LL long long
#define ULL unsigned long long
#define LD long double

#define int long long

using II = pair<int, int>;

int gcd(int a, int b) { return b != 0 ? gcd(b, a % b) : a; }
int lcm(int a, int b) { return a * b / gcd(a, b); }
int extgcd(int a, int b, int &x, int &y) { int g = a; x = 1; y = 0; if (b != 0) g = extgcd(b, a % b, y, x), y -= (a / b) * x; return g; }

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(a)  begin((a)), end((a))
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())

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

int N, M, S;
struct E {
  E(int to = 0, int a = 0, int b = 0) : to(to), a(a), b(b) {}
  int to, a, b;
};
vector<E> edge[MAX_N];
int C[MAX_N];
int D[MAX_N];

int dist[MAX_N][MAX_MONEY+1];

struct P {
  P(int cost = 0, int pos = 0, int money = 0) : cost(cost), pos(pos), money(money) {}
  int cost;
  int pos, money;
  const bool operator < (const P& p) const {
    return cost < p.cost;
  }
  const bool operator > (const P& p) const {
    return cost > p.cost;
  }
};

signed main()
{
  cin >> N >> M >> S;
  S = min(S, MAX_MONEY);
  REP(m,M) {
    E e;
    int f, t, a, b;
    cin >> f >> t >> a >> b;
    f--; t--;
    edge[f].push_back(E(t,a,b));
    edge[t].push_back(E(f,a,b));
  }
  REP(n,N) {
    cin >> C[n] >> D[n];
  }

  REP(n,MAX_N) {
    REP(j,2501) {
      dist[n][j] = INF_LL;
    }
  }
  dist[0][S] = 0;

  priority_queue<P, vector<P>, greater<P>> pq;
  pq.push(P(0,0,S));
  while(pq.size()) {
    P p = pq.top(); pq.pop();
    if (dist[p.pos][p.money] < p.cost) continue;

    // お金の両替
    if (p.money + C[p.pos] <= MAX_MONEY) {
      if (dist[p.pos][p.money + C[p.pos]] > p.cost + D[p.pos]) {
        dist[p.pos][p.money + C[p.pos]] = p.cost + D[p.pos];
        pq.push(P(dist[p.pos][p.money + C[p.pos]], p.pos, p.money + C[p.pos]));
      }
    }

    // 移動
    for(E e : edge[p.pos]) {
      if (e.a <= p.money) {
        if (dist[e.to][p.money - e.a] > p.cost + e.b) {
          dist[e.to][p.money - e.a] = p.cost + e.b;
          pq.push(P(dist[e.to][p.money - e.a], e.to, p.money-e.a));
        }
      }
    }
  }

  FOR(i,1,N) {
    int ans = INF_LL;
    REP(n,MAX_MONEY+1) {
      ans = min(ans, dist[i][n]);
    }
    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<algorithm>
#include<vector>
#include<string>
#include<cmath>
#include<map>
#include<iomanip>
#define rip(i,n) for(int i=0;i<n;i++)
#define ll long long
#define lb long double
#define vec vector<int>
#define vec2 vector<vector<int>>
#define set setprecision
#define mod 1000000007
#define pi 3.14159265
#include<numeric>
using namespace std;
int gcd(int a, int b)
{
	if (a % b == 0)	return(b);
	else return(gcd(b, a % b));
}
int lcm(int a, int b)
{
	return a * b / gcd(a, b);
}
ll pow(ll a, ll b) {	ll k = b % 30000, h = b / 30000, s = 1;
	rip(i, 30000)s = (s * a) % mod; ll j = 1;
	if (h != 0)rip(i, h)j = j * s % mod;
	if (k != 0)rip(i, k)j = j * a % mod;
	return(j);}
ll ketasuu(ll n) {for (int i = 1; i < 100; i++)if (pow(10, i - 1) <= n && n < pow(10, i)) {return (i);break;}}
int main() {
	int n;
    cin >> n;
    vector<int.a(n);
    vector<int>b(n);
    vector<int>c(n);
    vector<int>d(n);
    rip(i,n){
    cin >> a[i];
    }
    rip(i,n)cin >> b[i];
    rip(i,n)cin >> c[i];
    rip(j,n)cin >> d[i];
    cout << "-1" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:36:19: error: template argument 1 is invalid
   36 |     vector<int.a(n);
      |                   ^
a.cc:36:19: error: template argument 2 is invalid
a.cc:41:12: error: 'a' was not declared in this scope
   41 |     cin >> a[i];
      |            ^
a.cc:45:22: error: 'i' was not declared in this scope
   45 |     rip(j,n)cin >> d[i];
      |                      ^
a.cc: In function 'long long int ketasuu(long long int)':
a.cc:32:110: warning: control reaches end of non-void function [-Wreturn-type]
   32 | ll ketasuu(ll n) {for (int i = 1; i < 100; i++)if (pow(10, i - 1) <= n && n < pow(10, i)) {return (i);break;}}
      |                                                                                                              ^
Language: C++

#include<bits/stdc++.h>

int main() {
	using namespace std;
	ios_base::sync_with_stdio(false), cin.tie(nullptr);
	int N; cin >> N;
	struct constraint {
		bool z;
		uint64_t v;
	};
	vector<constraint> rows(N);
	vector<constraint> cols(N);
	for (int i = 0; i < N; i++) cin >> rows[i].z;
	for (int j = 0; j < N; j++) cin >> cols[j].z;

	for (int i = 0; i < N; i++) cin >> rows[i].v;
	for (int j = 0; j < N; j++) cin >> cols[j].v;

	auto id = [](bool z) -> uint64_t { return z ? uint64_t(0) : ~uint64_t(0); };
	auto op = [](bool z, uint64_t a, uint64_t b) -> uint64_t { return z ? (a | b) : (a & b); };

	uint64_t row_accum[2] = {id(0), id(1)};
	for (int i = 0; i < N; i++) {
		for (int z = 0; z < 2; z++) {
			row_accum[z] = op(z, row_accum[z], rows[i].v);
		}
	}
	uint64_t col_accum[2] = {id(0), id(1)};
	for (int j = 0; j < N; j++) {
		for (int z = 0; z < 2; z++) {
			col_accum[z] = op(z, col_accum[z], cols[j].v);
		}
	}

	vector<bool> row_parity(N);
	{
		bool cur_parity[2] = {true, true};
		for (int i = 0; i < N; i++) {
			row_parity[i] = (cur_parity[rows[i].z] ^= 1);
		}
	}
	vector<bool> col_parity(N);
	{
		bool cur_parity[2] = {true, true};
		for (int j = 0; j < N; j++) {
			col_parity[j] = (cur_parity[cols[j].z] ^= 1);
		}
	}

	auto get_cell = [&](int i, int j) -> uint64_t {
		const auto& [rz, rv] = constraint(rows[i]);
		const auto& [cz, cv] = constraint(cols[j]);
		if (rz == cz) {
			return op(!rz, rv, cv);
		} else {
			if (row_parity[i] ^ col_parity[j]) {
				return op(!cz, cv, op(!rz, ~row_accum[cz], rv));
			} else {
				return op(!rz, rv, op(!cz, ~col_accum[rz], cv));
			}
		}
	};

	vector<vector<uint64_t>> ans(N, vector<uint64_t>(N));
	for (int i = 0; i < N; i++) {
		for (int j = 0; j < N; j++) {
			ans[i][j] = get_cell(i, j);
		}
	}

	for (int i = 0; i < N; i++) {
		uint64_t v = id(rows[i].z);
		for (int j = 0; j < N; j++) {
			v = op(rows[i].z, v, ans[i][j]);
		}
		if (v != rows[i].v) {
			cout << -1 << '\n';
			exit(0);
		}
	}
	for (int j = 0; j < N; j++) {
		uint64_t v = id(cols[j].z);
		for (int i = 0; i < N; i++) {
			v = op(cols[j].z, v, ans[i][j]);
		}
		if (v != cols[j].v) {
			cout << -1 << '\n';
			exit(0);
		}
	}
	for (int i = 0; i < N; i++) {
		for (int j = 0; j < N; j++) {
			cout << ans[i][j] << " \n"[j+1==N];

	}

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:98:2: error: expected '}' at end of input
   98 | }
      |  ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C

#include "bits/stdc++.h"
#define FI first.first
#define SE first.second
#define TH second
#define fi first
#define se second
#define th second

using namespace std;

void debug_out() { cerr << endl; }
 
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}
 
#ifdef DEBUG
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif

class DebugStream {}LOG;
template <typename T>DebugStream &operator<<(DebugStream &s, const T&) { return s; }
#ifdef DEBUG
#define LOG clog
#endif

typedef unsigned long long ll;
typedef pair<ll, ll> ii;
typedef long double ld;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());

const int maxN = 500 + 9, maxV = 1e6 + 9, MOD = 1e9 + 7, SQ = 335, lg = 20, bs = 29;

vector<int> s, t;
vector<ll> u, v;
int n;
ll mat[maxN][maxN];

void no() {
	cout << "-1\n"; exit(0);
}

void transp() {
	for(int i = 0; i < n; i++)
		for(int j = 0; j < i; j++) swap(mat[i][j], mat[j][i]);
	swap(s, t);
	swap(u, v);
}

void cumplands() {
	for(int i = 0; i < n; i++) {
		if(s[i]) continue;
		ll crv = ~(ll(0));
		for(int j = 0; j < n; j++) crv &= mat[i][j];
		if(crv != u[i]) no();
	}
}

void otsolv() {
	vector<int> inds;
	for(int i = 0; i < n; i++)
		if(!t[i]) inds.push_back(i);
	ll totv = ~(ll(0));
	int w = 0, amo = 0;
	for(int i = 0; i < n; i++) {
		if(!s[i]) continue;
		ll crv = 0;
		for(int j = 0; j < n; j++) crv |= mat[i][j];
		if((crv | u[i]) != u[i]) no();
		crv = u[i] ^ crv;
		if(!crv) continue;
		if(inds.empty()) no();
		mat[i][inds[w++]] |= crv;
		totv &= crv, amo++;
		w %= inds.size();
	}
	if(inds.size() == 1 && amo == n && totv) no();
}
	
int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	#ifdef DEBUG
	freopen("input.txt", "r", stdin);
	#endif

	cin >> n;
	s.resize(n);
	t.resize(n);
	u.resize(n);
	v.resize(n);
	for(int i = 0; i < n; i++) cin >> s[i];
	for(int i = 0; i < n; i++) cin >> t[i];
	for(int i = 0; i < n; i++) cin >> u[i];
	for(int i = 0; i < n; i++) cin >> v[i];

	for(int i = 0; i < n; i++) {
		for(int j = 0; j < n; j++) {
			if(!s[i]) mat[i][j] |= u[i];
			if(!t[i]) mat[i][j] |= v[j];
			if(s[i] && t[i]) mat[i][j] = u[i] & v[j];
		}
	}

	for(int u = 0; u < 2; u++, transp()) cumplands();
	for(int u = 0; u < 2; u++, transp())
		otsolv();

	for(int i = 0; i < n; i++, cout << '\n')
		for(int j = 0; j < n; j++) cout << mat[i][j] << ' ';
}



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