Problem Link: SUMARRAY Problem - CodeChef

### My Solution

```
void solve(){
ll n, k;
cin >> n >> k;
ll nb2 = n/2;
if((nb2%2)!=(k%2)) {cout << "-1\n"; return;}
vector<ll> v(nb2, 3);
k-=nb2*3;
if(k<0) {cout << "-1\n"; return;}
ll kb2 = k/2;
ll q = kb2/nb2;
ll r = kb2%nb2;
if(r>0 && 5+2*q>1e5) {cout << "-1\n"; return;}
if(r==0 && 3+2*q>1e5) {cout << "-1\n"; return;}
fr(i,0,nb2) v[i]+=2*q;
fr(i,0,r) v[i]+=2;
fr(i,0,nb2){
cout << v[i]/2 << " " << v[i]/2 + 1 << " ";
}
cout << endl;
}
```

Could anyone please point out the issue here?

Getting WA on last Test Case …