Rocky: OK. I'll grab us a bite. You two stand in line for the photos. There's quite a queue.
没问题,我去拿一些点心来。你们两个就排队等着照像吧,排队的人挺多的呢。
For each test cases, output a single line of space-separated integers which are the values of people in the order they stand in the queue.
大意:排队买票问题,后面来的总是把原来的人替换掉,并且使得原来的人往后移,让你顺序输出他们代表的编号,用线段树来记录空格数。
应用推荐