fork download
  1. #include <iostream>
  2. #include <string.h>
  3. using namespace std;
  4.  
  5. int main ()
  6. {
  7. int N;
  8. cin >> N;
  9. string flock[N];
  10. for (int i = 0; i < N; i++)
  11. cin >> flock[i];
  12. for (int i = N - 1; i >= 0; i--)
  13. cout << flock[i];
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0s 4468KB
stdin
3
abc
def
ghi
stdout
ghidefabc