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

please help me , what is wrong ?

Posted by ahura_24 at 2012-10-05 19:18:05 on Problem 3157
bool badStyle(const string &str, bool &cStyle)
{
	string::size_type i = 0;

	if ( isupper(str[0]) ) return true;
	if ( str[0] == '_' || *(str.end() - 1) == '_' ) return true;
	if ( (i = str.find('_')) != string::npos && find_if(str.begin(), str.end(), isupper) != str.end() ) return true;

	while ( (i = str.find('_', i)) != string::npos )
	{
		cStyle = true;
		if ( str[++i] == '_' ) return true;
	}

	return false;
}

i take a lot of WA , but i dont know why ? :(

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