好像是比例那里算错了但不知道怎么错的,WA了10个

B2065 鸡尾酒疗法

@[woshishuilaizhe](/user/240709) 这两行 ``` if(1.0*y[i]/x[i]-1.0*y[i-1]/x[i-1]>=0.05)cout<<"better"<<endl; else if(1.0*y[i-1]/x[i-1]-1.0*y[i]/x[i]>=0.05)cout<<"worse"<<endl; ``` 应将 $ i-1 $ 改为 $ 1 $。
by lzh123bc @ 2023-12-13 17:30:40


@[lzh123bc](/user/531197) 还是全WA
by woshishuilaizhe @ 2023-12-13 17:41:50


@[woshishuilaizhe](/user/240709) https://www.luogu.com.cn/record/139446616
by lzh123bc @ 2023-12-13 18:52:22


|