AT_abc466_a.Compromise
入门
通过率:0%
时间限制:2.00s
内存限制:1024MB
AC君温馨提醒
该题目为【atcoder】题库的题目,您提交的代码将被提交至atcoder进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
There are N choices.
You will choose one of these choices. If you choose the i-th choice, your happiness will be Xi.
If your happiness will be negative no matter which choice you choose, output Yes; otherwise, output No.
共有 N 个选项。
你将从中选择一个选项。若你选择第 i 个选项,则你的幸福值为 Xi。
如果无论选择哪个选项,你的幸福值都为负数,则输出 Yes;否则,输出 No。
输入格式
The input is given from Standard Input in the following format:
N
X1 X2 … XN
输入从标准输入给出,格式如下:
N
X1 X2 … XN
输出格式
Output Yes or No according to the instructions in the problem statement.
根据题目说明中的指示输出 Yes 或 No。
输入输出样例
输入#1
4 2 0 -1 2
输出#1
No
输入#2
3 -5 -2 -1
输出#2
Yes
输入#3
4 0 -2 0 -1
输出#3
No
说明/提示
Sample 1 Explanation:
If you choose choice 1, 2, or 4, the happiness will not be negative.
Constraints
- 2≤N≤10
- −100≤Xi≤100
- All input values are integers.
样例 1 解释:
如果你选择选项 1、2 或 4,幸福感将不会为负。
约束条件
- 2≤N≤10
- −100≤Xi≤100
- 所有输入值均为整数。
输入解题思路,AI测评打分。不知道怎么写?