#include <bits/stdc++.h>
using namespace std;
long long modpow(long long b, long long e, long long mod) {
  long long ans = 1;
  for (; e; b = b * b % mod, e /= 2)
    if (e & 1) ans = ans * b % mod;
  return ans;
}
const int N = 200005;
struct raffle {
  long long p, l, u;
  long double L, W;
  void computa() {
    W = ((long double)p * (u + 1) * (u + l) - p * u * (u + l + 1)) /
        ((long double)(u + l + 1) * (u + l));
    L = ((long double)p * (u - 1) * (u + l) - p * u * (u + l - 1)) /
        ((long double)(u + l - 1) * (u + l));
  }
} r[N];
set<pair<long double, int> > toadd, torem;
int n, t, q;
long double ans = 0.0000;
int32_t main() {
  cin >> n >> t >> q;
  for (int i = 1; i < (n + 1); ++i) {
    cin >> r[i].p;
  }
  for (int i = 1; i < (n + 1); ++i) {
    cin >> r[i].l;
    r[i].u = 0;
    r[i].computa();
    toadd.insert(pair<long double, int>(r[i].W, i));
  }
  while (t > 0 && (int)(toadd).size()) {
    auto u = *prev(toadd.end());
    toadd.erase(u);
    torem.erase(pair<long double, int>(r[u.second].L, u.second));
    ans += r[u.second].W;
    r[u.second].u++;
    r[u.second].computa();
    torem.insert(pair<long double, int>(r[u.second].L, u.second));
    if (r[u.second].u != r[u.second].l)
      toadd.insert(pair<long double, int>(r[u.second].W, u.second));
    t--;
  }
  for (int i = 0; i < (q); ++i) {
    int tk, rk;
    cin >> tk >> rk;
    if ((int)(torem).size()) {
      auto u = *prev(torem.end());
      torem.erase(u);
      toadd.erase(pair<long double, int>(r[u.second].W, u.second));
      ans += r[u.second].L;
      r[u.second].u--;
      r[u.second].computa();
      toadd.insert(pair<long double, int>(r[u.second].W, u.second));
      if (r[u.second].u)
        torem.insert(pair<long double, int>(r[u.second].L, u.second));
      t++;
    }
    if (r[rk].u) {
      torem.erase(pair<long double, int>(r[rk].L, rk));
      toadd.erase(pair<long double, int>(r[rk].W, rk));
      ans += r[rk].L;
      r[rk].u--;
      r[rk].computa();
      toadd.insert(pair<long double, int>(r[rk].W, rk));
      if (r[rk].u) torem.insert(pair<long double, int>(r[rk].L, rk));
      t++;
    }
    if (tk == 1) {
      ans = ans -
            ((long double)r[rk].p * r[rk].u) *
                ((long double)1.000 / ((long double)r[rk].u + r[rk].l) -
                 (long double)1.0000 / ((long double)r[rk].u + r[rk].l + 1));
      torem.erase(pair<long double, int>(r[rk].L, rk));
      toadd.erase(pair<long double, int>(r[rk].W, rk));
      r[rk].l++;
      r[rk].computa();
      if (r[rk].u) torem.insert(pair<long double, int>(r[rk].L, rk));
      if (r[rk].u != r[rk].l) toadd.insert(pair<long double, int>(r[rk].W, rk));
    } else {
      ans = ans -
            ((long double)r[rk].p * r[rk].u) *
                ((long double)1.000 / ((long double)r[rk].u + r[rk].l) -
                 (long double)1.0000 / ((long double)r[rk].u + r[rk].l - 1));
      torem.erase(pair<long double, int>(r[rk].L, rk));
      toadd.erase(pair<long double, int>(r[rk].W, rk));
      r[rk].l--;
      r[rk].computa();
      if (r[rk].u) torem.insert(pair<long double, int>(r[rk].L, rk));
      if (r[rk].u != r[rk].l) toadd.insert(pair<long double, int>(r[rk].W, rk));
    }
    while (t > 0 && (int)(toadd).size()) {
      auto u = *prev(toadd.end());
      toadd.erase(u);
      torem.erase(pair<long double, int>(r[u.second].L, u.second));
      ans += r[u.second].W;
      r[u.second].u++;
      r[u.second].computa();
      torem.insert(pair<long double, int>(r[u.second].L, u.second));
      if (r[u.second].u != r[u.second].l)
        toadd.insert(pair<long double, int>(r[u.second].W, u.second));
      t--;
    }
    cout << fixed << setprecision(9) << ans << endl;
  }
}
