2021.12.09 [HEOI2016/TJOI2016]排序(线段树+二分,把一个序列转换为01串) https://www.luogu.com.cn/problem/P2824 题意: 在 2016 年,佳媛姐姐喜欢上了数字序列.因而她经常研究关于序列的一些奇奇怪怪的问题,现在她在研究一个难题,需要你来帮助她. 这个难题是这样子的:给出一个 1 到 n 的排列,现在对这个排列序列进行 m 次局部排序,排序分为两种: 0 l r 表示将区间 \([l,r]\) 的数字升序排序 1 l r 表
Heap Partition Time Limit: Seconds Memory Limit: KB Special Judge A sequence S = {s1, s2, ..., sn} is called heapable if there exists a binary tree T with n nodes such that every node is labelled with exactly one element from the sequence S, and for
D. Black Hills golden jewels time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output In Rapid City are located the main producers of the Black Hills gold jewelry, a very popular product among tour
B. Soldier and Badges time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Colonel has n badges. He wants to give one badge to every of his n soldiers. Each badge has acoolness factor, which sh