这题不难,昨晚在比赛时间内做的时候,就感觉特别简单,可是没有想到的是自己因为细节的地方被hacked了,心多少难免是有点不甘的,很多时候,发现自己练了那么多,水平是在不断的提高,但是细节错误也越来越多,很不甘心。可是自己却很害怕去改正错误,很害怕去面对错误,所以犯错误越来越多。
题目意思很简单,就是说有那么一个人很懒,想要吃饭,有碗m个和碟子k个,计划在n天呢,他要洗多少次碗,题目是有限制的,吃第一道菜的时候只能用bowl,而第二道才可以用bolw or plates.
#include<stdio.h>
int n,m,k;int A[1005];
int main()
{
scanf("%d %d %d", &n, &m, &k);
int a;
int x,count=0;
while(n--)
{
scanf("%d", &x);
if(2==x && k>0)
--k;
else if(2==x && m>0)
--m;
else if(1==x && m>0)
--m;
else
++count;
}
printf("%d\n", count);
return 0;
}