#include <bits/stdc++.h>
using namespace std;
struct Guy {
  int c, a, x;
  double inc, dec, val;
  void Compute() {
    val = c * 1.0 * x / (a + x);
    inc = -1e100;
    if (x + 1 <= a) {
      inc = a * 1.0 * c / ((a + x) * 1.0 * (a + x + 1.0));
    }
    dec = 1e100;
    if (x > 0) {
      dec = a * 1.0 * c / ((a + x - 1) * 1.0 * (a + x));
    }
  }
};
vector<Guy> guys;
set<pair<double, int>> incs, decs;
double sum;
void Update(int idx) {
  sum -= guys[idx].val;
  incs.erase(incs.find(make_pair(-guys[idx].inc, idx)));
  decs.erase(decs.find(make_pair(guys[idx].dec, idx)));
  guys[idx].Compute();
  sum += guys[idx].val;
  incs.insert(make_pair(-guys[idx].inc, idx));
  decs.insert(make_pair(guys[idx].dec, idx));
}
int main() {
  cout.sync_with_stdio(0);
  cin.tie(0);
  cout.precision(9);
  int n, t, q;
  sum = 0;
  cin >> n >> t >> q;
  guys.resize(n);
  for (int i = 0; i < n; ++i) {
    int pi;
    cin >> pi;
    guys[i].c = pi;
  }
  for (int i = 0; i < n; ++i) {
    int ai;
    cin >> ai;
    guys[i].a = ai;
    guys[i].x = 0;
    guys[i].Compute();
    incs.insert(make_pair(-guys[i].inc, i));
    decs.insert(make_pair(guys[i].dec, i));
  }
  while (t > 0) {
    if (incs.begin()->first > 1E90) break;
    int ind = incs.begin()->second;
    guys[ind].x += 1;
    Update(ind);
    --t;
  }
  for (int it = 0; it < q; ++it) {
    int tk, rk;
    cin >> tk >> rk;
    --rk;
    guys[rk].a += tk == 1 ? 1 : -1;
    if (guys[rk].x > guys[rk].a) {
      --guys[rk].x;
      ++t;
    }
    if (guys[rk].x > 0) {
      --guys[rk].x;
      ++t;
    }
    Update(rk);
    int ind = decs.begin()->second;
    if (guys[ind].x > 0) {
      --guys[ind].x;
      ++t;
      Update(ind);
    }
    while (t > 0) {
      if (incs.begin()->first > 1E90) break;
      int ind = incs.begin()->second;
      guys[ind].x += 1;
      Update(ind);
      --t;
    }
    cout << fixed << sum << endl;
  }
  return 0;
}
