提交时间:2024-01-26 15:58:25

运行 ID: 38321

#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; int a,b; cin>>a>>b; float x=b*1.0/a; for(int i=2;i<=n;i++){ cin>>a>>b; float y=b*1.0/a; if(x==y){ cout<<"same"<<endl; }else if((y-x)>0.05){ cout<<"better"<<endl; }else{ cout<<"worse"<<endl; } } return 0; }