二拳击碎你的坤坤梦
2024-12-14 16:06:30
发布于:重庆
14阅读
0回复
0点赞
#include <iostream>
#include <vector>
#include <iomanip>
using namespace std;
int main() {
int n;
cin >> n;
vector<pair<int, int>> data(n);
for (int i = 0; i < n; ++i) {
cin >> data[i].first >> data[i].second;
}
double x = static_cast<double>(data[0].second) / data[0].first;
for (int i = 1; i < n; ++i) {
double y = static_cast<double>(data[i].second) / data[i].first;
double diff = y - x;
if (diff > 0.05) {
cout << "better" << endl;
} else if (diff < -0.05) {
cout << "worse" << endl;
} else {
cout << "same" << endl;
}
}
return 0;
}
这里空空如也
有帮助,赞一个