int num,k; vector<int> vec; while(cin>>num) { if (getchar()=='\n') break; vec.push_back(num); }