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;
int n, q, op;
long long x, y;
long long bit1[300010];
long long bit2[300010];
vector<long long> v, tmp;
vector<pair<long long, long long> > que;
map<long long, int> m;
void update(int idx, long long val, long long bit[300010]) {
  while (idx < 300010) {
    bit[idx] += val;
    idx += (idx & -idx);
  }
}
long long query(int idx, long long bit[300010]) {
  long long ret = 0;
  while (idx > 0) {
    ret += bit[idx];
    idx -= (idx & -idx);
  }
  return ret;
}
double bs(double lo, double hi, double zn) {
  while (hi - lo > 1e-5) {
    double mid = (hi + lo) / 2;
    long long val = (long long)mid;
    int id;
    if (m.find(val) != m.end()) {
      id = m[val];
    } else {
      map<long long, int>::iterator it = m.upper_bound(val);
      if (it == m.begin()) {
        lo = mid;
        id = -1;
      } else if (it == m.end()) {
        map<long long, int>::reverse_iterator rit = m.rbegin();
        id = rit->second;
      } else {
        map<long long, int>::reverse_iterator rit(it);
        id = rit->second;
      }
    }
    if (id != -1) {
      double n = query(id, bit1);
      double Sn = query(id, bit2);
      if (n >= zn / mid + Sn / mid) {
        hi = mid;
      } else
        lo = mid;
    }
  }
  return lo;
}
int main(void) {
  ios ::sync_with_stdio(false);
  cin >> n >> q;
  for (int i = 1; i <= n; ++i) {
    cin >> x;
    v.push_back(x);
  }
  for (int i = 0; i < q; ++i) {
    cin >> op;
    if (op == 1) {
      cin >> x >> y;
      que.push_back(make_pair(x, y));
    } else {
      cin >> x;
      que.push_back(make_pair(-1, x));
    }
  }
  for (int i = 0; i < v.size(); ++i) {
    tmp.push_back(v[i]);
  }
  for (int i = 0; i < que.size(); ++i) {
    if (que[i].first != -1) {
      tmp.push_back(que[i].second);
    }
  }
  sort(tmp.begin(), tmp.end());
  int cont = 1;
  for (int i = 0; i < tmp.size(); ++i) {
    if (!m[tmp[i]]) m[tmp[i]] = cont++;
  }
  for (int i = 0; i < v.size(); ++i) {
    update(m[v[i]], 1, bit1);
    update(m[v[i]], v[i], bit2);
  }
  for (int i = 0; i < que.size(); ++i) {
    if (que[i].first != -1) {
      que[i].first--;
      long long val = v[que[i].first];
      update(m[val], -1, bit1);
      update(m[val], -val, bit2);
      v[que[i].first] = que[i].second;
      update(m[que[i].second], 1, bit1);
      update(m[que[i].second], que[i].second, bit2);
    } else {
      cout << setprecision(5) << fixed
           << bs(0, (double)1000000000000000LL, (double)que[i].second) << "\n";
    }
  }
  return 0;
}