输入的数据可以不用暂时储存,可以随时处理:
while(std::cin >> a >> b)// { if(...) break; }
【每日代码2】刷算法题的简便输入
原文:https://www.cnblogs.com/jakefish/p/12242699.html