#include <bits/stdc++.h>
#define NAME "staff"
#define FOR(i, a, b) for(int i = (a), _b = (b); i <= _b; ++i)
#define FORD(i,a ,b) for(int i = (a), _b = (b); i >= _b; --i)
#define ll long long
#define pb push_back
#define fi first
#define se second
using namespace std;
const int maxN = 1e5 + 10;
int n, m, k;
ll a[maxN], b[maxN], c[maxN];
int ans;
typedef pair<int, ll> ii;
vector<ii> vt[maxN];
int s[30];
void io()
{
	freopen(NAME".inp", "r", stdin);
	freopen(NAME".out", "w", stdout);
	ios_base::sync_with_stdio(false);cin.tie(0);
}
void bt(int x, ll w, int sl)
{
	if(x == n + 1)
	{
		if(sl <= ans) return;
		FOR(i, 1, n) b[i] = a[i];
		int res= 0;
		FOR(i, 1, n) 
		{
			if(s[i]){
				FOR(j, 0, vt[i].size() - 1) {
					int v = vt[i][j].fi;
					ll l = vt[i][j].se;
					if(s[v]) b[i]+=l, b[v]+=l;
				}
			}
		}
		FOR(i, 1, n) if(b[i] > w && s[i]) res++;
		if(res == sl) ans = max(ans, res);
		return;
	}
	FOR(i, 0, 1)
	{
		s[x] = i;
		bt(x + 1, w, sl + i);
	}
}
void sub1()
{
	int x, y;
	ll w;
	FOR(i, 1, m) 
	{
		cin >> x >> y >> w;
		vt[x].pb(ii(y, w));
	}
	FOR(i, 1, k)
	{
		ans = 0;
		cin >> w;
		bt(1, w, 0);
		cout << ans << " ";
	}
}
queue<int> q;
void solve(ll w)
{
	FOR(i, 1, n) b[i] = a[i], c[i] = 0;
	ans = 0;
	while(q.size()) q.pop();
	FOR(i, 1, n) if(b[i] <= w) q.push(i), c[i] = 1;
	while(q.size())
	{
		int u = q.front();
		q.pop();
		FOR(i, 0, vt[u].size() - 1)
		{
			ll l = vt[u][i].se;
			int v = vt[u][i].fi;
			b[v] -= l;
			if(b[v] <= w && !c[v]) q.push(v), c[v] = 1;
		}
	}
	FOR(i, 1, n) if(b[i] > w) ans++;
	cout << ans << " ";
}
void sub2()
{
	int x, y;
	ll w;
	FOR(i, 1, m)
	{
		cin >> x >> y >> w;
		vt[x].pb(ii(y, w));
		vt[y].pb(ii(x, w));
		a[x] += w, a[y]+= w;
	}

	FOR(i, 1, k)
	{
		cin >> w;
		solve(w);
	}
	
}
int main()
{
	io();
	cin >> n >> m >> k;
	FOR(i, 1, n) cin >> a[i];
	sub2();
	return 0;
}
/*
5 2 4
1 2 3 4 5
1 2 2
3 2 1
1 2 3 4
*/