fork download
  1. #include <iostream>
  2. #include <string.h>
  3. #include <vector>
  4. #include <stdio.h>
  5.  
  6. using namespace std;
  7.  
  8. int main(void) {
  9.  
  10. int n, m, x, y, z;
  11. vector<string> inputs;
  12. string read;
  13. while (1){
  14. getline(cin, read);
  15. if(!read.compare("0 0"))
  16. break;
  17. inputs.push_back(read);
  18. }
  19. sscanf(inputs[0].c_str(), "%d %d", &n, &m);
  20. sscanf(inputs[1].c_str(), "%d %d %d", &x, &y, &z);
  21.  
  22. cout<<n<<" "<<m<<endl;
  23. cout<<x<<" "<<y<<" "<<z<<endl;
  24.  
  25. return 0;
  26. }
  27.  
Success #stdin #stdout 0s 4528KB
stdin
1 2
3 4 5
0 0
stdout
1 2
3 4 5