#include <bits/stdc++.h>
const double EPS = 1e-7, PI = acos(-1.0);
using namespace std;
const int NUM = 200010;
int n, t, q;
int pv[NUM], a[NUM], b[NUM];
double delta_add[NUM], delta_minus[NUM];
inline int sgn(double x) { return x < -EPS ? -1 : x > EPS ? 1 : 0; }
inline void cal_delta(int i) {
  if (a[i] >= b[i])
    delta_add[i] = 0.0;
  else {
    delta_add[i] = 1.0 * pv[i] * (a[i] + 1.0) / (a[i] + b[i] + 1.0);
    delta_add[i] -= 1.0 * pv[i] * a[i] / (a[i] + b[i]);
  }
  if (a[i]) {
    if (a[i] > b[i])
      delta_minus[i] = 0.0;
    else {
      delta_minus[i] = 1.0 * pv[i] * a[i] / (a[i] + b[i]);
      delta_minus[i] -= 1.0 * pv[i] * (a[i] - 1.0) / (a[i] + b[i] - 1.0);
    }
  } else
    delta_minus[i] = 1e18;
}
struct SegmemtTree {
  int id_max[NUM * 4], id_min[NUM * 4];
  double ans[NUM * 4];
  void push_up(int p) {
    id_max[p] = delta_add[id_max[(p << 1)]] < delta_add[id_max[(p << 1 | 1)]]
                    ? id_max[(p << 1 | 1)]
                    : id_max[(p << 1)];
    id_min[p] =
        delta_minus[id_min[(p << 1)]] < delta_minus[id_min[(p << 1 | 1)]]
            ? id_min[(p << 1)]
            : id_min[(p << 1 | 1)];
    ans[p] = ans[(p << 1)] + ans[(p << 1 | 1)];
  }
  void build(int p, int l, int r) {
    if (l == r) {
      id_max[p] = l;
      id_min[p] = l;
      ans[p] = 0.0;
      cal_delta(l);
      return;
    }
    int mid = (l + r) >> 1;
    build((p << 1), l, mid);
    build((p << 1 | 1), mid + 1, r);
    push_up(p);
  }
  void update(int p, int l, int r, int x) {
    if (l == r) {
      cal_delta(l);
      ans[p] = 1.0 * pv[l] * min(1.0 * a[l] / (a[l] + b[l]), 0.5);
      return;
    }
    int mid = (l + r) >> 1;
    if (x <= mid)
      update((p << 1), l, mid, x);
    else
      update((p << 1 | 1), mid + 1, r, x);
    push_up(p);
  }
} sg;
int main() {
  int tk, rk, mx, mi;
  scanf("%d%d%d", &n, &t, &q);
  for (int i = 1; i <= n; ++i) scanf("%d", &pv[i]);
  for (int i = 1; i <= n; ++i) scanf("%d", &b[i]);
  sg.build(1, 1, n);
  while (t--) mx = sg.id_max[1], ++a[mx], sg.update(1, 1, n, mx);
  while (q--) {
    scanf("%d%d", &tk, &rk);
    if (tk == 1)
      ++b[rk];
    else
      --b[rk];
    sg.update(1, 1, n, rk);
    while (true) {
      mx = sg.id_max[1];
      mi = sg.id_min[1];
      if (delta_add[mx] <= delta_minus[mi]) break;
      ++a[mx], --a[mi];
      sg.update(1, 1, n, mx);
      sg.update(1, 1, n, mi);
    }
    printf("%.10f\n", sg.ans[1]);
  }
  return 0;
}
