QOJ.ac

QOJ

Time Limit: 1 s Memory Limit: 128 MB Total points: 100

#9091. 由乃的玉米田

Statistics

由乃在自己的农田边散步,她突然发现田里的一排玉米非常的不美。

这排玉米一共有 $N$ 株,它们的高度参差不齐。

由乃认为玉米田不美,所以她决定出个数据结构题

这个题是这样的:

给你一个序列 $a$,长度为 $n$,有 $m$ 次操作,每次询问一个区间是否可以选出两个数它们的差为 $x$,或者询问一个区间是否可以选出两个数它们的和为 $x$,或者询问一个区间是否可以选出两个数它们的乘积为 $x$ ,或者询问一个区间是否可以选出两个数它们的商为 $x$(没有余数) ,这四个操作分别为操作 $1,2,3,4$。

选出的这两个数可以是同一个位置的数。

输入格式

第一行两个数 $n,m$。

后面一行 $n$ 个数表示 $a_i$。

后面 $m$ 行每行四个数 $opt,l,r,x$。

$opt$ 表示这个是第几种操作,$l,r$ 表示操作的区间,$x$ 表示这次操作的 $x$。

输出格式

对于每个询问,如果可以,输出 yuno,否则输出 yumi

样例数据

样例输入

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

样例输出

yuno
yumi
yuno
yuno
yumi

子任务

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

对于 $100\%$ 的数据,所有输入的数在 $[0,10^5]$ 内,序列中的元素在 $[1,10^5]$ 内。

About Issues

We understand that our problem archive is not perfect. If you find any issues with the problem, including the statement, scoring configuration, time/memory limits, test cases, etc.

You may use this form to submit an issue regarding the problem. A problem moderator will review your issue and proceed it properly.

STOP! Before you submit an issue, please READ the following guidelines:

  1. This is not a place to publish a discussion, editorial, or requests to debug your code. Your issue will only be visible by you and problem moderators. Other users will not be able to view or reply your issues.
  2. Do not submit duplicated issues. If you have already submitted one, please wait for an moderator to review it. Submitting multiple issues will not speed up the review process and might cause your account to be banned.
  3. Issues must be filed in English or Chinese only.
  4. Be sure your issue is related to this problem. If you need to submit an issue regarding another problem, contest, category, etc., you should submit it to the corresponding page.

Active Issues 0

No issues in this category.

Closed/Resolved Issues 0

No issues in this category.