#include <sstream>
int main(){
vector<string> arr;
string s;
getline(cin, s);
stringstream ss(s);
while(getline(ss, s, ‘ ‘)){
arr.push_back(s);
}
for(auto &it:arr){
cout<<it<<" ";
}
return 0;
}
2023-11-15 18:18:58
#include <sstream>
int main(){
vector<string> arr;
string s;
getline(cin, s);
stringstream ss(s);
while(getline(ss, s, ‘ ‘)){
arr.push_back(s);
}
for(auto &it:arr){
cout<<it<<" ";
}
return 0;
}