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 <typename T>
T getint() {
  T x = 0, p = 1;
  char ch;
  do {
    ch = getchar();
  } while (ch <= ' ');
  if (ch == '-') p = -1, ch = getchar();
  while (ch >= '0' && ch <= '9') x = x * 10 + ch - '0', ch = getchar();
  return x * p;
}
template <typename T1, typename T2>
bool umin(T1 &x, const T2 &y) {
  if (x > y) return x = y, true;
  return false;
}
template <typename T1, typename T2>
bool umax(T1 &x, const T2 &y) {
  if (x < y) return x = y, true;
  return false;
}
const int maxn = (int)2e5 + 100;
const int inf = (int)1e9 + 5;
const int mod = (int)1e9 + 7;
const long long llinf = (long long)1e18 + 5;
const long double pi = acos(-1.0);
int fw[maxn];
long long fw2[maxn];
void add(int x, int delta, int val) {
  for (; x < maxn; x |= x + 1) {
    fw[x] += delta;
    fw2[x] += val;
  }
}
void sum(int x, int &cnt, long long &sum) {
  cnt = 0;
  sum = 0;
  for (; x >= 0; x = (x & (x + 1)) - 1) {
    cnt += fw[x];
    sum += fw2[x];
  }
}
int ty[maxn];
pair<long long, int> qu[maxn];
int n, m;
int a[maxn];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> m;
  vector<long long> vals;
  for (int i = (0); i < (n); i++) cin >> a[i], vals.push_back(a[i]);
  for (int i = (0); i < (m); i++) {
    cin >> ty[i];
    if (ty[i] == 1) {
      cin >> qu[i].first >> qu[i].second;
      --qu[i].first;
      vals.push_back(qu[i].second);
    } else
      cin >> qu[i].first;
  }
  sort((vals).begin(), (vals).end());
  vals.erase(unique((vals).begin(), (vals).end()), vals.end());
  for (int i = (0); i < (n); i++) {
    int idx = lower_bound((vals).begin(), (vals).end(), a[i]) - vals.begin();
    add(idx, 1, a[i]);
  }
  for (int i = (0); i < (m); i++) {
    if (ty[i] == 1) {
      int idx = qu[i].first;
      int v = lower_bound((vals).begin(), (vals).end(), a[idx]) - vals.begin();
      int u = lower_bound((vals).begin(), (vals).end(), qu[i].second) -
              vals.begin();
      add(v, -1, -a[idx]);
      add(u, 1, qu[i].second);
      a[idx] = qu[i].second;
    } else {
      long double l = 0, r = 1e15 + 1e10;
      for (int it = (0); it < (100); it++) {
        long double m = (l + r) / 2;
        int idx = (--upper_bound((vals).begin(), (vals).end(), (long long)m)) -
                  vals.begin();
        int cnt;
        long long val;
        sum(idx, cnt, val);
        if (m * cnt - val >= qu[i].first) {
          r = m;
        } else {
          l = m;
        }
      }
      cout.precision(15);
      cout << l << '\n';
      ;
    }
  }
  return 0;
}