提交时间:2023-11-18 13:07:15
运行 ID: 31306
#include<iostream> using namespace std; int main() { int n; cin>>n; int a[n],b[n]; float k[n]; for(int i=1;i<=n;i++) { cin>>a[i]>>b[i]; k[i]=b[i]*1.0/a[i]; } for(int i=1;i<=n;i++) { //cout<<k[i]<<endl; if(i>=2) { if(k[i]-k[1]>=0.05) { cout<<"better"<<endl; } else if(k[1]-k[i]>=0.05) { cout<<"worse"<<endl; } else { cout<<"same"<<endl; } } } return 0; }