hiho week 155 register

Ended

Participants:382

Verdict:Accepted
Score:100 / 100
Submitted:2017-06-24 14:15:10

Lang:G++

Edit
1
2
3
4
5
6
#include "iostream"
#include "map"
#define mm map<int,int>
using namespace std;int n;mm t;int main() {cin >> n;while (n--) {int a, b;cin >> a >> b;t[a]++;t[b]--;}int c = 0,ans = 1;for (mm::iterator i = t.begin(); i != t.end(); i++) {c += i->second;if (c > ans)ans = c;}cout << ans << endl;return 0;}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX