菜鸟80求助QAQ
查看原帖
菜鸟80求助QAQ
1025179
Cuber_release楼主2023/8/3 00:52

#include <bits/stdc++.h>
using namespace std;

double n, x, y, subx, suby, old, newed;

int main() {

	cin >> n;
	cin >> subx >> suby;
	newed = subx / suby;
	for (long long i = 1; i <= n - 1; i++) {
		cin >> x >> y;
		old = x / y;
		if (newed - old > 0.050) {
			cout << "better" << "\n";
		} else if (old - newed  > 0.050) {
			cout << "worse" << "\n";
		} else
			cout << "same" << "\n";
	}
	return 0;
}

2023/8/3 00:52
加载中...