public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] d = new int[100001]; int res = 0; for (int i = 0; i < n; i++) { int a = sc.nextInt(), b = sc.nextInt(); for (int j = a; j <= b; j++) { d[j]++; } } for (int i = 0; i < 100001; i++) { res = Math.max(res, d[i]); } System.out.println(res); } 这个怎么不行呀??
点赞 1

相关推荐

面了100年面试不知...:今年白菜这么多,冬天可以狂吃了
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务