2018年7月31日

摘要: Problem Description Before the start of contest, there are n ICPC contestants waiting in a long queue. They are labeled by 1 to n from left to right. 阅读全文
posted @ 2018-07-31 04:14 Lis~ 阅读(196) 评论(0) 推荐(0) 编辑
 
摘要: 给定n个数A1...An,小Ho想了解AL..AR中有多少对元素值相同。小Ho把这个数目定义为区间[L,R]的价值,用v[L,R]表示。 例如1 1 1 2 2这五个数所组成的区间的价值为4。 现在小Ho想知道在所有的的v[L,R](1 <= L <= R <= n)中,第k小的值是多少。 Inpu 阅读全文
posted @ 2018-07-31 04:00 Lis~ 阅读(447) 评论(2) 推荐(0) 编辑
 
摘要: An array of size n ≤ 10 6 is given to you. There is a sliding window of size kwhich is moving from the very left of the array to the very right. You c 阅读全文
posted @ 2018-07-31 03:43 Lis~ 阅读(554) 评论(0) 推荐(0) 编辑