Submission
Status:
----------
Subtask/Task Score:
0/100
Score: 0
User: exoworldgd
Problemset: โรงงานดีเอ็นเอ
Language: cpp
Time: 0.082 second
Submitted On: 2025-05-26 09:50:35
#include <bits/stdc++.h>
using namespace std;
int main(void) {
int n,m,res=0;
cin >> n >> m;
int a[n];
while (m--) {
int x,y;
cin >> x >> y;
a[x-1]++,a[y]--;
}
for (int i = 0; i<n ; i++) a[i] += a[i-1];
res = *max_element(a,a+n);
cout << res;
}