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;
template <class T>
T sqr(T x) {
  return x * x;
}
inline int getBit(int x, int pos) { return ((x >> pos) & 1); }
const double eps = 1e-9;
const double pi = acos(-1.0);
struct Node {
  long long val, sum;
  int x;
  long long y;
  Node *l, *r;
  Node(long long val, long long y, Node *l = NULL, Node *r = NULL) {
    this->x = 1;
    this->sum = val;
    this->val = val;
    this->y = y;
    this->l = l;
    this->r = r;
  }
};
typedef Node *treap;
inline int getX(treap t) { return (t == NULL ? 0 : t->x); }
inline long long getSum(treap t) { return (t == NULL ? 0 : t->sum); }
void update(treap &t) {
  if (t != NULL) {
    t->x = getX(t->l) + getX(t->r) + 1;
    t->sum = getSum(t->l) + getSum(t->r) + t->val;
  }
}
treap merge(treap l, treap r) {
  if (l == NULL || r == NULL) {
    return (l == NULL ? r : l);
  }
  if (l->y > r->y) {
    l->r = merge(l->r, r);
    update(l);
    return l;
  } else {
    r->l = merge(l, r->l);
    update(r);
    return r;
  }
}
void splitPos(treap t, treap &l, treap &r, int pos) {
  if (t == NULL) {
    l = NULL;
    r = NULL;
    return;
  }
  if (getX(t->l) + 1 > pos) {
    treap tmp = NULL;
    splitPos(t->l, l, tmp, pos);
    t->l = tmp;
    r = t;
    update(r);
  } else {
    treap tmp = NULL;
    splitPos(t->r, tmp, r, pos - getX(t->l) - 1);
    t->r = tmp;
    l = t;
    update(l);
  }
}
void splitVal(treap t, treap &l, treap &r, long long val) {
  if (t == NULL) {
    l = NULL;
    r = NULL;
    return;
  }
  if (t->val > val) {
    treap tmp = NULL;
    splitVal(t->l, l, tmp, val);
    t->l = tmp;
    r = t;
    update(r);
  } else {
    treap tmp = NULL;
    splitVal(t->r, tmp, r, val);
    t->r = tmp;
    l = t;
    update(l);
  }
}
void add(treap &t, long long val) {
  treap l = NULL, r = NULL;
  splitVal(t, l, r, val);
  treap tmp = new Node(val, rand() * 1LL * rand());
  update(tmp);
  t = merge(merge(l, tmp), r);
}
void erase(treap &t, long long val) {
  treap l = NULL, r = NULL, m = NULL, tmp = NULL;
  splitVal(t, l, r, val);
  splitPos(l, m, tmp, getX(l) - 1);
  tmp = NULL;
  t = merge(m, r);
}
pair<int, long long> getCount(treap &t, long long val) {
  treap l = NULL, r = NULL;
  splitVal(t, l, r, val);
  pair<int, long long> res;
  res.first = getX(l);
  res.second = getSum(l);
  t = merge(l, r);
  return res;
}
int n, q;
int a[(int)(1e5) + 10];
int tp;
int p, x;
long long v;
int main() {
  srand(time(0));
  scanf("%d%d", &n, &q);
  treap t = NULL;
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    add(t, a[i]);
  }
  while (q-- > 0) {
    scanf("%d", &tp);
    if (tp == 1) {
      scanf("%d%d", &p, &x);
      --p;
      erase(t, a[p]);
      a[p] = x;
      add(t, a[p]);
    } else {
      scanf("%I64d", &v);
      double lf = 0.0, rg = v + (long long)(1e9);
      double md = 0.0;
      for (int it = 0; it < 64; it++) {
        md = (lf + rg) * 0.5;
        pair<int, long long> tmp = getCount(t, md);
        if (tmp.first * 1LL * md - tmp.second >= v)
          rg = md;
        else
          lf = md;
      }
      printf("%.5lf\n", rg);
    }
  }
  return 0;
}