题解 P5613 【[MtOI2019]黑蚊子多】
ShineEternal
2019-11-03 18:12:12
[$My\ blog$](https://blog.csdn.net/kkkksc03/article/details/102868191)
## solution:
- 60pts:
直接输出跳的次数即可
- 100pts:
~~观察到作为T1数据量却很小于是就想到了模拟~~
其实是看到作为特殊点的k个数特别小。
于是直接枚举每个中间点即可。
## code:
```cpp
#include<cstdio>
using namespace std;
int a[15];
int main()
{
int n,m,k;
scanf("%d%d%d",&n,&m,&k);
for(int i=1;i<=k;i++)
{
scanf("%d",&a[i]);
}
int tmp=0,ans=0;
while(13)
{
if(tmp>=n)
{
break;
}
for(int i=1;i<=k;i++)
{
if(tmp==a[i])
{
m++;
}
}
tmp+=m;
ans++;
}
printf("%d\n",ans);
return 0;
}
```