Hi can you describe your approach that you used in the code?
used this condition…
int k=(r-l)/3;
if((r-l)%3==0 && k<=m)
{
cout<<"No";
}
else
{
cout<<"Yes";
}
1 Like