1 #include<string>
 2 #include<vector>
 3 #include<sstream>
 4 #include <iostream>
 5 #include <algorithm>
 6 using namespace std;
 7 
 8 
 9 
10 int main()
11 {
12     string s="724 42 13 17 1199 577 1001 1101 483 845 196 1163 360 985 296 1044 917 1007 898 119 1016 23 56 1159 1194 372 951 991 947 1053 433 1017 1011 391 110 9 230 245 788 830 747 2 3";
13     istringstream isin(s);
14     stringstream sin(s);
15     vector <int> v;
16     int i;
17     string t;
18     while (sin>>i)
19     {
20         cout<<i<<endl;
21     }
22     while (getline(sin,t,' '))
23     {
24         cout<<t<<endl;
25     }
26 }

 

posted on 2013-05-01 23:51  宇睿  阅读(235)  评论(0编辑  收藏  举报