Language: C++

#include<map>
#include<set>
#include<queue>
#include<cmath>
#include<cstdio>
#include<vector>
#include<string>
#include<cstring>
#include<iostream>
#include<algorithm>
#define lc (x<<1)
#define rc (x<<1|1)
#define gc getchar()//(p1==p2&&(p2=(p1=buf)+fread(buf,1,size,stdin),p1==p2)?EOF:*p1++)
#define mk make_pair
#define pi pair<int,int>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int N=55,M=N*N,size=1<<20;

//char buf[size],*p1=buf,*p2=buf;
template<class o> void qr(o &x) {
	char c=gc; x=0; int f=1;
	while(!isdigit(c)){if(c=='-')f=-1; c=gc;}
	while(isdigit(c)) x=x*10+c-'0',c=gc;
	x*=f;
}
template<class o> void qw(o x) {
	if(x/10) qw(x/10);
	putchar(x%10+'0');
}
template<class o> void pr1(o x) {
	if(x<0)x=-x,putchar('-');
	qw(x); putchar(' ');
}
template<class o> void pr2(o x) {
	if(x<0)x=-x,putchar('-');
	qw(x); puts("");
}

int n,m,s;
ll f[N][M*2],sil[N],time[N],ans[N];
struct edge{int y,next,d,t;}a[M]; int len,last[N];
void ins(int x,int y,int d,int t) {a[++len]=(edge){y,last[x],d,t}; last[x]=len;}

pi q[N*M*2];
int l,r;

void spfa() {
	q[l=r=1]=mk(1,min(s,M-1));r++;
	while(l!=r) {
		int x=q[l].first; s=q[l].second;l++; if(l==N*M*2-5)l=1;
		ans[x]=min(ans[x],f[x][s]);
		if(s+sil[x]<M*2&&f[x][s]+time[x]<f[x][s+sil[x]]) {
			f[x][s+sil[x]]=f[x][s]+time[x];
			q[r++]=mk(x,s+sil[x]);
			if(r==N*M*2-5) r=1;
		}
		for(int k=last[x],y,d,t;k;k=a[k].next) {
			y=a[k].y; d=a[k].d; t=a[k].t;
			if(s>=d&&f[x][s]+t<f[y][s-d]) {
				f[y][s-d]=f[x][s]+t;
				q[r++]=mk(y,s-d);
				if(r==N*M*2-5) r=1;
			}
		}
	}
}

int main() {
	qr(n); qr(m); qr(s);
	for(int i=1,X,Y,D,T;i<=m;i++)
		qr(X),qr(Y),qr(D),qr(T),ins(X,Y,D,T),ins(Y,X,D,T);
	memset(f,63,sizeof f);
	memset(ans,63,sizeof ans);
	for(int i=1;i<=n;i++) qr(sil[i]),qr(time[i]),sil[i]=min((int)sil[i],M-1);
	f[1][min(s,M-1)]=0;
	spfa();
	for(int i=2;i<=n;i++) pr2(ans[i]);
	return 0;
}



Compiler output:
a.cc:42:27: error: 'll time [55]' redeclared as different kind of entity
   42 | ll f[N][M*2],sil[N],time[N],ans[N];
      |                           ^
In file included from /usr/include/pthread.h:23,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157,
                 from /usr/include/c++/14/ext/atomicity.h:35,
                 from /usr/include/c++/14/bits/ios_base.h:39,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:9:
/usr/include/time.h:76:15: note: previous declaration 'time_t time(time_t*)'
   76 | extern time_t time (time_t *__timer) __THROW;
      |               ^~~~
a.cc: In function 'void spfa()':
a.cc:54:48: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   54 |                 if(s+sil[x]<M*2&&f[x][s]+time[x]<f[x][s+sil[x]]) {
      |                                                ^
a.cc:54:41: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   54 |                 if(s+sil[x]<M*2&&f[x][s]+time[x]<f[x][s+sil[x]]) {
      |                                  ~~~~~~~^~~~~~~~
a.cc:54:49: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   54 |                 if(s+sil[x]<M*2&&f[x][s]+time[x]<f[x][s+sil[x]]) {
      |                                  ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
a.cc:55:54: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   55 |                         f[x][s+sil[x]]=f[x][s]+time[x];
      |                                                      ^
a.cc:55:47: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   55 |                         f[x][s+sil[x]]=f[x][s]+time[x];
      |                                        ~~~~~~~^~~~~~~~
a.cc:55:47: error: invalid conversion from 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} to 'll' {aka 'long long int'} [-fpermissive]
   55 |                         f[x][s+sil[x]]=f[x][s]+time[x];
      |                                        ~~~~~~~^~~~~~~~
      |                                               |
      |                                               time_t (*)(time_t*) noexcept {aka long int (*)(long int*) noexcept}
a.cc: In function 'int main()':
a.cc:76:51: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   76 |         for(int i=1;i<=n;i++) qr(sil[i]),qr(time[i]),sil[i]=min((int)sil[i],M-1);
      |                                                   ^
a.cc: In instantiation of 'void qr(o&) [with o = long int(long int*) noexcept]':
a.cc:76:37:   required from here
   76 |         for(int i=1;i<=n;i++) qr(sil[i]),qr(time[i]),sil[i]=min((int)sil[i],M-1);
      |                                          ~~^~~~~~~~~
a.cc:23:21: error: assignment of read-only reference 'x'
   23 |         char c=gc; x=0; int f=1;
      |                    ~^~
a.cc:25:30: error: invalid operands of types 'long int(long int*) noexcept' and 'int' to binary 'operator*'
   25 |         while(isdigit(c)) x=x*10+c-'0',c=gc;
      |                             ~^~~
a.cc:26:10: error: invalid operands of types 'long int(long int*) noexcept' and 'int' to binary 'operator*'
   26 |         x*=f;
      |         ~^~~
a.cc:26:10: note:   in evaluation of 'operator*=(long int(long int*) noexcept, int)'