#include <bits/stdc++.h>
using namespace std;
int n, t, q;
int now[200020];
int L[200020], P[200020];
double ans;
int ADD = 1 << 18;
struct tree {
  pair<double, int> T[1 << 19 | 5];
  int t;
  void update(double x, int idx) {
    T[idx + ADD] = pair<double, int>(x, idx);
    idx = (idx + ADD) >> 1;
    while (idx) {
      int down = (T[idx << 1].first > T[idx << 1 | 1].first) ? (idx << 1)
                                                             : (idx << 1 | 1);
      down ^= t;
      T[idx] = T[down];
      idx >>= 1;
    }
  }
} T1, T2;
void Fix2(pair<double, int> &x1, pair<double, int> &x2) {
  ans += x1.first - x2.first;
  int idx1 = x1.second;
  int idx2 = x2.second;
  now[idx1]++;
  now[idx2]--;
  if (now[idx1] < L[idx1])
    T1.update((double)(P[idx1] * L[idx1]) / (L[idx1] + now[idx1]) /
                  (L[idx1] + now[idx1] + 1),
              idx1);
  else
    T1.update(0, idx1);
  T2.update(x1.first, idx1);
  if (now[idx2] < L[idx2])
    T1.update(x2.first, idx2);
  else
    T1.update(0, idx2);
  if (now[idx2] > 0)
    T2.update((double)(P[idx2] * L[idx2]) / (L[idx2] + now[idx2]) /
                  (L[idx2] + now[idx2] - 1),
              idx2);
  else
    T2.update(1e7, idx2);
}
void Fix() {
  pair<double, int> x1 = T1.T[1];
  pair<double, int> x2 = T2.T[1];
  if (x1.first > x2.first) Fix2(x1, x2);
}
int main() {
  T1.t = 0, T2.t = 1;
  for (int i = 0; i < 1 << 19; i++) T2.T[i].first = 1e7;
  scanf("%d%d%d", &n, &t, &q);
  for (int i = 1; i <= n; i++) scanf("%d", P + i);
  for (int i = 1; i <= n; i++) scanf("%d", L + i);
  for (int i = 1; i <= n; i++) {
    T1.update((double)P[i] / (L[i] + 1), i);
  }
  while (t) {
    pair<double, int> x = T1.T[1];
    if (x.first < 1e-10) break;
    int idx = x.second;
    ans += x.first;
    T2.update(x.first, idx);
    now[idx]++;
    if (now[idx] < L[idx])
      T1.update((double)(P[idx] * L[idx]) / (L[idx] + now[idx]) /
                    (L[idx] + now[idx] + 1),
                idx);
    else
      T1.update(0, idx);
    --t;
  }
  while (q--) {
    int x, y;
    scanf("%d%d", &x, &y);
    if (x == 1) {
      ans -= (double)(now[y] * P[y]) / (L[y] + now[y]) / (L[y] + now[y] + 1);
      L[y]++;
      if (t > 0) {
        --t;
        double tmp =
            (double)(L[y] * P[y]) / (L[y] + now[y]) / (L[y] + now[y] + 1);
        ans += tmp;
        T2.update(tmp, y);
        T1.update(0, y);
        now[y]++;
      } else {
        T1.update((double)(P[y] * L[y]) / (L[y] + now[y]) / (L[y] + now[y] + 1),
                  y);
        if (now[y] > 0)
          T2.update(
              (double)(P[y] * L[y]) / (L[y] + now[y]) / (L[y] + now[y] - 1), y);
        Fix();
      }
    } else {
      ans += (double)(now[y] * P[y]) / (L[y] + now[y]) / (L[y] + now[y] - 1);
      L[y]--;
      if (now[y] > L[y]) {
        if (T1.T[1].first < 1e-10) {
          t++;
          now[y]--;
          ans -= (double)(L[y] * P[y]) / (L[y] + now[y]) / (L[y] + now[y] + 1);
          T2.update(
              (double)(L[y] * P[y]) / (L[y] + now[y]) / (L[y] + now[y] - 1), y);
        } else {
          pair<double, int> x1 = T1.T[1];
          pair<double, int> x2 = pair<double, int>(
              (double)(L[y] * P[y]) / (L[y] + now[y]) / (L[y] + now[y] - 1), y);
          Fix2(x1, x2);
        }
      } else {
        if (now[y] < L[y])
          T1.update(
              (double)(P[y] * L[y]) / (L[y] + now[y]) / (L[y] + now[y] + 1), y);
        else
          T1.update(0, y);
        if (now[y] > 0)
          T2.update(
              (double)(P[y] * L[y]) / (L[y] + now[y]) / (L[y] + now[y] - 1), y);
        Fix();
      }
    }
    printf("%.20f\n", ans);
  }
  return 0;
}
