Jan long codechef question named point of impact

why I’m getting WA

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

int main() {

ll t;
cin>>t;
while(t--){
    ll n,k,x,y;
    pair<ll,ll>p;
    vector<pair<ll,ll>>v;
    
    cin>>n>>k>>x>>y;
    k--;

    if(x>y){
        ll curXY = y-x+n;
        v.push_back(make_pair(n,curXY));
        v.push_back(make_pair(curXY,n));
        v.push_back(make_pair(0,x-y));
        v.push_back(make_pair(x-y,0));
    }
    if(x<y){
        ll curXY = -y+x+n;
        v.push_back(make_pair(curXY,n));
        v.push_back(make_pair(n,curXY));
        v.push_back(make_pair(y-x,0));
        v.push_back(make_pair(0,y-x));
    }
    if(x==y){
        cout<<n<<" "<<n<<endl;
    }
    
    if(v.size()){
        cout<<v[k%4].first<<" "<<v[k%4].second<<endl;
    }
}
return 0;

}

Hello @talhashamim001 could you please share the link of the question?

Hello @talhashamim001 see this if it helps you:


if you have any doubt you can ask here;
Happy learning!!

I cant see what you have written or given

Hello @talhashamim001 i have given you the video link where can you can know how to approach this question and got to know why your code is failiing.
https://www.youtube.com/watch?v=DMU84e7YTyI
if you still have any doubt you can ask here:
Happy Learning!!