编程介的小学生 2019-06-03 14:58 采纳率: 20.5%
浏览 148

公式计算推导出2333333,怎么使用C语言的程序的代码编写的过程步骤去实现的问题解决

Problem Description
You are given a strange problem. First you have got a sequence contains N integers A1,A2,A3,...AN.Then you should perform a sequence of M operations. An operation can be one of the following:

  1. Print operation l,r . Print the value of ∑i=lrAi.
  2. Modify operation x. Modify Ax to 2Ax
  3. Add operation l,r,x. Add xtoAi(l≤i≤r).

As the value of print operation can be rather large, print the remainder after dividing the number by 2333333.

Input
There are several test cases.
In each test case:
The first line contains two integers N,M(1≤N,M≤50000).
The second line contains N integers A1,A2,A3,...AN(1≤Ai≤109,1≤i≤N)
Each of the next M lines begin with a number type(1≤type≤3).
If type=1, there will be two integers more in the line: l,r(1≤l≤r≤N), which correspond the operation 1.
If type=2, there will be one integer more in the line: x(1≤x≤N), which correspond the operation 2.
If type=3, there will be three integers more in the line: l,r,x(1≤l≤r≤N,1≤x≤109), which correspond the operation 3.

Output
For each Print operation, output the remainder of division of the value by 2333333.

Sample Input
3 4
1 2 3
2 3
1 2 3
3 1 3 2
1 1 3
2 2
5 2
2 1
1 1 2

Sample Output
10
17
34

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 素材场景中光线烘焙后灯光失效
    • ¥15 请教一下各位,为什么我这个没有实现模拟点击
    • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
    • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
    • ¥20 有关区间dp的问题求解
    • ¥15 多电路系统共用电源的串扰问题
    • ¥15 slam rangenet++配置
    • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 保护模式-系统加载-段寄存器