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 44, A=(A1,A2,A3,A4)A=(A_1,A_2,A_3,A_4), whose initial state is (N,1,0,0)(N,1,0,0). The value of NN is not revealed to you. Your goal is to make some element of AA equal to N3N^3 in the end.

You can perform the following two types of operations, at most 20262026 times in total.

  • - i j k (1≤i,j,k≤41\le i,j,k\le4): Replace AiA_i with max⁡(0,Aj−Ak)\max(0,A_j-A_k).
  • ^ i j (1≤i,j≤41\le i,j\le4): Replace AiA_i with Aj2A_j^2.

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 AiA_i is changed.

If any value exceeds N4N^4 during the operations, you fail.

Output a single sequence of operations that achieves the goal for every NN satisfying the constraints. For each NN, the judge executes the sequence of operations starting from A=(N,1,0,0)A=(N,1,0,0), and checks that it does not fail along the way and that some element equals N3N^3 after all operations are finished.

本题为仅输出题,不提供输入。

存在一个长度为 44 的整数序列 A=(A1,A2,A3,A4)A=(A_1,A_2,A_3,A_4),其初始状态为 (N,1,0,0)(N,1,0,0)。其中 NN 的值对选手保密。你的目标是:经过若干次操作后,使 AA 中至少有一个元素等于 N3N^3。

你最多可执行 20262026 次以下两类操作:

  • - i j k(其中 1≤i,j,k≤41\le i,j,k\le4):将 AiA_i 替换为 max⁡(0,Aj−Ak)\max(0,A_j-A_k)。
  • ^ i j(其中 1≤i,j≤41\le i,j\le4):将 AiA_i 替换为 Aj2A_j^2。

所有下标均为整数,且允许重复(即 i,j,ki,j,k 可相等)。每次操作中,新值均基于操作前各 AA 元素的当前值计算,且仅修改 AiA_i。

若在操作过程中任意时刻出现某个 Ai>N4A_i > N^4,则判定失败。

请输出一个操作序列,该序列需对所有满足约束条件的 NN 均能达成目标。对于每个 NN,评测系统将从初始状态 A=(N,1,0,0)A=(N,1,0,0) 出发,依次执行你输出的操作序列,并验证:

  • 整个过程未发生失败(即所有中间值均 ≤N4\le N^4),
  • 所有操作完成后,AA 中至少有一个元素等于 N3N^3。

输入格式

No input is given.

不提供输入。

输出格式

On the first line, output the number of operations QQ (0≤Q≤20260\le Q\le2026). On the following QQ lines, output the operations in the order they are performed, each in the format - i j k or ^ i j.

第一行输出操作次数 QQ(0≤Q≤20260\le Q\le2026)。接下来的 QQ 行按执行顺序输出各操作,每行格式为 - i j k 或 ^ i j。

说明/提示

Constraints

  • 2≤N≤20002\le N\le2000
  • NN is an integer.

限制条件

  • 2≤N≤20002\le N\le2000
  • NN 是一个整数。

输入解题思路,AI测评打分。不知道怎么写?

首页