Language: C++

#include <iostream>
#include <vector>
#include <cstring>
using namespace std;

int time[1000];
int x[1000],y[1000];

int main(void){
	int n;
	cin>>n;

	while(n--){
		int N,X,Y;
		double sx,sy;
		cin>>N>>X>>Y>>sx>>sy;

		for(int i=0;i<N;i++) cin>>x[i]>>y[i];

		vector<int> t[N];
		for(int i=0;i<N-1;i++){
			for(int j=i+1;j<N;j++){
				if((x[j]-x[i])*(x[j]-x[i]) + (y[j]-y[i])*(y[j]-y[i]) <= 2500){
					t[i].push_back(j);
					t[j].push_back(i);
				}
			}
		}
		vector<int> v;
		for(int i=0;i<N;i++) time[i] = -999999999;

		int ans = 0;
		for(int i=0;i<N;i++){
			if((sx-x[i])*(sx-x[i]) + (sy-y[i])*(sy-y[i]) <= 100){
				v.push_back(i);
				ans = time[i] = X;
			}
		}

		int loop = 10000;
		while(!v.empty() && loop>0){
			vector<int> nv;
			for(int i=0;i<v.size();i++){
				int from = v[i];
				for(int j=0;j<t[from].size();j++){
					int to = t[from][j];

					if(time[from] - Y > time[to]){
						nv.push_back(to);
						ans = time[to] = time[from] + X;
					}
				}
			}

			v = nv;
			loop--;
		}

		if(loop == 0)
			cout<<"You're always welcome!\n";
		else
			cout<<ans<<endl;
	}

	return 0;
}

Compiler output:
a.cc:6:14: error: 'int time [1000]' redeclared as different kind of entity
    6 | int time[1000];
      |              ^
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:1:
/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 'int main()':
a.cc:30:44: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   30 |                 for(int i=0;i<N;i++) time[i] = -999999999;
      |                                            ^
a.cc:30:46: error: assignment of read-only location '*(time + ((sizetype)i))'
   30 |                 for(int i=0;i<N;i++) time[i] = -999999999;
      |                                      ~~~~~~~~^~~~~~~~~~~~
a.cc:36:45: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   36 |                                 ans = time[i] = X;
      |                                             ^
a.cc:36:47: error: assignment of read-only location '*(time + ((sizetype)i))'
   36 |                                 ans = time[i] = X;
      |                                       ~~~~~~~~^~~
a.cc:48:53: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   48 |                                         if(time[from] - Y > time[to]){
      |                                                     ^
a.cc:48:55: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   48 |                                         if(time[from] - Y > time[to]){
      |                                            ~~~~~~~~~~~^~~
a.cc:48:68: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   48 |                                         if(time[from] - Y > time[to]){
      |                                                                    ^
a.cc:50:62: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   50 |                                                 ans = time[to] = time[from] + X;
      |                                                              ^
a.cc:50:75: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   50 |                                                 ans = time[to] = time[from] + X;
      |                                                                           ^
a.cc:50:77: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   50 |                                                 ans = time[to] = time[from] + X;
      |                                                                  ~~~~~~~~~~~^~~
a.cc:50:64: error: assignment of read-only location '*(time + ((sizetype)to))'
   50 |                                                 ans = time[to] = time[from] + X;
      |                                                       ~~~~~~~~~^~~~~~~~~~~~~~~~