直接暴力 AC了 懒得思考😂 #include <bits/stdc++.h> using namespace std; int main(){ int n, res = 0, maxr = 0; cin >> n; vector<int> pp(1000000); for(int i = 0; i < n; i++){ int s, e; cin >> s >> e; for(int j = s; j < e; j++){ pp[j]++; } } for(auto p : pp){ res = max(res, p); } cout << res; return 0; }
1 14

相关推荐

我的offer在哪里...:从去年看到现在,飞升哥就是榜样
我的求职进度条
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务