#A. 佣兵团长的野望

    Type: Default 1000ms 256MiB

佣兵团长的野望

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

"但,倘若有一种方法不需要双方那成千上万的士兵献上他们的生命与鲜血呢?伟大的王国因此只需要一位灵魂屈于黑暗。伟大的王国只需要一位灵魂被世间玷污。"

勒嘉德企图囊括:折磨,启蒙,无尽,统御 四个要素以促使他到达显赫的高度

具体地,给定一个长度为nn的序列,每个元素权值为AiAi,以及一个参数kk

请计算

  1. i=1nAi[log2AiZ]\sum\limits_{i=1}^{n} A_i \left[ \log_2 A_i \in \mathbb{Z} \right],结果对1e9+71e9+7取模
  2. 1i<jn[Ai>Aj]\sum_{1\leq i \lt j\leq n}^{} [Ai>Aj]
  3. i=1N1j=i+1N(AiAi+1Aj)\bigoplus_{i=1}^{N-1} \bigoplus_{j=i+1}^{N} (A_i \oplus A_{i+1} \oplus \dots \oplus A_j)
  4. 操作kk次,每次可以使数组一个元素乘22,求操作后max(i=1nAi)max(\bigvee_{i=1}^{n}Ai)

并依次输出四个表达式的结果

在这里,\bigoplus为按位异或操作,\bigvee为按位或操作

数据范围

1n2e61\leq n\leq 2e6

1k51\leq k\leq 5

1Ai1e41\leq Ai\leq 1e4

保证输入都是整数

输入描述

第一行,输入一个数nn和一个数kk,代表数组长度以及参数

第二行,输入nn 个整数

输出描述

一行输出四个整数,表示对应表达式的结果

示例

4 1
1 2 3 4
7 0 4 11

2025 SAST Algorithm Group SOC

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
9
Start at
2025-8-30 0:00
End at
2025-9-1 0:00
Duration
48 hour(s)
Host
Partic.
7