i am confused to what is the problem in my code would appreciate if someone could help me.

#include <stdio.h>

int main(){

//initailizing the variables

int T,N,X,Y,K,value;

scanf("%d",&T);//no of test cases

if (T > 100 || T < 1 ){return 0;}

int output[T];

for(int i = 0 ; i < T ; i++){

//getting the input and checking for fault in any constraints

```
scanf("%d",&N);
if (N > 1000 || N < 1 ){return 0;}//no of cities
scanf("%d",&K);
if (K > 1000 || K < 0 ){return 0;}//change factor
scanf("%d",&X);
if (X > N-1 || X < 0 ){return 0;}//infected city
scanf("%d",&Y);
if (Y > N-1 || Y < 0 ){return 0;}//request status of the city
if (N < K){K = K % N ;}//if k is greater than the N
if(K != 0){
```

//at zero k will /0 error for this algo so to remove that

for(int i = 0; i < N/K;i++){//it will take only n/k times to return to the same value

value = (X + i * K) % N;

if(value == Y % N){break;}

}

}

else{

if (X == Y){value = Y % N;}

else {value = (Y + 1) % N;}

}

if(value == Y % N){output[i] = 1;}

else{output[i] = 0;}

}

for(int i = 0 ;i < T;i++){

if (output[i] == 1){printf(“YES\n”);}

else {printf(“NO\n”);}}

return 0;

}