分组批卷

改考卷

http://www.nowcoder.com/questionTerminal/be65e76a8b394139982047b2b0cec415

最大组的成员数量,小于等于总人数一半即可:

import java.util.*;
public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt(), mx = Integer.MIN_VALUE, sum = 0;
        for(int i = 0; i < a; ++i){
            int n = sc.nextInt();
            sum += n;
            if(mx < n) mx = n;
        }
        if(mx <= sum/2){
            System.out.println("Yes");
            return;
        }
        System.out.println("No");
    }
}
全部评论

相关推荐

03-05 17:03
已编辑
浙江工商大学 C++
陈好好wy:整体看下来有点空空的感觉,可以把每一段项目经历都再完善一下,然后用小标题的形式写个两到三条,目前看有点太简单了,不太能看出具体在这个项目里做了什么工作。还是要尽量把自己做的工作以量化的形式体现在简历上呢。
双非本科求职如何逆袭
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务