#include <bits/stdc++.h>
const int N = 200005;
const double eps = 1e-10;
using namespace std;
int a[N], t[N], p[N], m;
double ans = 0;
int cmp(double x) { return (x < -eps) ? -1 : (x > eps); }
struct qwq {
  int id;
  double v;
  friend bool operator<(qwq a, qwq b) {
    return cmp(a.v - b.v) ? a.v < b.v : a.id < b.id;
  }
};
set<qwq> nxt, now;
double NxT(int x) {
  return (double)p[x] * a[x] / (a[x] + t[x] + 1) / (a[x] + t[x]);
}
double NoW(int x) {
  return (double)p[x] * a[x] / (a[x] + t[x] - 1) / (a[x] + t[x]);
}
void ins(int x) {
  if (t[x] < a[x]) nxt.insert((qwq){x, NxT(x)});
  if (t[x]) now.insert((qwq){x, NoW(x)});
}
void del(int x) {
  if (t[x] < a[x]) nxt.erase((qwq){x, NxT(x)});
  if (t[x]) now.erase((qwq){x, NoW(x)});
}
void Ins(int x) {
  del(x);
  if (t[x] + 1 <= a[x]) ans += NxT(x), t[x]++, m--;
  if (t[x] <= a[x]) ins(x);
}
void Del(int x) {
  del(x);
  if (t[x]) ans -= NoW(x), t[x]--, m++;
  ins(x);
}
int main() {
  int n, q, op, x;
  scanf("%d%d%d", &n, &m, &q);
  for (int i = (1); i <= (n); ++i) scanf("%d", &p[i]);
  for (int i = (1); i <= (n); ++i) scanf("%d", &a[i]);
  for (int i = (1); i <= (n); ++i) ins(i);
  while (m && !nxt.empty()) Ins(nxt.rbegin()->id);
  while (q--) {
    scanf("%d%d", &op, &x);
    if (op == 2 && t[x] == a[x]) Del(x);
    del(x), ans -= (double)p[x] * t[x] / (a[x] + t[x]);
    if (op == 1)
      a[x]++;
    else
      a[x]--;
    ins(x), ans += (double)p[x] * t[x] / (a[x] + t[x]);
    if (m && !nxt.empty()) Ins(nxt.rbegin()->id);
    if (!nxt.empty() && !now.empty() &&
        cmp(nxt.rbegin()->v - now.begin()->v) > 0)
      Del(now.begin()->id), Ins(nxt.rbegin()->id);
    printf("%.10f\n", ans);
  }
}
