19392022-12-12 12:46:17DragonoidOmegaÁruszállítás üres szakaszaicpp11Wrong answer 2/5078ms11340 KiB
#include <iostream>
#include <vector>

using namespace std;
int i,n,m,a,b,db;
int main()
{
    cin>>n>>m;
    vector <int> x(n+2);
    for(i=1;i<=m;++i)
    {
        cin>>a>>b;
        x[a]++;
        x[b+1]--;
    }
    for(i=1;i<=n;++i)
    {
        x[i]+=x[i-1];
        if(x[i]==0) db++;
    }
    cout<<db;
}
SubtaskSumTestVerdictTimeMemory
base2/50
1Accepted0/03ms1808 KiB
2Wrong answer0/078ms9780 KiB
3Wrong answer0/22ms2264 KiB
4Accepted2/22ms2416 KiB
5Wrong answer0/22ms2516 KiB
6Wrong answer0/22ms2592 KiB
7Wrong answer0/22ms2712 KiB
8Wrong answer0/22ms2796 KiB
9Wrong answer0/22ms2792 KiB
10Wrong answer0/22ms2920 KiB
11Wrong answer0/22ms3436 KiB
12Wrong answer0/23ms3780 KiB
13Wrong answer0/36ms3904 KiB
14Wrong answer0/38ms4424 KiB
15Wrong answer0/37ms4424 KiB
16Wrong answer0/361ms10792 KiB
17Wrong answer0/363ms11048 KiB
18Wrong answer0/371ms11000 KiB
19Wrong answer0/39ms6476 KiB
20Wrong answer0/310ms7616 KiB
21Wrong answer0/371ms11320 KiB
22Wrong answer0/375ms11340 KiB