| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
为什么WA呢 这么水的题!!!#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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator