首先啊a[i+1]-a[i]是整数 拿他判断0.05显然不行啊
by lzc120518 @ 2024-10-22 18:35:49
@[tyt_](/user/1382253) 求的是有效率,不是人数差
by Scez @ 2024-10-22 18:35:58
@[tyt_](/user/1382253) 有效率是有效人数与样本人数的比值
by Scez @ 2024-10-22 18:36:28
其次建议再读一遍题哈
by lzc120518 @ 2024-10-22 18:36:57
@[lzc120518](/user/733958)
没读题啊哈哈
by tyt_ @ 2024-10-22 18:37:35
@[Scez](/user/1063615)
没读题啊哈哈
by tyt_ @ 2024-10-22 18:38:08
```#include<iostream>
#define ll long long
using namespace std;
ll n;
double x, y, a, b;
int main(){
cin >> n >> a >> b;
x = b / a;
for(ll i = 1; i < n; i++){
cin >> a >> b;
y = b / a;
if(x * 100 - y * 100 > 5){
cout << "worse" << endl;
}
else if(y * 100 - x * 100 > 5){
cout << "better" << endl;
}
else{
cout << "same" << endl;
}
}
return 0;
}```
by lst_hhh @ 2024-10-22 18:55:06