JS Solution - Segment tree
Pro tip: Love Xie Chu Ling \uD83D\uDC9C\n\n# Complexity\n- let n = queries.length\n- Time complexity: O(nlogn)\n- Space complexity: O(n)\n\n# Code\njs\nlet MAX 
Pro tip: Love Xie Chu Ling \uD83D\uDC9C\n\n# Complexity\n- let `n = queries.length`\n- Time complexity: $$O(nlogn)$$\n- Space complexity: $$O(n)$$\n\n# Code\n```js\nlet MAX = 100002;\nlet marked = new Uint8Array(MAX + 1);\nlet stm = new Uint32Array(4 * (MAX + 1));\nlet stl = new Uint32Array(4 * (MAX + 1));\nlet str = new Uint32Array(4 * (MAX + 1));\n\nfunction build(node, l, r) {\n  let len = r - l + 1;\n  stm[node] = len;\n  stl[node] = len;\n  str[node] = len;\n\n  if (r == l) {\n    return;\n  }\n\n  let m = (l + r) >> 1;\n  let c = node << 1;\n  build(c + 1, l, m);\n  build(c + 2, m + 1, r);\n}\n\nfunction set(qi, node, l, r) {\n  if (l == r) {\n    return;\n  }\n\n  let m = (l + r) >> 1;\n  let c = node << 1;\n  if (qi < m) {\n    set(qi, c + 1, l, m);\n  } else if (qi > m) {\n    set(qi, c + 2, m + 1, r);\n  }\n  stm[node] = Math.max(stm[c + 1], stm[c + 2]);\n  if (!marked[m]) {\n    stm[node] = Math.max(stm[node], str[c + 1] + stl[c + 2]);\n  }\n\n  stl[node] = stl[c + 1];\n  if (!marked[m] && stl[c + 1] == m - l + 1) {\n    stl[node] += stl[c + 2];\n  }\n\n  str[node] = str[c + 2];\n  if (!marked[m] && str[c + 2] == r - m) {\n    str[node] += str[c + 1];\n  }\n}\n\nlet ok = false;\nfunction check(x, sz, node, l, r) {\n  if (l > x) {\n    return 0;\n  }\n  if (r <= x) {\n    if (stm[node] >= sz) {\n      ok = true;\n    }\n    return stl[node];\n  }\n\n  let m = (l + r) >> 1;\n  let c = node << 1;\n\n  check(x, sz, c + 1, l, m);\n  if (ok) {\n    return 0;\n  }\n\n  if (m >= x) {\n    let ll = Math.min(stl[node], x - l + 1);\n    if (ll >= sz) {\n      ok = true;\n    }\n    return ll;\n  }\n\n  let rl = check(x, sz, c + 2, m + 1, r);\n  if (ok) {\n    return 0;\n  }\n  if (!marked[m] && str[c + 1] + rl >= sz) {\n    ok = true;\n    return 0;\n  }\n\n  let ll = stl[c + 1];\n  if (!marked[m] && ll === m - l + 1) {\n    ll += rl;\n  }\n  return ll;\n}\n\n/**\n * @param {number[][]} queries\n * @return {boolean[]}\n */\nvar getResults = function (queries) {\n  let n = queries.length;\n  marked.fill(0);\n  build(0, 0, MAX);\n\n  let res = [];\n\n  for (let i = 0; i < n; i++) {\n    let [q, x, sz] = queries[i];\n    --x;\n\n    if (q == 1) {\n      marked[x] = 1;\n      set(x, 0, 0, MAX);\n    }\n    else {\n      ok = false;\n      check(x, sz, 0, 0, MAX);\n      res.push(ok);\n    }\n  }\n\n  return res;\n};\n```
['Segment Tree', 'JavaScript']