#P12012. [Ynoi April Fool's Round 2025] 牢爱

[Ynoi April Fool's Round 2025] 牢爱

Background

Problem Description

Hoshino Ai gives you a sequence a1,a2,,ana_1, a_2, \ldots, a_n of length nn. Each number is between 00 and v1v - 1. There are mm operations.

Operation 11: Each time, ask whether it is possible to choose two non-empty sets of indices X,YX, Y in an interval such that:

  1. XX and YY are disjoint.
  2. For an element iXi \in X, its contribution to set XX is ai+1a_i + 1. The total contribution of elements in XX must be equal to the total contribution of elements in YY. If such two sets can be chosen, output Yuno; otherwise output Yuki.

Operation 22: Modify the numbers in an interval [l,r][l, r] so that for all lirl \leq i \leq r, ai=ai3modva_i = a_i^3 \bmod v, i.e., take the cube modulo vv on the interval.

Input Format

The first line contains three integers n,m,vn, m, v, with meanings as described above.

The next line contains nn integers, representing the sequence aa.

Then follow mm lines, each containing three numbers opt,l,ropt, l, r, indicating whether the operation type is 11 or 22, and the operated interval is [l,r][l, r].

Output Format

For each query, output one line containing a string Yuno or Yuki, indicating whether such two sets can be chosen.

20 20 152
3 26 133 54 79 81 72 109 66 91 82 100 35 23 104 17 51 114 12 58
2 1 17
2 6 12
1 1 12
2 3 5
2 11 11
2 7 19
2 6 15
1 5 12
1 1 9
1 10 19
2 3 19
2 6 20
2 1 13
2 1 15
2 1 9
1 1 1
2 1 7
2 7 19
2 6 19
2 3 6
Yuno
Yuno
Yuno
Yuno
Yuki

Hint

Idea: nzhtl1477, Solution: nzhtl1477, Code: nzhtl1477, Data: nzhtl1477.

Constraints: For 100%100\% of the testdata, 1n,m1051 \leq n, m \leq 10^5, 1v10001 \leq v \leq 1000. The testdata has no subtasks or grading by difficulty.

Translated by ChatGPT 5