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 MOD = 1000 * 1000 * 1000 + 7;
const double INF = 1e50;
const double EPS = 1e-9;
const double pi = acos(-1.0);
const int maxn = 100010;
template <typename T>
inline T sqr(T n) {
  return (n * n);
}
std::mt19937 mt(chrono::steady_clock::now().time_since_epoch().count());
std::uniform_int_distribution<> dist(0, 2000000000);
int next_rnd() { return dist(mt); }
struct Node {
  Node *l, *r;
  int key, prior, size, cnt;
  long long sum;
};
Node* NULL_NODE;
void init(Node* it, int x) {
  it->l = NULL_NODE;
  it->r = NULL_NODE;
  it->key = x;
  it->prior = next_rnd();
  it->size = 1;
  it->cnt = 1;
  it->sum = x;
}
inline void update(Node* v) {
  if (v != NULL_NODE) {
    v->sum = v->key * v->cnt + v->l->sum + v->r->sum;
    v->size = v->cnt + v->l->size + v->r->size;
  }
}
void split(Node* v, Node*& l, Node*& r, int key) {
  if (v == NULL_NODE) {
    l = r = NULL_NODE;
    return;
  }
  if (v->key < key) {
    split(v->r, v->r, r, key);
    l = v;
  } else {
    split(v->l, l, v->l, key);
    r = v;
  }
  update(r);
  update(l);
}
Node* merge(Node* l, Node* r) {
  if (l == NULL_NODE || r == NULL_NODE) return (l != NULL_NODE) ? l : r;
  Node* ans;
  if (l->prior > r->prior) {
    l->r = merge(l->r, r);
    ans = l;
  } else {
    r->l = merge(l, r->l);
    ans = r;
  }
  update(l);
  update(r);
  return ans;
}
void erase(Node*& v, int val) {
  if (v == NULL_NODE) return;
  if (v->key == val) {
    if (v->cnt > 0) {
      v->cnt--;
    } else {
      v = merge(v->l, v->r);
    }
    update(v);
  }
  if (v->key < val)
    erase(v->r, val);
  else
    erase(v->l, val);
  update(v);
}
void insert_real(Node*& v, Node* it) {
  if (v == NULL_NODE) {
    v = it;
  } else if (it->prior > v->prior) {
    split(v, it->l, it->r, it->key);
    v = it;
  } else {
    if (v->key <= it->key) {
      insert_real(v->r, it);
    } else {
      insert_real(v->l, it);
    }
  }
  update(v);
}
bool maybe_insert(Node* v, int val) {
  if (v == NULL_NODE) {
    return false;
  }
  bool res;
  if (v->key == val) {
    v->cnt++;
    res = true;
  } else {
    res = maybe_insert(v->key < val ? v->r : v->l, val);
  }
  update(v);
  return res;
}
double solve(Node* v, long long val, int add = 0, long long sm = 0) {
  if (v == NULL_NODE) return INF;
  long long sz = add + v->l->size;
  long long _sm = sm + v->l->sum;
  long long to_equalize = sz * v->key - _sm;
  if (to_equalize > val) {
    return solve(v->l, val, add, sm);
  }
  double ans = v->key + (val - to_equalize + .0) / (sz + v->cnt);
  ans = min(ans, solve(v->r, val, sz + v->cnt, _sm + v->cnt * v->key));
  return ans;
}
int n, q, h[maxn], p, x, tp;
Node* root;
long long v;
void insert(int val) {
  if (maybe_insert(root, val)) {
    return;
  }
  Node* to_insert = new Node();
  init(to_insert, val);
  insert_real(root, to_insert);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  NULL_NODE = new Node({NULL, NULL, 0, 0, 0, 0});
  root = NULL_NODE;
  cin >> n >> q;
  for (int i = 0; i < n; i++) {
    cin >> h[i];
    insert(h[i]);
  }
  while (q-- > 0) {
    cin >> tp;
    if (tp == 1) {
      cin >> p >> x;
      p--;
      erase(root, h[p]);
      h[p] = x;
      insert(h[p]);
    } else {
      cin >> v;
      cout << fixed << setprecision(8) << solve(root, v) << endl;
    }
  }
  return 0;
}