HBC51029小宝学数列5,过关题目,语言题merge题解

2拍不死你 算法基础篇 55 0
想要成为编程高手?那就来试试全网最全C++题库,让您在练习中快速成长。
N, the original values are given. There are M operations, each of them is of one of two types: 1lmrtext{1 l m r}1lmr, means replacingal…r) . 2itext{2 i}2i, means that you need to answer the value aia_iai . Where merge(a,b) means the following code: def merge(a,b): c=[] while a.size() and b.size(): if a[0]

a is a permutation of 1…N1 dots N1…N, the original values are given. There are M operations, each of them is of one of two types: 1 l m rtext{1 l m r}1 l m r, means replacing al…ra_{l dots r}al…r​ with merge(al…m,am+1…r)merge(a_{l dots m},a_{m+1 dots r})merge(al…m​,am+1…r​) . 2 itext{2 i}2 i, means that you need to answer the value aia_iai​ . Where merge(a,b) means the following code: def merge(a,b):   c=[]   while a.size() and b.size():     if a[0]

HBC51029小宝学数列5,过关题目,语言题merge题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
成为编程大师,不再是梦想!全网最全C++题库,助您开启编程新篇章。

标签: HBC51029小宝学数列5 过关题目 语言题merge题解