Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- #define ll long long
- #define _test int _TEST; cin>>_TEST; while(_TEST--)
- #define pb push_back
- int main()
- {
- _test
- {
- int n, x, y;
- cin>>x>>y>>n;
- vector<int> a(n);
- a[n-1] = y;
- for(int i=n-2, j=1; i>=0; i--)
- a[i] = a[i+1]-(j++);
- if(a[0] < x)
- {
- cout<<-1<<"\n";
- continue;
- }
- a[0] = x;
- for(auto e: a)
- cout<<e<<" ";
- cout<<"\n";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement