#pragma once
#include"src/miscellaneous/range-xor.hpp"/**
* Author: Teetat T.
* Date: 2024-11-27
* Description: find all range of x such that l <= x xor p < r.
*/template<classF>voidrange_xor(llp,lll,llr,constF&query){for(inti=0;i<60;i++){if(l==r)break;llb=1LL<<i;if(l&b){query(l^p,(l^p)+b);l+=b;}if(r&b){r-=b;query(r^p,(r^p)+b);}if(p&b){p^=b;}}}
#line 3 "src/miscellaneous/range-xor.hpp"
/**
* Author: Teetat T.
* Date: 2024-11-27
* Description: find all range of x such that l <= x xor p < r.
*/template<classF>voidrange_xor(llp,lll,llr,constF&query){for(inti=0;i<60;i++){if(l==r)break;llb=1LL<<i;if(l&b){query(l^p,(l^p)+b);l+=b;}if(r&b){r-=b;query(r^p,(r^p)+b);}if(p&b){p^=b;}}}