Submission
Status:
Compilation Error
Subtask/Task Score:
Score: 0
User: exoworldgd
Problemset: โรงงานดีเอ็นเอ
Language: cpp
Time: 0.000 second
Submitted On: 2025-05-26 09:49:07
#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 = 1; i<=n ; i++) a[i] += a[i-1];
res = *max_element(a,a+n);
cout << res;
}