只能够过5%的数据
#include<bits/stdc++.h>
//#include <string>
using namespace std;
#define mp make_pair
#define pb push_back
#define ll long long
bool is_trangle(ll a,ll b,ll c){
ll maxn=-1;
maxn=max(a,b);
maxn=max(maxn,c);
return a+b+c-maxn>maxn;
}
int main()
{
int n;
scanf("%d",&n);
while(n--){
int flag=0;
ll a[6];
for(int i=0;i<6;i++){
scanf("%lld",&a[i]);
}
do{
if(is_trangle(a[0],a[1],a[2])&&is_trangle(a[3],a[4],a[5])){
flag=1;
break;
}
}while(next_permutation(a,a+6));
if(flag){
printf("Yes\n");
}else{
printf("No\n");
}
}
return 0;
}
全部评论
(1) 回帖