#include <bits/stdc++.h>
using namespace std;
const int MOD = (int)1e9 + 7;
const int INF = (int)1e9;
const long long LINF = (long long)1e18;
const long double PI = 2 * acos((long double)0);
long long gcd(long long a, long long b) {
  long long r;
  while (b != 0) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
long long fpow(long long n, long long k, int p = MOD) {
  long long r = 1;
  for (; k; k >>= 1) {
    if (k & 1) r = r * n % p;
    n = n * n % p;
  }
  return r;
}
void addmod(int& a, int val, int p = MOD) {
  if ((a = (a + val)) >= p) a -= p;
}
void submod(int& a, int val, int p = MOD) {
  if ((a = (a - val)) < 0) a += p;
}
int mult(int a, int b, int p = MOD) { return (long long)a * b % p; }
int inv(int a, int p = MOD) { return fpow(a, p - 2, p); }
const int maxn = 200010;
int n, t, q;
int p[maxn];
int l[maxn];
int f[maxn];
long double g[maxn];
long double h[maxn];
set<pair<long double, int> > st1, st2;
long double ans;
void update() {
  while (t && int((st1).size())) {
    int u = st1.rbegin()->second;
    long double x = (long double)p[u] * f[u] / (f[u] + l[u]);
    ans -= x;
    f[u]++;
    long double y = (long double)p[u] * f[u] / (f[u] + l[u]);
    ans += y;
    st2.erase(make_pair(h[u], u));
    h[u] = y - x;
    st2.insert(make_pair(h[u], u));
    st1.erase(make_pair(g[u], u));
    if (f[u] + 1 <= l[u]) {
      g[u] = (long double)p[u] * (f[u] + 1) / (f[u] + l[u] + 1) -
             (long double)p[u] * f[u] / (f[u] + l[u]);
      st1.insert(make_pair(g[u], u));
    }
    t--;
  }
}
void solve() {
  cin >> n >> t >> q;
  for (int i = (0); i < (n); i++) cin >> p[i];
  for (int i = (0); i < (n); i++) {
    cin >> l[i];
    g[i] = (long double)p[i] / (l[i] + 1);
    st1.insert(make_pair(g[i], i));
  }
  update();
  while (q--) {
    int op, u;
    cin >> op >> u;
    u--;
    if (f[u]) {
      ans -= (long double)p[u] * f[u] / (f[u] + l[u]);
      f[u]--;
      t++;
    }
    st1.erase(make_pair(g[u], u));
    st2.erase(make_pair(h[u], u));
    int v = -1;
    if (int((st2).size()) && st2.begin()->second != u) {
      v = st2.begin()->second;
      ans -= (long double)p[v] * f[v] / (f[v] + l[v]);
      f[v]--;
      t++;
      st1.erase(make_pair(g[v], v));
      st2.erase(make_pair(h[v], v));
    }
    if (op == 1)
      l[u]++;
    else
      l[u]--;
    ans += (long double)p[u] * f[u] / (f[u] + l[u]);
    if (f[u] + 1 <= l[u]) {
      g[u] = (long double)p[u] * (f[u] + 1) / (f[u] + l[u] + 1) -
             (long double)p[u] * f[u] / (f[u] + l[u]);
      st1.insert(make_pair(g[u], u));
    }
    if (f[u]) {
      h[u] = (long double)p[u] * ((long double)f[u] / (f[u] + l[u]) -
                                  (long double)(f[u] - 1) / (f[u] + l[u] - 1));
      st2.insert(make_pair(h[u], u));
    }
    if (~v) {
      ans += (long double)p[v] * f[v] / (f[v] + l[v]);
      if (f[v] + 1 <= l[v]) {
        g[v] = (long double)p[v] * (f[v] + 1) / (f[v] + l[v] + 1) -
               (long double)p[v] * f[v] / (f[v] + l[v]);
        st1.insert(make_pair(g[v], v));
      }
      if (f[v]) {
        h[v] =
            (long double)p[v] * ((long double)f[v] / (f[v] + l[v]) -
                                 (long double)(f[v] - 1) / (f[v] + l[v] - 1));
        st2.insert(make_pair(h[v], v));
      }
    }
    update();
    cout << fixed << setprecision(9) << ans << "\n";
  }
}
int main() {
  ios::sync_with_stdio(0);
  solve();
  return 0;
}
