what’s wrong with my code ?
#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){ // a is always odd we iterate
if(arr[i]){ // only start from a (odd)with the step of 2
if(j==i)
continue;
else if(j%i == 0)
pp[j-a] = 0;
}
}
}
for(ll i = a;i<=b;i+=2){ // a is odd iterate only odd
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;
}