QOJ.ac

QOJ

حد الوقت: 1 s حد الذاكرة: 128 MB مجموع النقاط: 100

#9091. Yuno's Cornfield

الإحصائيات

Yuno is taking a walk by her farm when she suddenly notices that a row of corn in the field is not very aesthetically pleasing.

There are $N$ stalks of corn in this row, and their heights are uneven.

Yuno thinks the cornfield is not beautiful, so she decides to create a data structure problem.

The problem is as follows:

You are given a sequence $a$ of length $n$ and $m$ operations. Each operation asks whether it is possible to choose two numbers from a given range such that their difference is $x$, their sum is $x$, their product is $x$, or their quotient is $x$ (with no remainder). These four operations are denoted as $1, 2, 3, 4$ respectively.

The two chosen numbers can be from the same position.

Input

The first line contains two integers $n, m$.

The next line contains $n$ integers representing $a_i$.

The following $m$ lines each contain four integers $opt, l, r, x$.

$opt$ represents the type of operation, $l$ and $r$ represent the range of the operation, and $x$ represents the value $x$ for this operation.

Output

For each query, if it is possible, output yuno, otherwise output yumi.

Examples

Input 1

5 5
1 1 2 3 4
4 1 1 1
1 1 2 2
3 1 1 1
3 5 5 16
1 2 3 4

Output 1

yuno
yumi
yuno
yuno
yumi

Subtasks

Idea: nzhtl1477, Solution: nzhtl1477, Code: nzhtl1477, Data: nzhtl1477 & mrsrz

For $100\%$ of the data, all input numbers are in the range $[0, 10^5]$, and the elements in the sequence are in the range $[1, 10^5]$.

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.