Help me in solving WEPCH problem

My issue

include <bits/stdc++.h>
using namespace std;
define lld long double

int main()
{
long long t;
cin >> t;

while (t--)
{
    lld h, x, y1, y2, k;
    cin >> h >> x >> y1 >> y2 >> k;
    lld a = y1 * k;
    // cout<<ceil(h/y1)<<endl;
    if (a <= h)
    {
        lld b = h - a;
        // cout<<ceil(b/y2) + k<<endl;
        if (ceil(h / x) <= (ceil(b / y2) + k))
        {
            cout << ceil(h / x) << endl;
        }
        else
        {
            // cout<<(b/y2) + k<<endl;
            cout << ceil(b / y2) + k << endl;
        }
    }
    else
    {
        if (ceil(h / x) <= ceil(h / y1))
        {
            cout << ceil(h / x)<<endl;
        }
        else
            cout << ceil(h / y1) << endl;
    }
}
// your code goes here

}

Someone pls help me in find the error in this code, it is giving wrong answer on submission.

My code

#include <bits/stdc++.h>
using namespace std;

int main() {
	// your code goes here

}

Problem Link: Weapon Choice Practice Coding Problem - CodeChef

@perseus_newbie
here plzz refer my c++ code for better understanding

#include <bits/stdc++.h>
using namespace std;

int main() {
	// your code goes here
    int t;
    cin>>t;
    while(t--)
    {
        long long int h,x,y1,y2,k;
        cin>>h>>x>>y1>>y2>>k;
        long long int p1=ceil(h*1.0/x*1.0);
        long long int p2=0;
        if(k*y1>=h)
        {
            p2=ceil(h*1.0/y1*1.0);
        }
        else
        {
            p2=k;
            h=h-(k*y1);
            p2+=ceil(h*1.0/y2*1.0);
        }
        cout<<min(p1,p2)<<endl;
    }
}