![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
位运算
龍木
若人生为棋,我愿为卒,漫漫征途,谁曾见我后退半步
展开
-
E. Maximum Subsequence Value
链接:https://codeforces.ml/contest/1365/problem/E Ridhiman challenged Ashish to find the maximum valued subsequence of an arrayaaof sizennconsisting of positive integers. The value of a non-empty subsequence ofkkelements ofaais defined as∑2i∑2iov...原创 2020-07-09 19:41:48 · 226 阅读 · 0 评论 -
D 子段异或
链接:https://ac.nowcoder.com/acm/contest/3005/D 输入一个数列a,你需要输出其中异或值为0的不同子段的数量。一个子段 [l,r] (1 \le l \le r \le n1≤l≤r≤n)的异或值为a_l \oplus a_{l+1} \oplus a_{l+2} \oplus \ldots\oplus a_ral⊕al+1⊕al+2⊕…⊕ar,其...原创 2020-02-12 12:30:03 · 301 阅读 · 0 评论 -
I 建通道
链接:https://ac.nowcoder.com/acm/contest/3003/I 在无垠的宇宙中,有 n 个星球,第 i 个星球有权值v_ivi。 由于星球之间距离极远,因此想在有限的时间内在星际间旅行,就必须要在星球间建立传送通道。 任意两个星球之间均可以建立传送通道,不过花费并不一样。第 i 个星球与第 j 个星球的之间建立传送通道的花费是\text{lowbit}(v_i\...原创 2020-02-07 13:57:41 · 650 阅读 · 0 评论 -
D. Dr. Evil Underscores
链接:https://codeforces.com/contest/1285/problem/D Today, as a friendship gift, Bakry gave Badawynnintegersa1,a2,…,ana1,a2,…,anand challenged him to choose an integerXXsuch that the valuemax1≤i≤...原创 2020-02-02 15:21:13 · 322 阅读 · 0 评论