读入带箭头和空格,以内容结尾的字符串
eg. 1 -> 2 -> 3 -> 4
void read()
{ string s;
getline(cin,s);
int c = 0;
int i = 0;
int arr[100];
for(auto x : s)
{
if(x >= '0' && x <='9') {
c = c * 10 + (x - '0');
}
else if(c){
arr[i ++] = c;
c = 0;
}
}
if(c) arr[i] = c;
}