fork download
  1. #include <iostream>
  2. #include <cmath>
  3. #include <algorithm>
  4.  
  5. using namespace std;
  6.  
  7. int main() {
  8. ios_base::sync_with_stdio(0);
  9. cin.tie(0);
  10. cout.tie(0);
  11.  
  12. int A;
  13. int arr[1001];
  14.  
  15. cin >> A;
  16.  
  17. for (int i = 0 ; i <= A ; i++) {
  18. cin >> arr[i];
  19. for (int j = A ; j >= 0 ; j--) {
  20. cout <<arr[j]<<" ";
  21. }
  22. }
  23.  
  24.  
  25. return 0;
  26. }
  27.  
Success #stdin #stdout 0.01s 5328KB
stdin
Standard input is empty
stdout
94208