Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
11535 | Tree planter | 【入门】鸡尾酒疗法 | C++ | 解答错误 | 0 MS | 252 KB | 395 | 2022-10-06 09:23:47 |
#include"bits/stdc++.h" using namespace std; const int N=20; int a[N]; int main(){ double n,X,Y,x,y; cin>>n>>X>>Y; for(int i=0;i<n-1;i++){ cin>>x>>y; x/=X; y/=Y; if(y-x>0.05)a[i]=1; else if(x-y>0.05)a[i]=0; else a[i]=2; } for(int i=0;i<n-1;i++){ if(a[i]==1)cout<<"better"; else if(a[i]==0)cout<<"worse"; else cout<<"same"; if(n-2!=i)cout<<endl; } }