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>
#pragma GCC optimize("O3")
using namespace std;
int add(int a, int b) {
  long long x = a + b;
  if (x >= 1000000007) x -= 1000000007;
  if (x < 0) x += 1000000007;
  return x;
}
long long mul(long long a, long long b) { return (a * b) % 1000000007; }
long long pw(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = (ans * a) % 1000000007;
    a = (a * a) % 1000000007;
    b >>= 1;
  }
  return ans;
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
long long rand_seed() {
  long long a = rng();
  return a;
}
int n, q;
int xox = 0;
map<int, int> val;
vector<long long> pq;
struct qu {
  long long tip, pi, val;
};
qu v[100002];
long long st[200002], aib[200002], aib2[200002];
void add(int poz, long long val, int xo) {
  for (; poz <= xox; poz += (poz & (-poz))) {
    aib[poz] += val;
    aib2[poz] += xo;
  }
}
pair<long long, int> compute(int poz) {
  pair<long long, int> ans = {0, 0};
  for (; poz; poz -= (poz & (-poz))) {
    ans.first += aib[poz];
    ans.second += aib2[poz];
  }
  return ans;
}
int cb(long long qt) {
  int st = 0;
  int dr = pq.size() - 1;
  int ans = -1;
  while (st <= dr) {
    int mid = (st + dr) / 2;
    if (qt >= pq[mid])
      ans = mid, st = mid + 1;
    else
      dr = mid - 1;
  }
  if (ans == -1) return 0;
  return val[pq[ans]];
}
void solve(long long val) {
  double ans1 = 0.0000;
  double ans2 = 1e16;
  for (int i = 1; i <= 250; ++i) {
    if (ans2 - ans1 <= 1e-5) break;
    double mid = (ans1 + ans2) * 0.50000;
    long long mx = floor(mid + 1e-9);
    pair<long long, int> qut = compute(cb(mx));
    double totalquantity = mid * qut.second - 1.00000 * qut.first - val;
    if (totalquantity >= 1e-9)
      ans2 = mid;
    else
      ans1 = mid;
  }
  cout << fixed << setprecision(6) << ans1 << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> q;
  for (int i = 1; i <= n; ++i) cin >> st[i], pq.push_back(st[i]);
  for (int i = 1; i <= q; ++i) {
    cin >> v[i].tip;
    if (v[i].tip == 1)
      cin >> v[i].pi >> v[i].val, pq.push_back(v[i].val);
    else
      cin >> v[i].val;
  }
  sort(pq.begin(), pq.end());
  for (int i = 0; i < pq.size(); ++i)
    if (i == 0 || pq[i] > pq[i - 1]) val[pq[i]] = ++xox;
  for (int i = 1; i <= n; ++i) add(val[st[i]], st[i], 1);
  for (int i = 1; i <= q; ++i) {
    if (v[i].tip == 1) {
      add(val[st[v[i].pi]], -st[v[i].pi], -1);
      st[v[i].pi] = v[i].val;
      add(val[st[v[i].pi]], st[v[i].pi], 1);
    } else
      solve(v[i].val);
  }
  return 0;
}