2 条题解
-
0
#include<bits/stdc++.h> using namespace std; long long n; float last, newint, f, h; int main() { cin >> n >> f >> h; last = h / f; for (int i = 1; i < n; i ++) { cin >> f >> h; newint = h / f; if (newint - last > 0.05)cout << "better" << "\n"; else if (last - newint > 0.05)cout << "worse" << "\n"; else cout << "same" << "\n"; } return 0; } 自己换行
-
0
#include<bits/stdc++.h> using namespace std; long long n; float last, newint, f, h; int main() { cin >> n >> f >> h; last = h / f; for (int i = 1; i < n; i ++) { cin >> f >> h; newint = h / f; if (newint - last > 0.05)cout << "better" << "\n"; else if (last - newint > 0.05)cout << "worse" << "\n"; else cout << "same" << "\n"; } return 0; } 自己换行
- 1
信息
- ID
- 4515
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 1
- 标签
- (无)
- 递交数
- 46
- 已通过
- 21
- 上传者