#include <bits/stdc++.h>
using namespace std;
struct node {
  double a;
  int b;
  friend const bool operator<(const node& x, const node& y) {
    if (fabs(x.a - y.a) < 1e-10)
      return x.b < y.b;
    else
      return x.a < y.a;
  }
};
int n, t, q, p[200007], l[200007], cnt[200007];
double res;
set<node> a, b;
int read() {
  int num = 0;
  char c = getchar();
  while (c < '0' || c > '9') c = getchar();
  while (c >= '0' && c <= '9') num = num * 10 + c - '0', c = getchar();
  return num;
}
int ins(int x) {
  if (cnt[x] < l[x])
    a.insert(node{((((double)cnt[x] + 1) / (l[x] + cnt[x] + 1)) * p[x]) -
                      ((((double)cnt[x]) / (l[x] + cnt[x])) * p[x]),
                  x});
  if (cnt[x])
    b.insert(node{((((double)cnt[x] - 1) / (l[x] + cnt[x] - 1)) * p[x]) -
                      ((((double)cnt[x]) / (l[x] + cnt[x])) * p[x]),
                  x});
  res += ((((double)cnt[x]) / (l[x] + cnt[x])) * p[x]);
  return 0;
}
int del(int x) {
  if (cnt[x] < l[x])
    a.erase(node{((((double)cnt[x] + 1) / (l[x] + cnt[x] + 1)) * p[x]) -
                     ((((double)cnt[x]) / (l[x] + cnt[x])) * p[x]),
                 x});
  if (cnt[x])
    b.erase(node{((((double)cnt[x] - 1) / (l[x] + cnt[x] - 1)) * p[x]) -
                     ((((double)cnt[x]) / (l[x] + cnt[x])) * p[x]),
                 x});
  res -= ((((double)cnt[x]) / (l[x] + cnt[x])) * p[x]);
  return 0;
}
int add(int x) {
  del(x);
  cnt[x]++;
  t--;
  ins(x);
  return 0;
}
int era(int x) {
  del(x);
  cnt[x]--;
  t++;
  ins(x);
  return 0;
}
int main() {
  n = read();
  t = read();
  q = read();
  for (int i = 1; i <= n; i++) p[i] = read();
  for (int i = 1; i <= n; i++) l[i] = read();
  for (int i = 1; i <= n; i++)
    a.insert(node{((((double)1) / (l[i] + 1)) * p[i]), i});
  while (t && !a.empty()) add(a.rbegin()->b);
  for (int i = 1; i <= q; i++) {
    int tp = read(), x = read();
    if (tp == 2 && cnt[x] == l[x]) era(x);
    del(x);
    if (tp == 1)
      l[x]++;
    else
      l[x]--;
    ins(x);
    if (t && !a.empty()) add(a.rbegin()->b);
    if (!a.empty() && !b.empty() && (a.rbegin()->a + b.rbegin()->a) > 0) {
      int x = a.rbegin()->b, y = b.rbegin()->b;
      era(y);
      add(x);
    }
    printf("%.010lf\n", res);
  }
  return 0;
}
