日本搞逼视频_黄色一级片免费在线观看_色99久久_性明星video另类hd_欧美77_综合在线视频

國內(nèi)最全I(xiàn)T社區(qū)平臺 聯(lián)系我們 | 收藏本站
阿里云優(yōu)惠2
您當(dāng)前位置:首頁 > 互聯(lián)網(wǎng) > HDU 4973 A simple simulation problem.(線段樹)

HDU 4973 A simple simulation problem.(線段樹)

來源:程序員人生   發(fā)布時間:2014-10-12 16:02:33 閱讀次數(shù):2359次

題目大意:D表示在區(qū)間x,y內(nèi)所有的元素擴(kuò)充一倍;Q表示查詢在這個下表以內(nèi)的數(shù)字最多的個數(shù)為多少。

如:1,2,3.D 1 3 之后就變成了 1 1 2 2 3 3.Q 1 4 輸出 2.

解題思路:每個節(jié)點記錄兩個信息:最大值的個數(shù)以及這個點一共有多少個數(shù)字。

A simple simulation problem.

Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 580    Accepted Submission(s): 227


Problem Description
There are n types of cells in the lab, numbered from 1 to n. These cells are put in a queue, the i-th cell belongs to type i. Each time I can use mitogen to double the cells in the interval [l, r]. For instance, the original queue is {1 2 3 3 4 5}, after using a mitogen in the interval [2, 5] the queue will be {1 2 2 3 3 3 3 4 4 5}. After some operations this queue could become very long, and I can’t figure out maximum count of cells of same type. Could you help me?
 

Input
The first line contains a single integer t (1 <= t <= 20), the number of test cases.

For each case, the first line contains 2 integers (1 <= n,m<= 50000) indicating the number of cell types and the number of operations.

For the following m lines, each line represents an operation. There are only two kinds of operations: Q and D. And the format is:

“Q l r”, query the maximum number of cells of same type in the interval [l, r];
“D l r”, double the cells in the interval [l, r];

(0 <= r
生活不易,碼農(nóng)辛苦
如果您覺得本網(wǎng)站對您的學(xué)習(xí)有所幫助,可以手機(jī)掃描二維碼進(jìn)行捐贈
程序員人生
------分隔線----------------------------
分享到:
------分隔線----------------------------
關(guān)閉
程序員人生
主站蜘蛛池模板: 精产国品一二三区 | 国产日韩久久 | www国产亚洲精品久久网站 | 国产精品五月天 | 高清国产一区二区三区 | 婷婷丁香激情五月 | 久久久久久久 | 久久久精品免费观看 | 久久6视频 | 在线国产一区 | 激情视频网站 | 国产在线一区二区三区 | 九一在线观看 | 国产欧美一区二区三区在线看 | 最新国产在线视频 | 国厂自拍 | 久久久久久影院 | 日韩一级免费 | 污视频网站入口 | sese综合 | 精品成人 | 日韩欧美成人一区二区 | 高清av在线 | 国产精品久久av | 国产一区欧美一区 | 亚洲欧美中文日韩在线v日本 | 中文字幕在线观看一区二区三区 | 国产一区二区在线播放 | 久久综合热 | 99久久精品国产一区二区三区 | 91嫩草精品 | 日日夜夜天天操 | 欧美一区二区三区久久 | 夜夜爽爽爽久久久久久魔女 | 国产福利电影网 | 亚洲性综合网 | 亚洲最大色综合成人av | 久久精品国产一区二区电影 | 国产亚洲精品久久久久久牛牛 | 成人一区二区三区四区 | 日本激情网 |