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 = 1e5 + 5, M = 1e9;
int sz, n, q, a[N], type, p, x;
long double l, r, mid, v;
struct item {
  int cnt;
  long long sum;
  item *l, *r;
  item() {
    cnt = 0;
    sum = 0;
    l = nullptr;
    r = nullptr;
  }
};
typedef item *node;
node root = new item();
inline int Cnt(node v) { return v ? v->cnt : 0; }
inline long long Sum(node v) { return v ? v->sum : 0; }
inline void update(node v, int l, int r, int pos, int cnt, int val) {
  if (l == r) {
    v->cnt += cnt;
    v->sum += val;
    return;
  }
  int mid = (r + l) >> 1;
  if (pos <= mid) {
    if (!v->l) {
      v->l = new item();
    }
    update(v->l, l, mid, pos, cnt, val);
  } else {
    if (!v->r) {
      v->r = new item();
    }
    update(v->r, mid + 1, r, pos, cnt, val);
  }
  v->cnt = Cnt(v->l) + Cnt(v->r);
  v->sum = Sum(v->l) + Sum(v->r);
}
inline int get_cnt(node v, int l, int r, int tl, int tr) {
  if (!v || l > r || tl > r || l > tr) {
    return 0;
  }
  if (tl <= l && r <= tr) {
    return v->cnt;
  }
  int mid = (r + l) >> 1;
  return get_cnt(v->l, l, mid, tl, tr) + get_cnt(v->r, mid + 1, r, tl, tr);
}
inline long long get_sum(node v, int l, int r, int tl, int tr) {
  if (!v || l > r || tl > r || l > tr) {
    return 0;
  }
  if (tl <= l && r <= tr) {
    return v->sum;
  }
  int mid = (r + l) >> 1;
  return get_sum(v->l, l, mid, tl, tr) + get_sum(v->r, mid + 1, r, tl, tr);
}
inline bool check(long double x, long double v) {
  bool e = (get_cnt(root, 0, sz, 0, min((long long)sz, (long long)x)) * x -
            get_sum(root, 0, sz, 0, min((long long)sz, (long long)x))) <= v;
  return e;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(7);
  sz = 1;
  while (sz < M) {
    sz += sz;
  }
  cin >> n >> q;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    update(root, 0, sz, a[i], 1, a[i]);
  }
  while (q--) {
    cin >> type;
    if (type == 1) {
      cin >> p >> x;
      update(root, 0, sz, a[p], -1, -a[p]);
      a[p] = x;
      update(root, 0, sz, x, 1, x);
    } else {
      cin >> v;
      l = 0, r = 1e15;
      for (int i = 1; i <= 150; i++) {
        mid = (r + l) / 2;
        if (check(mid, v)) {
          l = mid;
        } else {
          r = mid;
        }
      }
      cout << l << "\n";
    }
  }
}