#Lutece1929. 一道普通题1
一道普通题1
Migrated from Lutece 1929 一道普通题1
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
给出一个长为 的数列,以及 个操作,操作涉及区间加法,询问区间内小于某个值 的前驱(比其小的最大元素)。
Input
第一行输入一个数字 。
第二行输入 个非负整数,第 个数字为 以空格隔开。
接下来输入 行询问,每行输入四个数字 ,以空格隔开。
若 o,表示将位于的之间的数字都加 。
若 ,表示询问中 的前驱的值(不存在则输出 )。
Output
对于每次询问,输出一行一个数字表示答案。
保证所有数据在int
范围内
Samples
Resources
2018 UESTC Training for Data Structures