56692023-09-06 14:23:42gonterarminÁruszállítás üres szakaszaicpp17Wrong answer 2/50381ms21320 KiB
#include <iostream>

using namespace std;

int main() {
    int N,M;
    cin>>N>>M;
    int H[M][2];
    for (int i = 0; i < M; ++i) {
        cin>>H[i][0]>>H[i][1];
    }
    int S[N];
    for (int i = 0; i < N; ++i) {
        S[i]=0;
    }
    for (int i = 0; i < M; ++i) {
        for (int j = H[i][0]; j <= H[i][1]; ++j) {
            S[j-1]=1;
        }
    }
    int db=0;
    for (int i = 0; i < N; ++i) {
        if (S[i]=0) {
            db++;
        }
    }
    cout<<db;
}
SubtaskSumTestVerdictTimeMemory
base2/50
1Wrong answer0/03ms1876 KiB
2Wrong answer0/092ms12752 KiB
3Wrong answer0/23ms3628 KiB
4Accepted2/23ms3716 KiB
5Wrong answer0/22ms3728 KiB
6Wrong answer0/23ms3860 KiB
7Wrong answer0/23ms4076 KiB
8Wrong answer0/23ms4168 KiB
9Wrong answer0/22ms4172 KiB
10Wrong answer0/23ms4412 KiB
11Wrong answer0/23ms5156 KiB
12Wrong answer0/23ms5224 KiB
13Wrong answer0/37ms5288 KiB
14Wrong answer0/38ms6392 KiB
15Wrong answer0/37ms6684 KiB
16Time limit exceeded0/3375ms9988 KiB
17Time limit exceeded0/3354ms11312 KiB
18Time limit exceeded0/3381ms12896 KiB
19Wrong answer0/39ms12664 KiB
20Wrong answer0/310ms13512 KiB
21Wrong answer0/375ms19952 KiB
22Wrong answer0/379ms21320 KiB