0101azys @ 2023-07-21 12:54:26
#include<iostream>
using namespace std;
bool bol[10011]={0};
int m,n,a,b,ans=0;
int main()
{
cin>>m>>n;
for(int i=1;i<=n;i++)
{
cin>>a>>b;
for(int j=a;j<=b;j++)
bol[j]=1;
}
for(int i=1;i<=m;i++)
if(bol[i]==0)ans++;
}
by Iniaugoty @ 2023-07-21 13:03:21
@0101azys 因为你没写cout<<ans;
……
by 0101azys @ 2023-07-21 13:24:04
呃,我也太愚蠢了
by 0101azys @ 2023-07-21 13:26:02
谢谢,我通过了