Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <string.h>
- #include <vector>
- #include <sstream>
- using namespace std;
- int main()
- {
- string newString, input;
- vector <int> nums(1);
- vector <int> nums2(1);
- vector <int> nums3(1);
- while(getline(cin, input))
- {
- stringstream stream;
- stream.str(input);
- while(stream >> newString)
- {
- nums.push_back(stoi(newString));
- }
- getline(cin, input);
- stream.str(input);
- stream.clear();
- while(stream >> newString)
- {
- nums2.push_back(stoi(newString));
- }
- getline(cin, input);
- stream.str(input);
- stream.clear();
- while(stream >> newString)
- {
- nums3.push_back(stoi(newString));
- }
- for(int i =1; i< nums.size(); i++)
- {
- cout << nums[i] << endl;
- }
- for(int i =1; i< nums2.size(); i++)
- {
- cout << nums2[i] << endl;
- }
- for(int i =1; i< nums3.size(); i++)
- {
- cout << nums3[i] << endl;
- }
- }
- }
Add Comment
Please, Sign In to add comment