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 std::vector;
namespace IO_base {
const int MAXB = 1 << 10;
char gbuf[MAXB], *ps = gbuf, *pt = gbuf;
inline char Getchar() {
  if (ps == pt) {
    ps = gbuf;
    pt = gbuf + fread(gbuf, 1, MAXB, stdin);
  }
  return (ps == pt) ? EOF : *ps++;
}
}  // namespace IO_base
namespace IO_number {
long long read() {
  long long x = 0;
  char c = IO_base::Getchar();
  bool f = 0;
  while (c < '0' || c > '9')
    (c == '-') ? f = 1, c = IO_base::Getchar() : c = IO_base::Getchar();
  while (c >= '0' && c <= '9')
    x = (x << 1) + (x << 3) + (48 ^ c), c = IO_base::Getchar();
  return (f) ? -x : x;
}
}  // namespace IO_number
using namespace IO_number;
const int MAXN = 1e5, MAXA = 1e9;
const int MAXN_Seg = (30 * MAXN + 30 * MAXN) + 20;
namespace SegmentTree {
int tot = 1;
int ls[MAXN_Seg], rs[MAXN_Seg];
long long sum[MAXN_Seg];
int cnt[MAXN_Seg];
int new_node() { return ++tot; }
inline void pushup(const int &x) {
  sum[x] = (sum[ls[x]] + sum[rs[x]]);
  cnt[x] = (cnt[ls[x]] + cnt[rs[x]]);
}
int modify(const int &pos, const int &typ, const int &nl = 0,
           const int &nr = MAXA, int x = 1) {
  if (!x) x = new_node();
  if (nl == nr)
    return cnt[x] += typ, sum[x] += typ * pos, x;
  else {
    const int mid = (nl + nr) >> 1;
    if (pos <= mid)
      ls[x] = modify(pos, typ, nl, mid, ls[x]);
    else
      rs[x] = modify(pos, typ, mid + 1, nr, rs[x]);
    pushup(x);
    return x;
  }
}
long long query_capacity(const int &limit, const int &nl = 0,
                         const int &nr = MAXA, const int &x = 1) {
  if (!x) return 0;
  if (nl == nr)
    return 1ll * limit * cnt[x] - sum[x];
  else {
    const int mid = (nl + nr) >> 1;
    if (limit <= mid)
      return query_capacity(limit, nl, mid, ls[x]);
    else
      return (1ll * limit * cnt[ls[x]] - sum[ls[x]]) +
             query_capacity(limit, mid + 1, nr, rs[x]);
  }
}
int query_kth(const int &k, const int &nl = 0, const int &nr = MAXA,
              const int &x = 1) {
  if (nl == nr)
    return nl;
  else {
    const int mid = (nl + nr) >> 1;
    if (k <= cnt[ls[x]])
      return query_kth(k, nl, mid, ls[x]);
    else
      return query_kth(k - cnt[ls[x]], mid + 1, nr, rs[x]);
  }
}
}  // namespace SegmentTree
using namespace SegmentTree;
int main() {
  const int n = read(), m = read();
  vector<int> arr(n);
  for (int i = 0; i < n; ++i) arr[i] = read(), modify(arr[i], 1);
  for (int tt = 0; tt < m; ++tt) {
    const int op = read();
    if (op == 1) {
      const int p = read() - 1, x = read();
      modify(arr[p], -1);
      arr[p] = x;
      modify(arr[p], 1);
    } else {
      const long long v = read();
      int l = 0, r = n - 1;
      int ans = n;
      while (l <= r) {
        const int mid = (l + r) >> 1;
        if (query_capacity(query_kth(mid + 1)) >= v)
          ans = std::min(ans, mid), r = mid - 1;
        else
          l = mid + 1;
      }
      const int tmp = query_kth(ans + 1 - 1);
      printf("%.5lf\n", tmp + 1.0 * (v - query_capacity(tmp)) / (ans + 1 - 1));
    }
  }
}