#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
struct node {
  pair<double, int> x, y;
  double sum;
} tr[N * 4];
double a[N], p[N], num[N];
void update(int l, int r, int k, int d) {
  if (l == r) {
    tr[k].x.second = tr[k].y.second = l;
    tr[k].sum = min(p[l] * a[l] / (a[l] + num[l]), p[l] / 2);
    if (a[l] >= num[l])
      tr[k].x.first = 0;
    else
      tr[k].x.first = p[l] * (a[l] + 1) / (num[l] + a[l] + 1) -
                      p[l] * a[l] / (num[l] + a[l]);
    if (a[l] > num[l])
      tr[k].y.first = 0;
    else if (a[l])
      tr[k].y.first = p[l] * a[l] / (num[l] + a[l]) -
                      p[l] * (a[l] - 1) / (num[l] + a[l] - 1);
    else
      tr[k].y.first = 1e9;
  } else {
    if (d <= (l + r) / 2)
      update(l, (l + r) / 2, k * 2, d);
    else
      update((l + r) / 2 + 1, r, k * 2 + 1, d);
    tr[k].x = max(tr[k * 2].x, tr[k * 2 + 1].x);
    tr[k].y = min(tr[k * 2].y, tr[k * 2 + 1].y);
    tr[k].sum = tr[k * 2].sum + tr[k * 2 + 1].sum;
  }
}
int main() {
  int n, t, q;
  scanf("%d%d%d", &n, &t, &q);
  for (int i = 1; i <= n; i++) scanf("%lf", &p[i]);
  for (int i = 1; i <= n; i++) scanf("%lf", &num[i]);
  for (int i = 1; i <= n; i++) update(1, n, 1, i);
  while (t--) {
    a[tr[1].x.second]++;
    update(1, n, 1, tr[1].x.second);
  }
  for (int i = 1; i <= q; i++) {
    int t, r;
    scanf("%d%d", &t, &r);
    if (t == 1)
      num[r]++;
    else
      num[r]--;
    update(1, n, 1, r);
    if (tr[1].x.first > tr[1].y.first) {
      a[tr[1].x.second]++;
      update(1, n, 1, tr[1].x.second);
      a[tr[1].y.second]--;
      update(1, n, 1, tr[1].y.second);
    }
    printf("%.9lf\n", tr[1].sum);
  }
  return 0;
}
