easy java solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    static long segT[];\n    static void build(int s,int e,int i,long a[])\n    {\n        if(s==e)\n        {\n            segT[i]=a[s];\n            return;\n        }\n        int mid=s+(e-s)/2;\n        build(s,mid,2*i+1,a);\n        build(mid+1,e,2*i+2,a);\n        segT[i]=Math.max(segT[2*i+1],segT[2*i+2]);\n    }\n    static void update(int s,int e,int i,int q,long v)\n    {\n        if(s==e)\n        {\n            segT[i]=v;\n            return;\n        }\n        int mid=s+(e-s)/2;\n        if(q<=mid)\n        update(s,mid,2*i+1,q,v);\n        else\n        update(mid+1,e,2*i+2,q,v);\n        segT[i]=Math.max(segT[2*i+1],segT[2*i+2]);\n    }\n    static long range(int s,int e,int i,int qs,int qe)\n    {\n        if(qs<=s&&qe>=e)\n        return segT[i];\n        if(qs>e||qe<s)\n        return Long.MIN_VALUE;\n        int mid=s+(e-s)/2;\n        long l=range(s,mid,2*i+1,qs,qe);\n        long r=range(mid+1,e,2*i+2,qs,qe);\n        return Math.max(l,r);\n    }\n    public List<Boolean> getResults(int[][] queries) {\n        List<Boolean> arr=new ArrayList<>();\n        TreeSet<Integer> set=new TreeSet<>();\n        set.add(0);\n        set.add(100000);\n        HashMap<Integer,Integer> map=new HashMap<>();\n        map.put(0,0);\n        map.put(100000,100000);\n        segT=new long[5*(int)(1e5)];\n        for(int i[]:queries) {\n            if(i[0]==1) {\n                set.add(i[1]);\n                int prev=set.lower(i[1]);\n                int next=set.higher(i[1]);\n                map.put(next,next-i[1]);\n                map.put(i[1],i[1]-prev);\n                update(0,100000,0,i[1],map.get(i[1]));\n                update(0,100000,0,next,map.get(next));\n\n            }\n            else {\n               int prev=set.lower(i[1]);\n                if(i[1]-prev>=i[2]) {\n                    arr.add(true);\n                    continue;\n                }\n                else if(range(0,100000,0,0,i[1])>=i[2]) {\n                    arr.add(true);\n                    continue;\n                }\n                arr.add(false);\n            }\n        }\n        return arr;\n    }\n}\n```
['Java']