Code not working only on codechef ...rest everywhere working fine for SPLST problem code

#include
#include
using namespace std;
int main()
{
long int n,k,a,b,c,x,y;
cin>>k;
if (1<=k && k<=100)
{

    int h[k];
    for (int i=1;i<=k;i++)
    {
        cin>>a;
        cin>>b;
        cin>>c;
        cin>>x;
        cin>>y;
        if (1<=a<=100 && 1<=b<=100 && 1<=c<=100 && 1<=x<=100 &&1<=y<=100  )
        {
            int d=0;
            d=abs(y-c);
            int l=a-d;
            int c=b+l;
            if (c==x && abs(b-x)==l)
                h[i]=1;
            else
                h[i]=0;
        }
    }
    for (int i=1;i<=k;i++)
        if (h[i]==1)
            cout<<"YES"<<endl;
        else
            cout<<"NO"<<endl;
}

}

Plz dont use such titles(i am fed up of people saying code working on pc not on codechef),it’s not that codechef is faulty,it’s just that your solution is wrong,and post link of your question instead of code,and explain your approach(people are not that free to go through your whole code and debug it),and yeah do search it on google before u ask on forum.

sorry since i am new to codechef…i didnt know this