Live2d Test Env
摘要: lyk拥有一个区间。 它规定一个区间的价值为这个区间中所有数and起来的值与这个区间所有数or起来的值的乘积。 例如3个数2,3,6。它们and起来的值为2,or起来的值为7,这个区间对答案的贡献为2*7=14。 现在lyk有一个n个数的序列,它想知道所有n*(n+1)/2个区间的贡献的和对1000 阅读全文
posted @ 2018-06-14 22:49 nimphy 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 对于一个 11 到 nn 的排列 p1,p2,⋯,pnp1,p2,⋯,pn ,我们可以轻松地对于任意的 1≤i≤n1≤i≤n 计算出 (li,ri)(li,ri) ,使得对于任意的 1≤L≤R≤n1≤L≤R≤n 来说 min(pL,pL+1,⋯,pR)=pimin(pL,pL+1,⋯,pR)=pi  阅读全文
posted @ 2018-06-14 21:03 nimphy 阅读(348) 评论(0) 推荐(0) 编辑
摘要: You are given a tree consisting of nn vertices. A number is written on each vertex; the number on vertex ii is equal to aiai. Let's denote the functio 阅读全文
posted @ 2018-06-14 18:07 nimphy 阅读(835) 评论(0) 推荐(0) 编辑