Space separated String int -> vector<int> Mini
#include <sstream>
int main() {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
int n;
cin >> n;
cin.ignore();
vector<int> nums;
string input;
getline(cin, input);
stringstream ss(input);
int temp1;
// Extract integers from the stringstream and add them to the vector
while (ss >> temp1) {
nums.push_back(temp1);
}
for(int num : nums){
cout << num << " ";
}