解题(第一个)
2025-09-17 16:09:31
发布于:浙江
5阅读
0回复
0点赞
#include<bits/stdc++.h>
typedef long long LL;
#define int LL
using namespace std;
namespace fastIO
{
inline char get_char()
{
char c=getchar();
while(c<=32&&c!=EOF) c=getchar();
return c;
}
inline int read()
{
int x=0,f=1;
char c=getchar();
for(;c<'0'||c>'9';c=getchar()){if(c=='-') f=-1;if(c==EOF) return c;}
for(;c>='0'&&c<='9';c=getchar()) x=(x<<3)+(x<<1)+c-48;
return x*f;
}
inline void write(int x)
{
if(x<0) putchar('-'),x=-x;
if(x>9) write(x/10);
putchar(x%10+48);
}
inline void file()
{
freopen(".in","r",stdin);
freopen(".out","w",stdout);
}
inline void close()
{
fclose(stdin);
fclose(stdout);
}
inline void fast()
{
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
}
}
using namespace fastIO;
namespace my
{
int t;
namespace T3
{
const int N=1e6+1;
int n,a[N];
inline void solve()
{
n=read();
int sum=0;
for(int i=1;i<=n;++i){
a[i]=read();
sum+=a[i];
}
if(sum>=n*2) puts("Yes");
else puts("No");
}
}
int main()
{
t=read();
for(int i=1;i<=t;++i) T3::solve();
return 0;
}
}
signed main()
{
my::main();
return 0;
}
这里空空如也






有帮助,赞一个