84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
ringa_lee
#include #include #include std::string line, num; std::vector> v; size_t linenum = 0; while (getline(cin, line)) { std::istringstream iss(line); while (line >> num) { v.push_back(vector()); v[linenum].push_back(stoi(num)); } ++linenum; }
我刚看完C++ primer,大概是这样的做法吧。
你这个是做OJ上的题吧,如果是OJ的话,其实要求输入和你理解的并不一样, 可以参考一下这个
http://blog.csdn.net/sxheliji...
我刚看完C++ primer,大概是这样的做法吧。
你这个是做OJ上的题吧,如果是OJ的话,其实要求输入和你理解的并不一样, 可以参考一下这个
http://blog.csdn.net/sxheliji...