fork(1) download
  1. #include<iostream>
  2. #include<cstring>
  3. #include<string>
  4. using namespace std;
  5.  
  6. const int MAX_SIZE = 2001;
  7.  
  8. int main() {
  9. char str[1000][1000];
  10. int line = 0;
  11. while (cin.eof()) {
  12. cin.getline(str[line], 100);
  13. ++line;
  14. cout << str[line] << "\n";
  15. }
  16. for (int i = 0; i <= line; ++i) {
  17. cout << str[i] << "\n";
  18. }
  19. return 0;
  20. }
Success #stdin #stdout 0.01s 5444KB
stdin
fWFE
wrg

wgr
e
e
er
er
r
stdout