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