71332023-12-31 12:06:50IgnácÁruszállítás (75 pont)cpp17Time limit exceeded 63/75400ms4468 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
	int n, m;
	cin >> n >> m;
	vector<bool> ures(n, true);
	for (int i = 0; i < m; i++) {
		int a, b;
		cin >> a >> b;
		for (int j = a; j < b; j++) {
			ures[j] = false;
		}
	}
	
	int db = 0;
	for (int i = 1; i < n; i++) {
		if (ures[i]) db++;
	}

	cout << db;
}
SubtaskSumTestVerdictTimeMemory
base63/75
1Accepted0/03ms1816 KiB
2Accepted0/0108ms2252 KiB
3Accepted3/33ms2256 KiB
4Accepted3/33ms2328 KiB
5Accepted3/33ms2528 KiB
6Accepted3/33ms2616 KiB
7Accepted3/33ms2736 KiB
8Accepted4/43ms2860 KiB
9Accepted4/43ms2944 KiB
10Accepted4/43ms2980 KiB
11Accepted4/43ms3032 KiB
12Accepted4/43ms3140 KiB
13Accepted4/47ms3356 KiB
14Accepted4/48ms3600 KiB
15Accepted4/47ms3680 KiB
16Time limit exceeded0/4400ms3752 KiB
17Time limit exceeded0/4358ms3208 KiB
18Time limit exceeded0/4370ms3176 KiB
19Accepted4/412ms4004 KiB
20Accepted4/413ms4084 KiB
21Accepted4/497ms4420 KiB
22Accepted4/4101ms4468 KiB