Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
149827 向俊麒 校门外的树 C++ Runtime Error 1 MS 296 KB 557 2026-03-17 20:07:41

Tests(0/10):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int a[5001]={},m,n,q,z,s=0; cin>>n>>m; for(int i=1;i<=m;i++){ cin>>q>>z; for(int i=q;i<=z;i++) a[i]=1;} for(int i=0;i<=n;i++) if(a[i]==0) s++; cout<<s; return 0; }


Run Info:

Runtime Error:Segmentation fault