Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
118762 陈骏睿 校门外的树 C++ Wrong Answer 1 MS 356 KB 548 2025-05-10 12:20:43

Tests(2/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 i,j,n,m,cnt=0,a[10001]={0},b[10001]={0}; cin>>n>>m; for(i=0;i<m*2;i++){ cin>>a[i]; } for(i=0;i<m*2;i+=2){ for(j=a[i];j<=a[i+1];j++) b[j]=1; } for(i=0;i<n;i++){ if(b[i]==0)cnt++; } cout<<cnt; return 0; }


Run Info:

------Input------
10000 100 1707 9754 4830 8139 450 699 1614 1923 5351 8426 633 1301 1143 2038 2031 2770 7892 9454 2900 5372 1556 4622 7824 9361 2288 5863 4427 5401 1682 2530 1845 7963 1101 9050 372 6094 490 1814 2976 6422 40 238 1444 7114 4164 4230 2899 4306 2164 5753 2989 8056 2206 9238 6133 8550 5514 6723 32 6531 2485 6217 6688 7703 9448 9513 2250 5582 329 7526 585 6333 7671 8639 1663 9428 2318 6587 1893 8241 490 9943 5387 8352 623 8176 2005 9290 1549 7504 7586 9409 1561 4967 7912 8298 999 7064 2963 4262 481 3
------Answer-----
54
------Your output-----
53