#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const int maxn = 2e5 + 10;
int n, m, k, t, a[maxn], l[maxn], r[maxn], d[maxn], f[maxn], w[maxn];
bool cmp(int a, int b) { return a > b; }
bool check(int x) {
  int h = a[x], p = 0, ans = 0;
  for (int i = 1; i <= n + 1; i++) f[i] = w[i] = 0;
  for (int i = 1; i <= k; i++) {
    if (d[i] > h) w[l[i]]++, w[r[i] + 1]--;
  }
  for (int i = 1; i <= n + 1; i++) {
    f[i] = f[i - 1] + w[i];
    if (f[i] >= 1) ans++;
  }
  ans = ans * 2 + n + 1;
  return ans <= t;
}
int main() {
  scanf("%d%d%d%d", &m, &n, &k, &t);
  for (int i = 1; i <= m; i++) scanf("%d", &a[i]);
  sort(a + 1, a + m + 1, cmp);
  for (int i = 1; i <= k; i++) scanf("%d%d%d", &l[i], &r[i], &d[i]);
  int l = 0, r = m + 1, mid, ans = 0;
  while (l < r) {
    mid = (l + r) / 2;
    if (check(mid))
      l = mid + 1, ans = mid;
    else
      r = mid;
  }
  cout << ans;
}
