Problem: One day two students, Grisha and Diana, found themselves in the university chemistry lab. In the lab the students found n test tubes with mercury numbered from 1 to n and decided to conduct an experiment.

The experiment consists of q steps. On each step, one of the following actions occurs:

  1. Diana pours all the contents from tube number pi and then pours there exactly xi liters of mercury. 
  2. Let's consider all the ways to add vi liters of water into the tubes; for each way let's count the volume of liquid (water and mercury) in the tube with water with maximum amount of liquid; finally let's find the minimum among counted maximums. That is the number the students want to count. At that, the students don't actually pour the mercury. They perform calculations without changing the contents of the tubes. 



Unfortunately, the calculations proved to be too complex and the students asked you to help them. Help them conduct the described experiment.

Input

The first line contains two integers n and q (1 ≤ n, q ≤ 105) — the number of tubes ans the number of experiment steps. The next line contains n space-separated integers: h1, h2, ..., hn (0 ≤ hi ≤ 109), where hi is the volume of mercury in the і-th tube at the beginning of the experiment.

The next q lines contain the game actions in the following format:

  * A line of form "1 pi xi" means an action of the first type (1 ≤ pi ≤ n; 0 ≤ xi ≤ 109). 
  * A line of form "2 vi" means an action of the second type (1 ≤ vi ≤ 1015). 



It is guaranteed that there is at least one action of the second type. It is guaranteed that all numbers that describe the experiment are integers.

Output

For each action of the second type print the calculated value. The answer will be considered correct if its relative or absolute error doesn't exceed 10 - 4.

Examples

Input

3 3
1 2 0
2 2
1 2 1
2 3


Output

1.50000
1.66667


Input

4 5
1 3 0 1
2 3
2 1
1 3 2
2 3
2 4


Output

1.66667
1.00000
2.33333
2.66667

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
double eps = 1e-6;
struct node {
  node *l, *r;
  int x, y, cnt;
  long long sum;
  node() {
    l = r = NULL;
    cnt = sum = 0;
  }
} * t;
void out(node *t) {
  if (!t) return;
  out(t->l);
  cout << t->x << " ";
  out(t->r);
}
void upd(node *&x) {
  if (!x) return;
  long long s = x->x, s2 = 1;
  if (x->l) s += x->l->sum, s2 += x->l->cnt;
  if (x->r) s += x->r->sum, s2 += x->r->cnt;
  x->sum = s;
  x->cnt = s2;
}
node *merge(node *l, node *r) {
  if (!l) return r;
  if (!r) return l;
  if (l->y > r->y) {
    l->r = merge(l->r, r);
    upd(l);
    return l;
  } else {
    r->l = merge(l, r->l);
    upd(r);
    return r;
  }
}
void split(node *t, double x, node *&l, node *&r) {
  if (!t) {
    l = r = NULL;
    return;
  }
  if (t->x < x) {
    l = t;
    split(l->r, x, l->r, r);
    upd(l);
  } else {
    r = t;
    split(r->l, x, l, r->l);
    upd(r);
  }
}
void insert(long long val) {
  node *z = new node;
  node *l, *r;
  split(t, val, l, r);
  z->sum = z->x = val;
  z->y = rand();
  z->cnt = 1;
  t = merge(l, merge(z, r));
}
void del(long long val) {
  node *l, *m, *r;
  split(t, val, l, r);
  split(r, val + 1, m, r);
  node *ml = new node;
  node *mr = new node;
  ml = mr = NULL;
  if (m->l) ml = m->l;
  if (m->r) mr = m->r;
  ml = merge(ml, mr);
  if (ml)
    t = merge(merge(l, ml), r);
  else
    t = merge(l, r);
}
double need(double val) {
  long long ans = 0, sm = 0;
  node *l, *r;
  split(t, val + eps, l, r);
  if (l) ans = l->cnt;
  if (l) sm = l->sum;
  t = merge(l, r);
  return ans * 1.0 * val - sm;
}
int n, q;
int id, x;
int a[N];
int tp;
long long V;
double l, r, mid;
int main() {
  scanf("%d%d", &n, &q);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
    insert(a[i]);
  }
  for (int i = 1; i <= q; ++i) {
    scanf("%d", &tp);
    if (tp == 1) {
      scanf("%d%d", &id, &x);
      del(a[id]);
      a[id] = x;
      insert(a[id]);
    } else {
      scanf("%I64d", &V);
      double l = 0, r = double(50000000000ll);
      for (int it = 0; it < 50; ++it) {
        mid = (l + r) / 2.0;
        if (V - need(mid) > eps)
          l = mid;
        else
          r = mid;
      }
      printf("%.5f\n", l);
    }
  }
  return 0;
}