#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
const double eps = 1e-10;
int rd() {
  int x = 0, w = 1;
  char ch = 0;
  while (ch < '0' || ch > '9') {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + (ch ^ 48);
    ch = getchar();
  }
  return x * w;
}
int n, m, q, l[N];
double s[N], c[N], na;
double nv(int i, int j) { return s[i] * (c[i] + j) / (c[i] + j + l[i]); }
struct node {
  double x;
  int i;
  bool operator<(const node &bb) const {
    return fabs(x - bb.x) > eps ? x < bb.x : i < bb.i;
  }
} aa[N], bb[N];
multiset<node> sa, sb;
multiset<node>::iterator it;
int main() {
  n = rd(), m = rd(), q = rd();
  for (int i = 1; i <= n; ++i) s[i] = rd();
  for (int i = 1; i <= n; ++i) l[i] = rd();
  for (int i = 1; i <= n; ++i) sa.insert(aa[i] = (node){1e18, i});
  for (int i = 1; i <= n; ++i) sb.insert(bb[i] = (node){nv(i, 1), i});
  while (m) {
    it = --sb.end();
    if ((*it).x < 0) break;
    int i = (*it).i;
    sa.erase(sa.find(aa[i])), sb.erase(sb.find(bb[i]));
    na += bb[i].x;
    ++c[i], aa[i] = bb[i],
            bb[i] = (node){c[i] < l[i] ? nv(i, 1) - nv(i, 0) : -1, i};
    sa.insert(aa[i]), sb.insert(bb[i]), --m;
  }
  while (q--) {
    int op = rd(), i = rd();
    na -= nv(i, 0);
    sa.erase(sa.find(aa[i])), sb.erase(sb.find(bb[i]));
    if (op == 1)
      ++l[i];
    else
      --l[i];
    while (c[i] > l[i]) --c[i], ++m;
    na += nv(i, 0);
    aa[i] = (node){nv(i, 0) - (c[i] ? nv(i, -1) : -1e18), i},
    bb[i] = (node){c[i] < l[i] ? nv(i, 1) - nv(i, 0) : -1, i};
    sa.insert(aa[i]), sb.insert(bb[i]);
    while (m) {
      it = --sb.end();
      if ((*it).x < 0) break;
      int i = (*it).i;
      sa.erase(sa.find(aa[i])), sb.erase(sb.find(bb[i]));
      na += bb[i].x;
      ++c[i], aa[i] = bb[i],
              bb[i] = (node){c[i] < l[i] ? nv(i, 1) - nv(i, 0) : -1, i};
      sa.insert(aa[i]), sb.insert(bb[i]), --m;
    }
    while ((*sa.begin()).x < (*(--sb.end())).x) {
      if ((*sa.begin()).i == (*(--sb.end())).i) break;
      int i = (*sa.begin()).i, j = (*(--sb.end())).i;
      sa.erase(sa.find(aa[i])), sb.erase(sb.find(bb[i]));
      sa.erase(sa.find(aa[j])), sb.erase(sb.find(bb[j]));
      na += bb[j].x - aa[i].x;
      --c[i], bb[i] = aa[i],
              aa[i] = (node){nv(i, 0) - (c[i] ? nv(i, -1) : -1e18), i};
      sa.insert(aa[i]), sb.insert(bb[i]);
      ++c[j], aa[j] = bb[j],
              bb[j] = (node){c[j] < l[j] ? nv(j, 1) - nv(j, 0) : -1, j};
      sa.insert(aa[j]), sb.insert(bb[j]);
    }
    printf("%.9lf\n", na);
  }
  return 0;
}
