ptsxlhs @ 2024-08-03 14:05:52
当你样例#4过不了时,在除前请乘以100,if里的0.05改成5
别问我是怎么知道的,问就是11次WA的教训[泪目]
by sIGerIum @ 2024-08-04 14:03:57
ybt官网也是,不然样例5过不了。
by jebfghbbcdsl @ 2024-08-08 09:09:23
@ptsxlhs @sIGerIum 为什么我是0.05也AC了???
#include<cstdio>
int n;double x,y,ans;
int main(){
scanf("%d",&n);
scanf("%lf%lf",&x,&y);ans=y/x;
while(--n){
scanf("%lf%lf",&x,&y);
if(y/x-ans>0.05)printf("better\n");
else if(ans-y/x>0.05)printf("worse\n");
else printf("same\n");
}
return 0;
}
by sIGerIum @ 2024-08-08 09:40:03
@jebfghbbcdsl luogu改样例了可能,我拿你代码去 ybt官网 1072:鸡尾酒疗法 提交了,样例5过不了。
by jebfghbbcdsl @ 2024-08-08 09:46:34
@sIGerIum Oh,I know.
by kbl_sxm1696DEshen @ 2024-11-14 17:55:21
感谢大佬!ybt#5过不了,经大佬指点,AC叻!连那只红不红白不白的兔子都开心叻!谢谢大佬~《大佬是怎么得出结论的》?膜拜膜拜(•̀ω•́)✧