fork download
  1. /*
  2. Task: Problem 6.09
  3. Date: Dec 24, 2020
  4. Author: aLittleLove (Minh Vu)
  5. */
  6.  
  7. #include<bits/stdc++.h>
  8.  
  9. using namespace std;
  10.  
  11. int main()
  12. {
  13. ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
  14. //freopen("input.txt","r",stdin);
  15. int n, p, k; cin >> n;
  16. vector<int> a(n);
  17. for (int i=0; i<n; i++) cin >> a[i];
  18. cin >> p >> k;
  19. for (int i=0; i<n; i++) if (i<p || i>p+k-1) cout << a[i] << " ";
  20. return 0;
  21. }
Success #stdin #stdout 0s 4980KB
stdin
5
1 2 3 4 5
4
1
stdout
1 2 3 4