Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
73160 sh25_wangsj 校门外的树 C++ 编译错误 0 MS 0 KB 545 2025-11-07 14:23:25

Tests(0/0):


#include <iostream> #include <cstring> using namespace std; int main() { int L, M; cin >> L >> M; bool tree[666]; for(int e=1,e<=L,e++){ tree[e]=true; } for(int i=0; i < M; ++i) { int a, b; cin >> a >> b; for (int j = a; j <= b; j++) { tree[j] = false; } } int count = 0; for (int i = 0; i <= L; ++i) { if (tree[i]) count++; } cout << count << endl; return 0; }


测评信息: