很简单
vector<int> input
char c;
while((c=getchar())!='\n')
{
if(c!=' ')
{
ungetc(c);
int val;
cin>>val;
input.push_back(val);
}
}