-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1733B. Rule of League.cpp
59 lines (46 loc) · 991 Bytes
/
1733B. Rule of League.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
using str = string;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#define mp make_pair
#define f first
#define s second
using vi = vector<int>;
using vl = vector<ll>;
using vs = vector<str>;
using vc = vector<char>;
#define sz(x) int((x).size())
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define pb push_back
#define eb emplace_back
const int mod = 998244353; // 1e9+7;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int tc = 1;
cin >> tc;
while (tc--) {
int n, x, y;
cin >> n >> x >> y;
if (x > y) swap(x, y);
if (x || !y || (n - 1) % y) {
cout << -1 << '\n';
continue;
}
for (int k = 2; k <= n; k += y) {
for (int i = 1; i <= y; i++) cout << k << ' ';
}
cout << '\n';
}
return 0;
}