#include <bits/stdc++.h>
using namespace std;
const int oo = 2139063143;
const int N = 1010000;
const int P = 1000000007;
const double eps = 1e-7;
template <typename T>
inline void sc(T &x) {
  x = 0;
  static int p;
  p = 1;
  static char c;
  c = getchar();
  while (!isdigit(c)) {
    if (c == '-') p = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    x = (x << 1) + (x << 3) + (c - 48);
    c = getchar();
  }
  x *= p;
}
template <typename T>
inline void print(T x) {
  if (x < 0) putchar('-'), x = -x;
  if (x >= 10) print(x / 10);
  putchar(x % 10 + '0');
}
template <typename T>
inline void pr(T x) {
  print(x), putchar('\n');
}
template <typename T1, typename T2>
void chkmax(T1 &A, T2 B) {
  A = A >= B ? A : B;
}
template <typename T1, typename T2>
void chkmin(T1 &A, T2 B) {
  A = A <= B ? A : B;
}
int n, m, q;
double a[N], b[N];
struct TREE {
  int mi, ma;
} tr[N << 2];
void update(int p) {
  int ls = p << 1, rs = ls | 1;
  tr[p].mi = b[tr[ls].mi] < b[tr[rs].mi] ? tr[ls].mi : tr[rs].mi;
  tr[p].ma = a[tr[ls].ma] > a[tr[rs].ma] ? tr[ls].ma : tr[rs].ma;
}
void build(int p, int l, int r) {
  if (l == r) return tr[p].mi = tr[p].ma = l, void();
  int mid = (l + r) >> 1, ls = p << 1, rs = ls | 1;
  build(ls, l, mid), build(rs, mid + 1, r);
}
void change(int p, int l, int r, int w) {
  if (l == r) return;
  int mid = (l + r) >> 1, ls = p << 1, rs = ls | 1;
  (w <= mid) ? change(ls, l, mid, w) : change(rs, mid + 1, r, w);
  update(p);
}
int l[N], t[N], p[N];
void add(int x, int d) {
  t[x] += d, t[0] += d;
  double g = (double)t[x] / (l[x] + t[x]);
  if (t[x] - 1 >= 0)
    b[x] = (g - (double)(t[x] - 1) / (l[x] + t[x] - 1)) * p[x];
  else
    b[x] = oo;
  if (t[x] + 1 <= l[x])
    a[x] = ((double)(t[x] + 1) / (l[x] + t[x] + 1) - g) * p[x];
  else
    a[x] = 0;
  change(1, 1, n, x);
}
int main() {
  sc(n), sc(m), sc(q);
  for (int i = 1; i <= n; i++) sc(p[i]);
  for (int i = 1; i <= n; i++) sc(l[i]), l[0] += l[i];
  build(1, 1, n);
  for (int i = 1; i <= n; i++) add(i, 0);
  double ans = 0;
  while (m && t[0] < l[0]) ans += a[tr[1].ma], add(tr[1].ma, 1), --m;
  while (q--) {
    int op, x;
    sc(op), sc(x);
    if (op == 2) op = -1;
    ans -= (double)t[x] / (l[x] + t[x]) * p[x], l[x] += op, l[0] += op;
    if (t[x]) add(x, -1), ++m;
    add(x, 0);
    ans += (double)t[x] / (l[x] + t[x]) * p[x];
    while (20021206 && t[0] < l[0]) {
      int y = 0, z = 0;
      ans += a[tr[1].ma], add(z = tr[1].ma, 1);
      ans -= b[tr[1].mi], add(y = tr[1].mi, -1);
      if (y == z) break;
    }
    while (m && t[0] < l[0]) ans += a[tr[1].ma], add(tr[1].ma, 1), --m;
    printf("%.9lf\n", ans);
  }
  return 0;
}
