#include <iostream>
#include <cstdio>
#include <string>
using namespace std;
int main()
{
string str;
int k = 0;
while(cin >> str)
{
if(str=="<br>")
{
cout << endl;
k = 0;
continue;
}
if(str=="<hr>")
{
if(k) cout << endl;
for(int i = 0; i < 80; i++)
cout <<"-";
cout << endl;
k = 0;
continue;
}
int h = str.size();
//if(k) cout << " ";
if(k+h+1>80)
{
cout << endl;
cout << str;
k = h;
}
else
{
if(k) cout << " ";
cout << str;
k += h+1;
}
}
printf("\n");
return 0;
}
hdu1088
最新推荐文章于 2021-02-19 00:05:52 发布