wa 求助
查看原帖
wa 求助
1017221
GipsyAvenger1楼主2023/12/17 17:36
#include<iostream>
using namespace std;
int main(){
	int a,x,v;
	cin>>a;
    double b[a];
    for(int i=1;i<=a-1;i++){
        cin>>x>>v;
        b[i]=v/x;
        b[i+1]=x/v;
        if(b[i+1]-b[i]>0.05)
            cout<<"better"<<endl;
        if(b[i]-b[i+1]>0.05)
            cout<<"worse"<<endl;
        else
            cout<<"same"<<endl;
    }
    return 0;
}
2023/12/17 17:36
加载中...