Deepak and Primes II

what’s wrong with my code why this not work

#include<bits/stdc++.h>
#define N 100004
#define ll long long
using namespace std;
bitset<N> arr;
bitset<N> pp;
void sieves(){
	for(long  i = 3 ;i<N;i+=2){
		arr[i] = 1;
		}
		arr[2] = true;
		for(long i = 3 ;i<N;i+=2){
			if(arr[i]){
				for(long j = i*i ; j < N ; j += 2*i){
    					arr[j] = 0;
				}
			}
		}
		
}

void SegmentedSieve(ll a, ll b){
    pp.set();
	if(a==2){
		cout<<"2\n";
		a = 3;
	}
	if(a&1==0){
		a++;
		pp[0] = 0;
	}

    for(ll i = 3; i*i<= b; i+=2){
        for(ll j = a ; j <= b ;j+=2){
            if(arr[i]){
                if(j==i)
                    continue;
                else if(j%i == 0)
                    pp[j-a] = 0;
            }
        }
        
    }
    for(ll i = a;i<=b;i+=2){
        if(pp[i-a]){
            cout<<i<<endl;
        }
    }
    cout<<endl;
}
int main() {
	sieves();

    ll x, y;
    int t;
    cin>>t;
    while(t--){
    cin>>x>>y;
    SegmentedSieve(x, y);
    }
	return 0;
}