// I SELL YOU...! #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; using P = pair; using TP = tuple; void init_io(){ cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(18); } signed main(){ init_io(); ll n,m,k; cin >> n >> m >> k; vector a(n); queue

que; set st; for (int i=0;i> a[i]; if (a[i] <= m) { que.push(P(a[i], 1)); } } while(!que.empty()) { auto [v, cnt] = que.front(); que.pop(); st.insert(v); if (cnt == k) continue; for (int i=0;i