【线段树】Segment Tree

该博客介绍了如何使用线段树解决一个特定问题。给定一个整数m,目标是找出满足线段树构建中最大值c为m的正整数n的数量。题目给出了时间与内存限制,以及样例输入和输出。解题策略涉及线段树节点的性质,如左节点、右节点的关系,以及如何根据节点值推断包含的数的范围。
摘要由CSDN通过智能技术生成

Segment Tree

时间限制: 1 Sec  内存限制: 512 MB
提交: 107  解决: 23
[提交] [状态] [命题人:admin]

题目描述

Mcginn opens the code which he wrote 25 years ago.

Clever Mcginn wants to know how many positive interger n satisfied that the maximum c can reach whencall function build(1 , 1 , n) in the main function is m.
There are T test cases. Each case contains one integer m.

 

输入

Input is given from Standard Input in the following format:
T
m1
m2
.
.
.
mT
Constraints
1 ≤ T ≤ 100
1 ≤ m ≤ 1018</

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值