> 如果a[i]==0……
by AThousandSuns @ 2018-05-05 12:56:10
@[AThousandSuns](/space/show?uid=72118) 谢谢大佬指教orz
by TianZ @ 2018-05-05 12:56:48
@[AThousandSuns](/space/show?uid=72118) 但是,当我改了代码之后,点10WA了......
```cpp
#include<bits/stdc++.h>
using namespace std;
int a[1000005]={0},b[1000005]={0},c[1000005]={0};
int main(){
int k,m,n,i,ans=0;
cin>>k>>m>>n;
for(i=1;i<=m;i++){
cin>>a[i]>>b[i];
if(a[i]==0)c[i]=n+1;
else c[i]=(k/a[i])*b[i];
}
for(i=1;i<=n;i++){
if(c[i]>=n){
cout<<i<<" ";
ans++;
}
}
if(ans==0)cout<<"-1"<<endl;
return 0;
}
```
by TianZ @ 2018-05-05 13:00:42
如果a[i]==0&&b[i]==0//QW<...
by 赵致嶂 @ 2018-07-19 14:41:07