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;
string to_string(const string& s) { return '"' + s + '"'; }
string to_string(const bool b) { return (b ? "true" : "false"); }
string to_string(const char* s) { return to_string((string)s); }
string to_string(const char c) {
  string s = "'";
  s += c;
  s += "'";
  return s;
}
template <class T, class U>
string to_string(const pair<T, U>& p) {
  string s = "(";
  s += to_string(p.first);
  s += ", ";
  s += to_string(p.second);
  s += ")";
  return s;
}
template <class T>
string to_string(const T& a) {
  bool first = true;
  string s = "{";
  for (const auto& x : a) {
    if (!first) {
      s += ", ";
    }
    first = false;
    s += to_string(x);
  }
  s += "}";
  return s;
}
void debug_out() { cerr << '\n'; }
template <class Head, class... Tail>
void debug_out(Head head, Tail... tail) {
  cerr << ' ' << to_string(head);
  debug_out(tail...);
}
using ll = long long;
using ld = long double;
const int mod = 1e9 + 7;
const int inf = 2e9;
const ll inf64 = 7e18l;
vector<ld> values;
int index(ld val) {
  return lower_bound(values.begin(), values.end(), val) - values.begin();
}
struct node {
  ll sum;
  int cnt;
};
vector<node> tree;
node merge(node a, node b) {
  node res = a;
  res.sum += b.sum;
  res.cnt += b.cnt;
  return res;
}
void update(int t, int nl, int nr, int ind, node val) {
  if (nl > ind || nr < ind) {
    return;
  }
  if (nl == nr) {
    tree[t].sum += val.sum;
    tree[t].cnt += val.cnt;
    return;
  }
  int mid = nl + (nr - nl) / 2;
  update(2 * t, nl, mid, ind, val);
  update(2 * t + 1, mid + 1, nr, ind, val);
  tree[t] = merge(tree[2 * t], tree[2 * t + 1]);
}
node queryy(int t, int nl, int nr, int l, int r) {
  if (nl > r || nr < l) {
    return node{0, 0};
  }
  if (nl >= l && nr <= r) {
    return tree[t];
  }
  int mid = nl + (nr - nl) / 2;
  return merge(queryy(2 * t, nl, mid, l, r),
               queryy(2 * t + 1, mid + 1, nr, l, r));
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(20);
  int n, q;
  cin >> n >> q;
  vector<ll> a(n);
  vector<vector<ll>> query(q);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    values.push_back(a[i]);
  }
  for (int i = 0; i < q; ++i) {
    int type;
    cin >> type;
    query[i].push_back(type);
    if (type == 1) {
      int ind, x;
      cin >> ind >> x;
      --ind;
      query[i].push_back(ind);
      query[i].push_back(x);
      values.push_back(x);
    } else {
      ll v;
      cin >> v;
      query[i].push_back(v);
    }
  }
  sort(values.begin(), values.end());
  int m = values.size();
  tree.resize(4 * m);
  for (int i = 0; i < n; ++i) {
    int j = index(a[i]);
    update(1, 0, m - 1, j, node{a[i], 1});
  }
  for (vector<ll>& vec : query) {
    int type = vec[0];
    if (type == 1) {
      int ind = vec[1];
      ll x = vec[2];
      int cur_val = a[ind];
      update(1, 0, m - 1, index(cur_val), node{-cur_val, -1});
      update(1, 0, m - 1, index(x), node{x, 1});
      a[ind] = x;
    } else {
      int move = 100;
      ld l = 0;
      ld r = 1e16l;
      ld answer = 0;
      ll v = vec[1];
      while (move--) {
        ld mid = (l + r) / 2;
        int ind = index(mid);
        node res = queryy(1, 0, m - 1, 0, ind - 1);
        int cnt = res.cnt;
        ll sum = res.sum;
        if (cnt * mid - sum >= v) {
          answer = mid;
          r = mid;
        } else {
          l = mid;
        }
      }
      cout << answer << '\n';
    }
  }
  return 0;
}