P12012 [Ynoi April Fool's Round 2025] Ai in Jail.
Background

Description
Hoshino Ai gives you a sequence $a_1, a_2, \ldots, a_n$ of length $n$. Each number is between $0$ and $v - 1$. There are $m$ operations.
Operation $1$: Each time, ask whether it is possible to choose two non-empty sets of indices $X, Y$ in an interval such that:
1. $X$ and $Y$ are disjoint.
2. For an element $i \in X$, its contribution to set $X$ is $a_i + 1$. The total contribution of elements in $X$ must be equal to the total contribution of elements in $Y$. If such two sets can be chosen, output `Yuno`; otherwise output `Yuki`.
Operation $2$: Modify the numbers in an interval $[l, r]$ so that for all $l \leq i \leq r$, $a_i = a_i^3 \bmod v$, i.e., take the cube modulo $v$ on the interval.
Input Format
The first line contains three integers $n, m, v$, with meanings as described above.
The next line contains $n$ integers, representing the sequence $a$.
Then follow $m$ lines, each containing three numbers $opt, l, r$, indicating whether the operation type is $1$ or $2$, and the operated interval is $[l, r]$.
Output Format
For each query, output one line containing a string `Yuno` or `Yuki`, indicating whether such two sets can be chosen.
Explanation/Hint
Idea: nzhtl1477, Solution: nzhtl1477, Code: nzhtl1477, Data: nzhtl1477.
Constraints: For $100\%$ of the testdata, $1 \leq n, m \leq 10^5$, $1 \leq v \leq 1000$. The testdata has no subtasks or grading by difficulty.
Translated by ChatGPT 5