weiming3 @ 2023-02-22 15:34:19
#include<iostream>
#include <set>
using namespace std;
int main(){
int l,m;
set<int> s;
cin>>l>>m;
int count;
int a[110],b[110];
for(int i=0;i<m;i++){
cin>>a[i];
cin>>b[i];
int x=a[i];
for(int j=a[i];j<=b[i];j++){
s.insert(x);
x++;
}
}
cout<<501-s.size();
return 0;
}
by _JellyFish_ @ 2023-02-22 15:39:18
1.数组范围太小,改成至少
2.你是怎么想的,在最后写个
by weiming3 @ 2023-02-22 15:55:55
@wangjuan 改了果然过了,感谢大佬T_T
by JoyBoy521 @ 2023-02-22 19:40:58
set有啥用 啥意思,刚大一不大懂
by Beatrices @ 2023-02-26 15:41:51
不会