http://acm.hdu.edu.cn/showproblem.php?pid=2167
Input
Each board is expressed as a series of lines, where each line is a space-delimited series of numbers. A blank line marks the end of each board (including the last one)(根据题意最后也有一个空行)
#include
<
iostream
>
#include
<
sstream
>
#include
<
string
>
#include
<
vector
>
using
namespace
std;
bool
run()
...
{
strings;
vector<vector<int>>v;
while(true)
...{
if(!getline(cin,s))returnfalse;
if(s=="")break;
stringstreamss(s);
intt;
vector<int>tv;
while(ss>>t)
...{
tv.push_back(t);
}
v.push_back(tv);
}
for(inti=0;i<v.size();i++)
...{
for(intj=0;j<v[i].size();j++)
cout<<""<<v[i][j];
cout<<endl;
}
cout<<endl;

returntrue;
}


int
main()
...
{
while(run());
return0;
}

returntrue;
}


int
main()
...
{
while(run());
return0;
}
HDU 2167 解析
139

被折叠的 条评论
为什么被折叠?



