摘要: D. Dividing by Two 将A变成B需要的最小步数 ,只能将A+1或A/2 当A大于B,A为奇数时,(a+1)/2,A为偶数时,a/2; 当A小于B,a+1; #include<cmath> #include<cstdio> #include<algorithm> #include<st 阅读全文
posted @ 2020-05-06 14:53 一只幽灵飘过 阅读(215) 评论(0) 推荐(0) 编辑
摘要: A 张经理的员工 (a<b)a之前的员工去a那里,b之后的员工去b那里;a,b之间的,a+(a+b)/2前的去a那里 #include<cmath> #include<cstdio> #include<algorithm> #include<string> #include<vector> #inc 阅读全文
posted @ 2020-05-06 14:29 一只幽灵飘过 阅读(198) 评论(0) 推荐(0) 编辑