提交时间:2024-02-01 21:29:33
运行 ID: 39524
#include<iostream> using namespace std; int main() { int n,x1,x2,y1,y2; cin>>n; cin>>x1>>x2; double x=1.0*x2/x1; for(int i=0;i<n-1;i++){ cin>>y1>>y2; double y=1.0*y2/y1; if(y-x>0.05){ cout<<"better"<<endl; } else if(x-y>0.05){ cout<<"worse"<<endl; } else cout<<"same"<<endl; } return 0; }