238052026-01-29 22:29:19BucsMateTelefonközpont (40 pont)cpp17Wrong answer 37/4079ms3232 KiB
#include <iostream>

using namespace std;

int t[400002] = {};

int main()
{
    int N;
    cin >> N;
    for(int i = 0; i < N; i++){
        int a, b;
        cin >> a >> b;
        t[a]++;
        t[b+1]--;
    }
    int result = 0;
    for(int i = 2; i <= 400000; i++){
        t[i] = t[i-1] + t[i];
        result = max(result, t[i]);
    }
    cout << result;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base37/40
1Accepted0/03ms2036 KiB
2Accepted0/079ms3120 KiB
3Accepted2/23ms1844 KiB
4Accepted2/23ms1844 KiB
5Accepted2/23ms1936 KiB
6Accepted2/214ms2156 KiB
7Accepted2/241ms2592 KiB
8Accepted3/339ms2584 KiB
9Accepted3/352ms2616 KiB
10Accepted3/371ms3124 KiB
11Accepted3/376ms3232 KiB
12Wrong answer0/339ms2100 KiB
13Accepted3/375ms3232 KiB
14Accepted3/337ms2184 KiB
15Accepted3/339ms2216 KiB
16Accepted3/371ms3124 KiB
17Accepted3/376ms3096 KiB