fork download
  1. #include <iostream>
  2.  
  3. #define MAX_SIZE 100001
  4.  
  5. int main() {
  6. char buffer[MAX_SIZE];
  7. while(fgets(buffer, MAX_SIZE, stdin)) {
  8. char *p=buffer;
  9. while(*p) ++p;
  10. --p;
  11. do {
  12. printf("%c", *--p);
  13. }while(p!=buffer);
  14. printf("\n");
  15. }
  16. return 0;
  17. }
Success #stdin #stdout 0s 16064KB
stdin
abcdef
hgjkgf
dfsdfsa
sad
fads
zxcxzvxz
vbnvcmnnm
stdout
fedcba
fgkjgh
asfdsfd
das
sdaf
zxvzxcxz
nnmcvnbv