- 练30.1 鸡尾酒疗法
SB
- 2025-3-10 17:25:41 @
#include<bits/stdc++.h>
using namespace std;
double n,s,m,j,x;
int main(){
cin>>n;
cin>>m>>j;
s=j/m;
for(int i=2;i<=n;i++){
cin>>m>>j;
x=j/m;
if(x>s&&x-s>0.05){
cout<<"better"<<"\n";
}
else if(s>x&&s-x>0.05) cout<<"worse"<<"\n";
else cout<<"same"<<"\n";
}
return 0;
}
0 comments
No comments so far...
Information
- ID
- 94
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 7
- Tags
- # Submissions
- 58
- Accepted
- 13
- Uploaded By