Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

求助:为什么去掉一个回车,错误会变呢

Posted by winters_coming at 2012-05-22 10:08:30 on Problem 3981
#include <iostream>
#include <string>
using namespace std;

int main()
{
	string str;
	int pos;
	while (getline(cin, str), str != "EOF")
	{
		if ((pos = str.find("you")) != EOF)
			str.replace(pos, 3, "we");
		cout << str << endl;   // 有回车Output limit,没有就time limit
	}
	return 0;
}

这两个错误哪个优先级高啊

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator