#include <bits/stdc++.h>
#define int long long
using namespace std;
void solve()
{
int n;
cin >> n;
int x, y;
cin >> x >> y;
if (x == 0 && y == 0 || x && y)
cout << "-1\n";
else
{
if (x < y)
swap (x, y);
if ((n - 1) % x != 0)
cout << "-1\n";
else
{
int cnt = 2;
for (int i = 1; i < n; i ++)
{
cout << cnt << ' ';
if (i % x == 0)
cnt += x;
}
cout << '\n';
}
}
}
signed main()
{
int T;
cin >> T;
while (T --)
solve();
return 0;
}
CodeForces 1733B
最新推荐文章于 2024-07-10 22:49:54 发布