hdu2060

View Code
#include"iostream"
using namespace std;
int main()
{
int n;
int a,b,c;
int sum;
int i,j;
cin
>>n;
while(n--)
{
cin
>>a>>b>>c;
if(b>=c) cout<<"Yes"<<endl;
else
{
if(a==0) cout<<"No"<<endl;
else if(a>0&&a<=6) //只有彩球
{
sum
=0;
for(i=7;i>7-a;i--)
sum
+=i;
if(sum+b>=c) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
}
else
{
sum
=0;
for(i=2;i<=7;i++)
sum
+=i;

if(sum+8*(a-6)+b>=c) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
}
}
}
return 0;
}
posted @ 2011-04-07 17:31  聊聊IT那些事  阅读(253)  评论(0编辑  收藏  举报