随笔分类 -  主席树

摘要:Description Winning the election was simpler than you expected: it was enough to promise to finally build a good quality, country-wide road infrastruc 阅读全文
posted @ 2019-08-15 19:43 BEYang_Z 阅读(172) 评论(0) 推荐(0)
摘要:题目描述 一个长度为n的序列a,设其排过序之后为b,其中位数定义为b[n/2],其中a,b从0开始标号,除法取下整。 给你一个长度为n的序列s。 回答Q个这样的询问:s的左端点在[a,b]之间,右端点在[c,d]之间的子序列中,最大的中位数。 其中a<b<c<d。 位置也从0开始标号。 我会使用一些 阅读全文
posted @ 2019-07-18 15:05 BEYang_Z 阅读(185) 评论(0) 推荐(0)
摘要:Description Arietta 的命运与她的妹妹不同,在她的妹妹已经走进学院的时候,她仍然留在山村中。但是她从未停止过和恋人 Velding 的书信往来。一天,她准备去探访他。对着窗外的阳光,临行前她再次弹起了琴。她的琴的发声十分特殊。让我们给一个形式化的定义吧。所有的 n 个音符形成一棵由 阅读全文
posted @ 2019-07-13 22:31 BEYang_Z 阅读(365) 评论(0) 推荐(0)
摘要:Description Description Input Output Input Input Output Output Sample Input 见下发文件 Sample Output 见下发文件 Sample Input 见下发文件 Sample Input 见下发文件 Sample Out 阅读全文
posted @ 2018-09-14 20:45 BEYang_Z 阅读(137) 评论(0) 推荐(0)