AT_arc234_c.Blindfolded Cubing
NOI/NOI+/CTSC
通过率:0%
时间限制:2.00s
内存限制:1024MB
AC君温馨提醒
该题目为【atcoder】题库的题目,您提交的代码将被提交至atcoder进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
This problem is output-only. No input is given.
There is an integer sequence of length 4, A=(A1,A2,A3,A4), whose initial state is (N,1,0,0). The value of N is not revealed to you. Your goal is to make some element of A equal to N3 in the end.
You can perform the following two types of operations, at most 2026 times in total.
- i j k(1≤i,j,k≤4): Replace Ai with max(0,Aj−Ak).^ i j(1≤i,j≤4): Replace Ai with Aj2.
All indices are integers and may be equal to each other. The new value is computed from the values just before the operation, and only Ai is changed.
If any value exceeds N4 during the operations, you fail.
Output a single sequence of operations that achieves the goal for every N satisfying the constraints. For each N, the judge executes the sequence of operations starting from A=(N,1,0,0), and checks that it does not fail along the way and that some element equals N3 after all operations are finished.
本题为仅输出题,不提供输入。
存在一个长度为 4 的整数序列 A=(A1,A2,A3,A4),其初始状态为 (N,1,0,0)。其中 N 的值对选手保密。你的目标是:经过若干次操作后,使 A 中至少有一个元素等于 N3。
你最多可执行 2026 次以下两类操作:
- i j k(其中 1≤i,j,k≤4):将 Ai 替换为 max(0,Aj−Ak)。^ i j(其中 1≤i,j≤4):将 Ai 替换为 Aj2。
所有下标均为整数,且允许重复(即 i,j,k 可相等)。每次操作中,新值均基于操作前各 A 元素的当前值计算,且仅修改 Ai。
若在操作过程中任意时刻出现某个 Ai>N4,则判定失败。
请输出一个操作序列,该序列需对所有满足约束条件的 N 均能达成目标。对于每个 N,评测系统将从初始状态 A=(N,1,0,0) 出发,依次执行你输出的操作序列,并验证:
- 整个过程未发生失败(即所有中间值均 ≤N4),
- 所有操作完成后,A 中至少有一个元素等于 N3。
输入格式
No input is given.
不提供输入。
输出格式
On the first line, output the number of operations Q (0≤Q≤2026). On the following Q lines, output the operations in the order they are performed, each in the format - i j k or ^ i j.
第一行输出操作次数 Q(0≤Q≤2026)。接下来的 Q 行按执行顺序输出各操作,每行格式为 - i j k 或 ^ i j。
说明/提示
Constraints
- 2≤N≤2000
- N is an integer.
限制条件
- 2≤N≤2000
- N 是一个整数。
输入解题思路,AI测评打分。不知道怎么写?