80062024-01-12 10:04:58ChickenÁruszállítás (75 pont)cpp17Time limit exceeded 35/75400ms4104 KiB
#include <iostream>

using namespace std;

int main() {
    int n, m;
    cin>>n>>m;
    int nan[m];
    int va[m];
    bool ha[m];
    int ossz=0;
    bool joe=0;
    for(int i=0; i<m; i++) {
        cin>>nan[i]>>va[i];
        ha[i]=0;
    }
    for(int i=0; i<n; i++) {
        for(int j=0; j<m; j++) {
            if(nan[j]==i+1) {
                ha[j]=1;
            }
            if(va[j]==i+1) {
                ha[j]=0;
            }
        }
        for(int j=0; j<m; j++) {
            if(ha[j]==1) {
                joe=1;
            }
        }
        if(joe==0) {
            ossz++;
        }
        else {
            joe=0;
        }
    }
    cout<<ossz-1;
return 0; }
SubtaskSumTestVerdictTimeMemory
base35/75
1Accepted0/03ms1880 KiB
2Time limit exceeded0/0400ms2184 KiB
3Accepted3/33ms2336 KiB
4Accepted3/33ms2548 KiB
5Accepted3/33ms2800 KiB
6Accepted3/33ms2912 KiB
7Accepted3/33ms2996 KiB
8Accepted4/43ms3128 KiB
9Accepted4/43ms3340 KiB
10Accepted4/43ms3452 KiB
11Accepted4/412ms3528 KiB
12Accepted4/4122ms3524 KiB
13Time limit exceeded0/4354ms3716 KiB
14Time limit exceeded0/4377ms3856 KiB
15Time limit exceeded0/4365ms2848 KiB
16Time limit exceeded0/4354ms3988 KiB
17Time limit exceeded0/4370ms3944 KiB
18Time limit exceeded0/4365ms4104 KiB
19Time limit exceeded0/4345ms4096 KiB
20Time limit exceeded0/4349ms4020 KiB
21Time limit exceeded0/4379ms3956 KiB
22Time limit exceeded0/4370ms3956 KiB