多多色-多人伦交性欧美在线观看-多人伦精品一区二区三区视频-多色视频-免费黄色视屏网站-免费黄色在线

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

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

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

題目大意:D表示在區(qū)間x,y內(nèi)所有的元素擴充一倍;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)站對您的學習有所幫助,可以手機掃描二維碼進行捐贈
程序員人生
------分隔線----------------------------
分享到:
------分隔線----------------------------
關閉
程序員人生
主站蜘蛛池模板: 欧美一区二区三区男人的天堂 | 亚洲欧美国产视频 | 成年人在线视频免费观看 | 老司机午夜精品网站在线观看 | 一区二区三区四区视频 | 国产欧美精品国产国产专区 | 国产免费一区二区三区最新 | 日本www视频在线观看 | 成a人v欧美综合天堂 | 亚洲精品第一区二区在线 | 一区二区三区四区五区六区 | 亚洲天堂视频在线播放 | 91九色成人 | 日本三级中文 | 免费在线观看a | 欧美日韩加勒比一区二区三区 | 中文字幕在线资源 | 999精品免费视频 | 国产美女主播一级成人毛片 | 99热久久这里只有精品首页 | 被两个男人吃奶添下面视频 | 国产欧美一区二区三区小说 | 国产手机在线αⅴ片无码观看 | 2022国内精品免费福利视频 | 亚洲色图吧 | 国产日韩欧美一区二区三区在线 | 一本色道久久爱88a 一本视频在线 | 日韩理伦片秋霞理伦 | 欧美日韩国产精品 | 国产成人综合精品一区 | 精品国产免费人成在线观看 | 国产一二三区有声小说 | 欧美操片 | japanese日本xxx乱 | 韩国日本在线观看 | v亚洲| 亚洲国产欧美在线 | 日韩精品一区二区三区视频网 | 秋霞理论在线视频 | 午夜视频啪啪 | 性8sex亚洲区入口 |