5261: B3916 [语言月赛 202401] 区间函数最大值(入门)
          Memory Limit:128 MB
          Time Limit:1.000 S
         
      
      
        
          Judge Style:Text Compare
          Creator:
      
      
          Submit:0
          Solved:0
      
Description

Input

Output

Sample Input Copy
3 2 5 6 1 4 2 998244353 1 2 1 3Sample Output Copy
266HINT
