[奇妙得分](https://www.luogu.org/record/22291165)
by Lzr @ 2019-08-07 09:44:37
@[MOONPIE](/space/show?uid=95246) dalao~~快来~~
by Lzr @ 2019-08-07 09:47:04
第二个样例本该输出14的,这里输出998……?
还热乎的蒟蒻,不要99999998,只要998,白天%%%,晚上%%%……?
by Lzr @ 2019-08-07 09:49:04
好玄学的做法。。
by Elzat @ 2019-08-07 09:51:38
@[Elzat](/space/show?uid=203587) 日常玄学~~但没什么用的做法~~qwq
by Lzr @ 2019-08-07 09:52:09
沃是蒟蒻
by MoonPie @ 2019-08-07 09:57:06
好了大家当看看热闹吧,蒟蒻没读懂题qwq
by Lzr @ 2019-08-07 09:57:11
@[MOONPIE](/space/show?uid=95246) 鸡您太强!
by Lzr @ 2019-08-07 09:58:28
```cpp
#include<bits/stdc++.h>
using namespace std;
int n,m,t,tk,Le[1010],gminn,minn = 99999,fir,end,maxn;
bool F[1010]; //第i辆车是否过j点
int main(){
//freopen("testdata.txt","r",stdin);
scanf("%d%d",&n,&m);
for(int j = 1;j <= n;++j)
Le[j] = 99999;
for(int i = 1;i <= m;++i){
memset(F,0,sizeof(F));
scanf("%d",&t);
gminn = 99999;
for(int k = 1;k <= t;++k){
scanf("%d",&tk);
F[tk] = 1;
gminn = min(Le[tk],gminn);
if(k == 1)
fir = tk;
if(k == t)
end = tk;
}
/*for(int j = 1;j <= n;++j)
if(j < fir || j > end)
Le[j] = gminn - 1;*/
for(int j = fir + 1;j < end;++j)
if(!F[j])
Le[j] = gminn - 1;
}
for(int j = 1;j <= n;++j)
minn = min(minn,Le[j]),maxn = max(maxn,Le[j]);
printf("%d",maxn - minn + 1);
}
```
改了一遍代码,现在爆零了:)
by Lzr @ 2019-08-07 10:20:55