Help me in solving ANTITRI problem

My issue

where the code is getting wrong infact im satisfying all the conditions

My code

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

void solve(){
    long long  n,l;
    cin>>n>>l;
    vector<long long>v;
    long long  k=l;
    for(int i=0;i<n;i++){
        if(v.size()==n) break;
       v.push_back(l+1);
       if(v.size()==n) break;
       v.push_back(2*(l+1)+1);
       l=(2*(l+1)+1+k);
        
    }
    for(int i=0;i<n;i++){
        cout<<v[i]<<" ";
    }
    cout<<endl;
}

int main() {
    int t;
    cin>>t;
    while(t--){
        solve();
        
    }
	// your code goes here

}

Problem Link: Anti-Triangle Practice Coding Problem - CodeChef

@shrishail33
U have to keep in mind that all values of array must be within 10^9 .
plzz refer my code for better understanding of the logic

#include <iostream>
using namespace std;

int main() {
	// your code goes here
	int t;
	cin>>t;
	while(t--)
	{
	    long long int n,l;
	    cin>>n>>l;
	    if(l>=1000000)
	    {
	        for(int i=1;i<=n;i++)
	        {
	            cout<<i<<" ";
	        }
	    }
	    else
	    {
	        cout<<1<<" ";
	        int pre=1;
	        for(int i=1;i<n;i++)
	        {
	            cout<<pre+l<<" ";
	            pre+=l;
	        }
	    }
	    cout<<endl;
	}
	return 0;
}