You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
370 B

#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false); //读入输出优化的强迫症
int k, m, n, f, s, i, fl = 1;
cin >> k >> m >> n;
for (i = 1; i <= m; i++) {
cin >> f >> s;
if (f == 0 || k / f * s >= n) {
fl = 0;
cout << i << ' ';
}
}
if (fl) cout << -1;
}