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

为什么WA呢 这么水的题!!!

Posted by AC_frantic at 2009-07-06 15:04:54 on Problem 3672
#include<iostream>
using namespace std;
int main()
{
	int m,t,u,f,d,res=0;
	char p;
	cin>>m>>t>>u>>f>>d;
	while(t--)
	{
		getchar();
		cin>>p;
		if(m<=0)
			continue;
		if(p==u+'0' || p==d+'0')
			m=m-u-d;
		else m=m-f-f;
		if(m>=0)
			res++;
	}
	cout<<res<<endl;
	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