英文题面翻译15

英文原题:题目来源:https://acs.jxnu.edu.cn/problem/ICPCJX2020H

Sequence

 1000ms  31072K

描述:

Given an array a consisting of nn integers, on which you are to perform mm operations of two types.

  1. Given two integers x,y replace the number of index x with number y. That is ax:=y.

  2. Given one integer x, print the number of consecutive subsequences of a, whose minimum value equals to ax.

It's guaranteed that there are no duplicated value in array aa at any moment.

输入:

The first line contains two intergers n,m(1≤n,m≤105)n,m(1≤n,m≤105), where nn is the size of the array and mm is the number of operations to perform.

The second line contains nn integer, the ithith integer is ai(1≤ai≤231−1)ai(1≤ai≤231−1).

Then, mm lines follow, describing mm operation you are to perform in order.

Each line start with an integer opt∈[1,2]opt∈[1,2], meaning the type of operation to perform.

If opt=1opt=1, two integers x,y(1≤x≤n,1≤y≤231−1)x,y(1≤x≤n,1≤y≤231−1) follows, mentioned above.

If opt=2opt=2, one integer x(1≤x≤n)x(1≤x≤n) follows, mentioned above.

输出:

For each operation of type 22, print one integer on one line as the answer.

序列

描述:

给定一个由n个整数组成的数组a,在该数组上执行两种类型的m运算。

1.给定两个整数x,y用数字y替换索引x的数字。也就是ax:=y。
2.给定一个整数x,打印a的连续子序列数,其最小值等于ax。

保证数组a中任何时刻都没有重复的数值。

输入:

第一行包含两个整数n,m(1≤n、 m≤105),其中n是数组的大小,m是要执行的操作数。
第二行包含n整数,第i个整数是ai(1≤ai≤231−1).
接下来后面是m行,按顺序执行的m操作。
每行开头是整数opt∈[1,2],表示要执行的操作类型。
如果opt=1,两个整数 x,y(1≤x≤n,1≤y≤231−1)接下来同上。
如果opt=2,则为一个整数x(1≤x≤n)接下来同上。

输出:

每行对于每个类型2的每个操作,打印一个整数作为答案。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值