2024 Jiangsu Collegiate Programming Contest E. Divide 题解 主席树

Divide

题目描述

Given an integer sequence a1,a2,…,ana_1,a_2,\ldots,a_na1,a2,,an of length nnn. For an interval al,…,ara_l,\ldots,a_ral,,ar in this sequence, a Reduce operation divides the maximum value of the interval by 222 (rounding down). If there are multiple maximum values, choose the one with the smallest index. There are qqq queries. Given three integers l,r,kl,r,kl,r,k each time, query the maximum value of the interval after performing kkk Reduce operations on the al,…,ara_l,\ldots,a_ral,,ar interval. The queries are independent of each other. That is to say, each time the query starts from the initially given sequence.

输入描述

The two integers n,qn,qn,q (1≤n,q≤1051\le n,q\le 10^51

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值