Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
76823 sh25_shenpy 校门外的树 C++ 通过 0 MS 248 KB 386 2025-12-19 22:30:41

Tests(1/1):


#include <bits/stdc++.h> using namespace std; int l, m, u, v, sum; bool has[10010]; int main() { cin >> l >> m; fill(has, has + l + 1, true); for(int i = 1; i <= m; i++) { cin >> u >> v; for(int j = u; j <= v; j++) has[j] = false; } for(int i = 0; i <= l; i++) sum += has[i]; cout << sum; return 0; }


测评信息: