T442649 [IOOI2024] 基础数据结构练习题

题目背景

On Sleeping Cup: .

题目描述

给定一个包含 $n$ 个元素的序列 $a_1,a_2,\cdots,a_n$,进行 $q$ 次操作: - 数:形如 $\texttt{1 x y}$,代表依次输出 $a_x,a_{x+1},\cdots,a_y$,保证 **保证 $\bm{1\leq y-x+1\leq 20}$**。 - 聚:形如 $\texttt{2 x y}$,代表将 $a_x$ 移动到 $a_y$ 后。**保证 $\bm{1\leq x < y \leq n}$**。 - 截:形如 $\texttt{3 x y}$,代表截取 $a_x,a_{x+1},\cdots,a_y$ 并**翻转后**放到序列的末尾。**保证 $\bm{1\leq x < y \leq n}$**。 - 构:形如 $\texttt{4 x y}$,代表修改 $a_x \leftarrow y$。**保证 $\bm{\vert y\vert\leq 10^9}$**。

输入格式

输出格式

说明/提示

具体每测试点信息见下表(本题**不捆绑测试**): | 测试点编号 | 属于 Subtask | $\bm {0\leq n,q \leq}$ | 特殊性质 | 分值 | | :-----------: | :-----------: | :-----------: | :-----------: | :-----------: | | $1$ | $0$ | $0$ | $/$ | $1$ | | $2$ | $1$ | $10$ | $\mathcal A$ | $2$ | | $3$ | $2$ | $500$ | $\mathcal A$ | $3$ | | $4$ | $2$ | $500$ | $\mathcal A$ | $3$ | | $5$ | $2$ | $500$ | $\mathcal A$ | $3$ | | $6$ | $3$ | $5000$ | $\mathcal A$ | $3$ | | $7$ | $3$ | $5000$ | $\mathcal A$ | $3$ | | $8$ | $3$ | $5000$ | $\mathcal A$ | $3$ | | $9$ | $3$ | $5000$ | $\mathcal A$ | $3$ | | $10$ | $3$ | $5000$ | $\mathcal A$ | $3$ | | $11$ | $3$ | $5000$ | $/$ | $4$ | | $12$ | $3$ | $5000$ | $/$ | $4$ | | $13$ | $4$ | $200000$ | $\mathcal {A,B}$ | $3$ | | $14$ | $5$ | $200000$ | $\mathcal {A,C}$ | $4$ | | $15$ | $5$ | $200000$ | $\mathcal {A,C}$ | $4$ | | $16$ | $6$ | $200000$ | $\mathcal {A,D}$ | $4$ | | $17$ | $6$ | $200000$ | $\mathcal {A,D}$ | $4$ | | $18$ | $6$ | $200000$ | $\mathcal D$ | $5$ | | $19$ | $6$ | $200000$ | $\mathcal D$ | $5$ | | $20$ | $6$ | $200000$ | $\mathcal D$ | $5$ | | $21$ | $7$ | $200000$ | $\mathcal A$ | $3$ | | $22$ | $7$ | $200000$ | $/$ | $7$ | | $23$ | $7$ | $200000$ | $/$ | $7$ | | $24$ | $7$ | $200000$ | $/$ | $7$ | | $25$ | $7$ | $200000$ | $/$ | $7$ | - 特殊性质 $\mathcal A$:数据随机。 - 特殊性质 $\mathcal B$:只有「数」操作和「构」操作。 - 特殊性质 $\mathcal C$:只有「聚」操作。 - 特殊性质 $\mathcal D$:只有「截」操作。 - 特殊性质 $\mathcal /$:无。 时间限制:由于洛谷限制,测试点 $1\sim 5$:4s,其他:5s。(std:max 3.51s, total 33s)**Update: 洛谷评测机速度变慢很多,目前 std max 4.44s** 请注意本题的特殊时间限制。