debug是个好东西
by nth_element @ 2018-08-31 21:44:20
我可以发一下我的程序给你借鉴一下
```cpp
#include<bits/stdc++.h>
#define LL long long
using namespace std;
LL k,m,n;
LL mc[30010],kl[30010];
bool pd=0;
LL t;
int main()
{
cin>>k>>m>>n;
for(int i=1;i<=m;i++)
{
scanf("%lld%lld",&mc[i],&kl[i]);
}
for(int i=1;i<=m;i++)
{
if(kl[i]>0&&mc[i]==0)
{
pd=1;
printf("%d ",i);
}else
{
if(mc[i]!=0)
{
t=k/mc[i];
}
if(t*kl[i]>=n)
{
printf("%d ",i);
pd=1;
}
}
}
if(pd==0)
{
printf("-1");
return 0;
}
return 0;
}
```
by nth_element @ 2018-08-31 21:45:09
@[nth_element](/space/show?uid=77131)
谢了
by 初嫁QAQ @ 2018-09-01 08:25:21