#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
const double eps = 0.000000001;
const double inf = 100000000.0;
struct node {
  double w;
  int p;
  node() {}
  node(double w, int p) : w(w), p(p) {}
  friend bool operator<(node a, node b) { return a.w < b.w; }
};
struct ST {
  int l, r;
  node w1, w2;
  double s;
} t[N << 2];
int n, m, T, opt, x, y;
int a[N], b[N], p[N];
void update(int k) {
  t[k].w1 = max(t[k << 1].w1, t[k << 1 | 1].w1);
  t[k].w2 = min(t[k << 1].w2, t[k << 1 | 1].w2);
  t[k].s = t[k << 1].s + t[k << 1 | 1].s;
}
void ins(int k, int x) {
  t[k].s = min((double)p[x] * a[x] / (a[x] + b[x]), (double)p[x] * 0.5);
  if (a[x] < b[x])
    t[k].w1.w =
        (double)(a[x] + 1) / (a[x] + b[x] + 1) - (double)a[x] / (a[x] + b[x]);
  else
    t[k].w1.w = 0;
  t[k].w1.w *= (double)p[x];
  if (a[x] <= b[x])
    t[k].w2.w =
        (double)a[x] / (a[x] + b[x]) - (double)(a[x] - 1) / (a[x] + b[x] - 1);
  else
    t[k].w2.w = 0;
  if (!a[x]) t[k].w2.w = inf;
  t[k].w2.w *= (double)p[x];
  t[k].w1.p = t[k].w2.p = x;
}
void build(int k, int l, int r) {
  t[k].l = l;
  t[k].r = r;
  if (l == r) {
    ins(k, l);
    return;
  }
  int mid = (l + r) >> 1;
  build(k << 1, l, mid);
  build(k << 1 | 1, mid + 1, r);
  update(k);
}
void modify(int k, int p) {
  if (t[k].l == t[k].r) {
    ins(k, p);
    return;
  }
  int mid = (t[k].l + t[k].r) >> 1;
  if (p <= mid)
    modify(k << 1, p);
  else
    modify(k << 1 | 1, p);
  update(k);
}
int main() {
  int i;
  scanf("%d%d%d", &n, &m, &T);
  for (i = 1; i <= n; i++) scanf("%d", &p[i]);
  for (i = 1; i <= n; i++) scanf("%d", &b[i]);
  build(1, 1, n);
  for (i = 1; i <= m; i++) {
    x = t[1].w1.p;
    a[x]++;
    modify(1, x);
  }
  while (T--) {
    scanf("%d%d", &opt, &x);
    if (opt == 1)
      b[x]++;
    else
      b[x]--;
    modify(1, x);
    while (t[1].w1.w - t[1].w2.w > eps) {
      x = t[1].w1.p;
      y = t[1].w2.p;
      a[x]++;
      a[y]--;
      modify(1, x);
      modify(1, y);
    }
    printf("%.6f\n", t[1].s);
  }
  return 0;
}
