题解

组合数第k小

https://ac.nowcoder.com/acm/contest/6221/A

第一题直接return k
第二题不会
第三题
def tree1(a):
res = 0
n = len(a)
for i in range(n):
if i2+1 < n:
res += (a[i] ^ a[i
2+1])
print(a[i], a[i2+1])
if i
2+2 < n:
res += (a[i] ^ a[i*2+2])
print(a[i], a[i * 2 + 2])
return res

全部评论

相关推荐

缒梦&独舞:这家公司是这样的,去年给我实习offer了,不过也是面着玩儿的,他周六还要去做公益志愿活动
点赞 评论 收藏
分享
不愿透露姓名的神秘牛友
07-09 11:30
找工作7个月,投了7000封,3段世界五百强实习,才有一个offer,牛油们肯定比我强吧
码农索隆:不对不对不对,实习经历这么厉害,简历也没少投,问题出在哪呢
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务