ZOJ 1151

[复制链接]
查看11 | 回复1 | 2008-6-15 17:47:59 | 显示全部楼层 |阅读模式
#include
#include
using namespace std;
int main()
{

int n; cin>>n;

getchar();



while ( n ){

string s;

getline(cin,s);



string::size_type start=0,end=0,target=0;



for ( string::size_type i=0; i!=s.size();)

if ( s==' ' ) {

cout
#include
#include

using namespace std;

int main()
{

int n, m;

string word;



cin >> n;

while(n--)

{

cin >> m;



while(m)

{

cin >> word;

for(int i = word.size() - 1; i >= 0; i--)

cout#include#include using namespace std; int main() {int n, m; //n控制有多少组字符串,m控制每组中有多少个字符串string word;//word:输入的字符串 cin >> n;while(n--){ cin >> m; while(m) {
cin >> word; /*
反向输出字符串 */ for(int i = w
回复

使用道具 举报

千问 | 2008-6-15 17:47:59 | 显示全部楼层
改了两处:#include #include//string using namespace std; int main() {int n; cin>>n;getchar();while ( n ) {string s;getline(ci
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行