为什么RE了三个点
查看原帖
为什么RE了三个点
510555
ImposterAnYu楼主2021/5/21 21:08
#include<bits/stdc++.h>
using namespace std;
int a[10005],b[10005],c = 0;
short m,n,sss;
int main(){
    cin >> m >> n >> sss;
    for(int i = 1; i <= n; i++){
        cin >> a[i] >> b[i];
    }
    for(int i = 1; i <= n; i++){
        if(sss - m / a[i] * b[i] <= 0) cout<< i << " " ;
        else c++;
    }
    if(c == n) cout<< "-1" ;
    return 0;
}
2021/5/21 21:08
加载中...