文章
37
粉丝
1
获赞
316
访问
9.5k
差分
#include<bits/stdc++.h>
using namespace std;
int main(){
int n; cin>>n;
map<int,pair<int,int>> mp;
for(int i = 0 ; i < n; i++){
int s,e,c; cin>>s>>e>>c;
if(c<=20){
mp[s].first++;
mp[e].first--;
}
else{
mp[s].second++;
mp[e].second--;
}
}
int tmp1=0,tmp2=0,ans1=0,ans2=0;
for(auto it : mp){
tmp1 += it.second.first;
tmp2 += it.second.second;
ans1 = max(ans1,tmp1);
ans2 = max(ans2,tmp2);
}
cout<<ans1+ans2<<' '<<ans2<<endl;
}
登录后发布评论
暂无评论,来抢沙发