俄罗斯方块

俄罗斯方块

http://www.nowcoder.com/questionTerminal/9407e24a70b04fedba4ab3bd3ae29704

import java.util.*;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[] v = new int[n + 1];
        for(int i = 0; i < m; ++i) v[sc.nextInt()]++;
        Arrays.sort(v);//木桶效应,最低的木板就是得分
        System.out.println(v[1]);
    }
}
全部评论

相关推荐

陌夏微秋:一线城市25w左右吧,17×15=255
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

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