fork(1) download
  1. #include <iostream>
  2. #include <cstring>
  3.  
  4. using namespace std;
  5. int main() {
  6. string workers;
  7. int fr[10000];
  8. int n;
  9. int x = 0,y = 0;
  10. cin >> n;
  11. // getline(cin, workers[0]);
  12. for (int i = 0; i < n; ++i) {
  13. cin >> workers;
  14.  
  15.  
  16. for (int i = 0; i < n; ++i) {
  17. //int length = workers[i].size();
  18.  
  19. sscanf(workers.c_str(), "%d",&x, "%d",&y);
  20. cout << x <<" "<< y <<"\n";
  21. } }
  22. return 0;
  23. }
  24.  
Success #stdin #stdout 0s 5304KB
stdin
5
Muncitorul 1 a muncit 10 ore
Muncitorul 23 a muncit 5 ore
Muncitorul 3 a muncit 3 ore
Muncitorul 23 a muncit 11 ore
Muncitorul 1 a muncit 2 ore
stdout
0 0
0 0
0 0
0 0
0 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
10 0
10 0
10 0
10 0
10 0