#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int k = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    k = k * 10 + ch - '0';
    ch = getchar();
  }
  return k * f;
}
struct tree {
  double t, w, l;
  int k1, k2;
} t[800010];
int n, m, q, a[200010], p[200010], b[200010];
inline void pushup(int nod) {
  t[nod].t = t[nod * 2].t + t[nod * 2 + 1].t;
  if (t[nod * 2].w - t[nod * 2 + 1].w > 1e-9)
    t[nod].w = t[nod * 2].w, t[nod].k1 = t[nod * 2].k1;
  else
    t[nod].w = t[nod * 2 + 1].w, t[nod].k1 = t[nod * 2 + 1].k1;
  if (t[nod * 2].l - t[nod * 2 + 1].l > 1e-9)
    t[nod].l = t[nod * 2 + 1].l, t[nod].k2 = t[nod * 2 + 1].k2;
  else
    t[nod].l = t[nod * 2].l, t[nod].k2 = t[nod * 2].k2;
}
inline void xg(int l, int r, int x, int nod) {
  if (l == r) {
    t[nod].t = min((double)a[l] / 2, (double)a[l] * b[l] / (b[l] + p[l]));
    if (b[l] >= p[l])
      t[nod].w = 0;
    else
      t[nod].w = (double)a[l] * (b[l] + 1) / (b[l] + 1 + p[l]) -
                 (double)a[l] * b[l] / (b[l] + p[l]);
    if (b[l] == 0)
      t[nod].l = 1e9;
    else if (b[l] > p[l])
      t[nod].l = 0;
    else
      t[nod].l = (double)a[l] * b[l] / (b[l] + p[l]) -
                 (double)a[l] * (b[l] - 1) / (b[l] + p[l] - 1);
    t[nod].k1 = t[nod].k2 = l;
    return;
  }
  int mid = l + r >> 1;
  if (x <= mid)
    xg(l, mid, x, nod * 2);
  else
    xg(mid + 1, r, x, nod * 2 + 1);
  pushup(nod);
}
int main() {
  n = read();
  m = read();
  q = read();
  for (int i = 1; i <= n; i++) a[i] = read();
  for (int i = 1; i <= n; i++) p[i] = read();
  for (int i = 1; i <= n; i++) xg(1, n, i, 1);
  for (int i = 1; i <= m; i++) {
    int p = t[1].k1;
    b[p]++;
    xg(1, n, p, 1);
  }
  for (int i = 1; i <= q; i++) {
    int x = read(), y = read();
    if (x == 2) x = -1;
    p[y] += x;
    xg(1, n, y, 1);
    while (t[1].w - t[1].l > 1e-9) {
      int p1 = t[1].k1, p2 = t[1].k2;
      b[p1]++;
      b[p2]--;
      xg(1, n, p1, 1);
      xg(1, n, p2, 1);
    }
    printf("%.9lf\n", t[1].t);
  }
  return 0;
}
