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