#include <bits/stdc++.h>
using namespace std;
struct Tree1 {
  double val;
  int pos;
};
Tree1 operator+(const Tree1& a, const Tree1& b) {
  Tree1 ans = a;
  if (b.val < ans.val) ans = b;
  return ans;
}
struct Seg1 {
  Tree1 T[800010];
  void update(int root) {
    T[root] = T[root << 1] + T[root << 1 | 1];
    return;
  }
  void build(int root, int l, int r) {
    if (l == r) {
      T[root].pos = l;
      T[root].val = 1e9;
      return;
    }
    int mid = (l + r) >> 1;
    build(root << 1, l, mid);
    build(root << 1 | 1, mid + 1, r);
    update(root);
    return;
  }
  void change(int root, int l, int r, int x, double y) {
    if (l == r) {
      T[root].val = y;
      return;
    }
    int mid = (l + r) >> 1;
    if (x <= mid)
      change(root << 1, l, mid, x, y);
    else
      change(root << 1 | 1, mid + 1, r, x, y);
    update(root);
    return;
  }
} S1;
struct Tree2 {
  double val;
  int pos;
};
Tree2 operator+(const Tree2& a, const Tree2& b) {
  Tree2 ans = a;
  if (b.val > ans.val) ans = b;
  return ans;
}
struct Seg2 {
  Tree2 T[800010];
  void update(int root) {
    T[root] = T[root << 1] + T[root << 1 | 1];
    return;
  }
  void build(int root, int l, int r) {
    if (l == r) {
      T[root].pos = l;
      T[root].val = 0;
      return;
    }
    int mid = (l + r) >> 1;
    build(root << 1, l, mid);
    build(root << 1 | 1, mid + 1, r);
    update(root);
    return;
  }
  void change(int root, int l, int r, int x, double y) {
    if (l == r) {
      T[root].val = y;
      return;
    }
    int mid = (l + r) >> 1;
    if (x <= mid)
      change(root << 1, l, mid, x, y);
    else
      change(root << 1 | 1, mid + 1, r, x, y);
    update(root);
    return;
  }
} S2;
double sum(int p, int l, int t) {
  if (t < 0) return -1e9;
  t = min(t, l);
  return (double)p * t / (l + t);
}
double val(int p, int l, int t) { return sum(p, l, t) - sum(p, l, t - 1); }
int P[200010], L[200010], T[200010];
double ans;
int n, tim, q;
bool work() {
  if (S1.T[1].val >= S2.T[1].val) return false;
  ans -= S1.T[1].val;
  ans += S2.T[1].val;
  int pos = S1.T[1].pos;
  T[pos]--;
  S1.change(1, 1, n, pos, val(P[pos], L[pos], T[pos]));
  S2.change(1, 1, n, pos, val(P[pos], L[pos], T[pos] + 1));
  pos = S2.T[1].pos;
  T[pos]++;
  S1.change(1, 1, n, pos, val(P[pos], L[pos], T[pos]));
  S2.change(1, 1, n, pos, val(P[pos], L[pos], T[pos] + 1));
  return true;
}
int main() {
  scanf("%d %d %d", &n, &tim, &q);
  for (int i = 1; i <= n; i++) scanf("%d", &P[i]);
  for (int i = 1; i <= n; i++) scanf("%d", &L[i]);
  S1.build(1, 1, n);
  S2.build(1, 1, n);
  for (int i = 1; i <= n; i++) {
    S2.change(1, 1, n, i, val(P[i], L[i], 1));
    S1.change(1, 1, n, i, val(P[i], L[i], 0));
  }
  for (int i = 1; i <= tim; i++) {
    int pos = S2.T[1].pos;
    T[pos]++;
    ans += val(P[pos], L[pos], T[pos]);
    S1.change(1, 1, n, pos, val(P[pos], L[pos], T[pos]));
    S2.change(1, 1, n, pos, val(P[pos], L[pos], T[pos] + 1));
  }
  while (q--) {
    int a, b;
    scanf("%d %d", &a, &b);
    if (a == 2) a = -1;
    ans -= sum(P[b], L[b], T[b]);
    L[b] += a;
    ans += sum(P[b], L[b], T[b]);
    S1.change(1, 1, n, b, val(P[b], L[b], T[b]));
    S2.change(1, 1, n, b, val(P[b], L[b], T[b] + 1));
    while (work())
      ;
    printf("%.10lf\n", ans);
  }
  return 0;
}
