摘要: https://codeforces.com/contest/1330/problem/E 有一个高度为h的大顶堆:有2h -1个不同的正整数,下标从1到2h−1,1<i<2h, a[i]<a[⌊i/2⌋]. 现在我们要降低堆的高度,为h,有2g-1个整数,那么我们要删掉2h-2g个数; 选择索引 阅读全文
posted @ 2020-04-07 21:52 MZRONG 阅读(151) 评论(0) 推荐(0) 编辑
摘要: https://codeforces.com/contest/1330/problem/D 给出d,m, 找到一个a数组,满足以下要求: a数组的长度为n,n≥1; 1≤a1<a2<⋯<an≤d; 定义一个数组b:b1=a1, ∀i>1,bi=bi−1⊕ai ,并且 b1<b2<⋯<bn−1<bn 阅读全文
posted @ 2020-04-07 15:10 MZRONG 阅读(1323) 评论(0) 推荐(0) 编辑