当前位置:网站首页>蓝桥杯_小蓝吃糖果_鸽巢原理 / 抽屉原理
蓝桥杯_小蓝吃糖果_鸽巢原理 / 抽屉原理
2022-06-11 02:04:00 【这题AC再睡.】

//
#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
const int N=1e6+7;
LL in[N];
int main()
{
LL n,i,sum,tt;
while( cin>>n )
{
sum=tt=0;
for( i=0;i<n;i++ )
{
cin>>in[i];
sum+=in[i];
tt=max( tt,in[i] );
}
if( sum-tt > tt-1 ) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
}
return 0;
}边栏推荐
- Baidu submits sitemap to prompt the solution of "index type is not handled"
- How to read PMBOK guide in 3 steps (experience + data sharing)
- 1031. maximum sum of two non overlapping subarrays
- [Fibonacci series]
- STC8A8K64D4 EEPROM读写失败
- Executeineditmode property details
- Navicat premium 15 tool is automatically deleted by anti-virus protection software solution
- MySQL backup and recovery
- Learning Tai Chi Maker - esp8226 (II)
- String operation methods: replace, delete and split strings
猜你喜欢

A collection of common ADB commands for app testing

Epoll principle and Application & ET mode and lt mode

Project load failed

SQL | 返回顾客名称和相关订单号以及每个订单的总价

深度学习基础篇【4】从0开始搭建EasyOCR并进行简单文字识别

Baidu submits sitemap to prompt the solution of "index type is not handled"

helm 部署traefik ingress
![[Fibonacci series]](/img/03/70b1363e91142a8600d97c59b01b0f.png)
[Fibonacci series]

APP测试_测试点总结

Koa2 learning notes
随机推荐
Modify release opening animation
GCC C内联汇编
Colab reported an error: importerror: cannot import name '_ check_ savefig_ extra_ args‘ from ‘matplotlib. backend_ bases‘
Li Kou brushing questions - hash table
Stc8a8k64d4 EEPROM read / write failure
[untitled]
Xampp is used under M1 chip, and the installation extension error
Tests logiciels vocabulaire commun anglais
Jetpack Compose Scaffold和BottomAppBar(底部导航)
AOSP ~ Logcat Chatty 行过期
【189. 轮转数组】
Penetration test - security service system +owasp top 10
[C language classic]: inverted string
当逻辑删除遇上唯一索引,遇到的问题和解决方案?
Kotlin let方法
10007. ISBN number
SQL | external connection
How to read PMBOK guide in 3 steps (experience + data sharing)
ADVANCE. AI CEO Shoudong will share the compliance of cross-border e-commerce using AI technology at the 2022 emerging market brands online Summit
SQL | 外连接