#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200050;
const int INF = 0x3f3f3f3f;
int ticket[MAXN], num[MAXN];
double value[MAXN];
struct Node {
  int max_id, min_id;
  double sum, maxv, minv;
  Node operator+(const Node &Right) const {
    Node ret = *this;
    ret.sum += Right.sum;
    if (maxv < Right.maxv) {
      ret.maxv = Right.maxv;
      ret.max_id = Right.max_id;
    }
    if (minv > Right.minv) {
      ret.minv = Right.minv;
      ret.min_id = Right.min_id;
    }
    return ret;
  }
} tree[MAXN << 2];
inline void update(int k, int v, Node &node) {
  ticket[k] += v;
  node.sum = value[k] * min(1.0 * num[k] / (num[k] + ticket[k]), 0.5);
  if (num[k] >= ticket[k])
    node.maxv = 0;
  else {
    node.maxv = value[k] * (num[k] + 1) / (num[k] + ticket[k] + 1);
    node.maxv -= value[k] * (num[k]) / (num[k] + ticket[k]);
  }
  if (num[k] > ticket[k])
    node.minv = 0;
  else if (num[k]) {
    node.minv = value[k] * (num[k]) / (num[k] + ticket[k]);
    node.minv -= value[k] * (num[k] - 1) / (num[k] + ticket[k] - 1);
  } else {
    node.minv = INF;
  }
}
inline void push_up(int rt) { tree[rt] = tree[rt << 1] + tree[rt << 1 | 1]; }
void update(int pos, int v, int l, int r, int rt) {
  if (l == r) {
    update(pos, v, tree[rt]);
    return;
  }
  int mid = (l + r) >> 1;
  if (pos <= mid) {
    update(pos, v, l, mid, rt << 1);
  } else {
    update(pos, v, mid + 1, r, rt << 1 | 1);
  }
  push_up(rt);
}
void build(int l, int r, int rt) {
  if (l == r) {
    tree[rt].max_id = l;
    tree[rt].min_id = l;
    update(l, 0, tree[rt]);
    return;
  }
  int mid = (l + r) >> 1;
  build(l, mid, rt << 1);
  build(mid + 1, r, rt << 1 | 1);
  push_up(rt);
}
int n, t, q;
void putTicket() {
  while (tree[1].maxv > tree[1].minv) {
    int f = tree[1].min_id, t = tree[1].max_id;
    num[f]--;
    num[t]++;
    update(f, 0, 1, n, 1);
    update(t, 0, 1, n, 1);
  }
}
int main() {
  scanf("%d%d%d", &n, &t, &q);
  for (int i = 1; i <= n; i++) {
    scanf("%lf", value + i);
  }
  for (int i = 1; i <= n; i++) {
    scanf("%d", ticket + i);
    num[i] = 0;
  }
  num[1] = t;
  build(1, n, 1);
  for (int i = 0; i < q; i++) {
    int type, pos;
    scanf("%d%d", &type, &pos);
    if (type == 1) {
      update(pos, 1, 1, n, 1);
    } else {
      update(pos, -1, 1, n, 1);
    }
    putTicket();
    printf("%.9f\n", tree[1].sum);
  }
  return 0;
}
