为什么第一个点过不了,求大佬
查看原帖
为什么第一个点过不了,求大佬
1459549
Zhanyouting楼主2024/11/20 17:01
#include <bits/stdc++.h>
using namespace std;

int main () {
	int a[10010] = {0}, l, m, u, v, as = 0;
	cin >> l >> m;
	for (int x = 0; x <= 10000; x++) {
		a[x] = 1;
	}
	while (cin >> u >> v) {
		for (int y = v; y >= u; y--) {
			a[y] = 0;
		}
	}
	for (int z = 0; z <= 10000; z++) {
		as = as + a[z];
	}
	cout << as;
}
2024/11/20 17:01
加载中...