HBC17383A Simple Problem with Integers题解 (youhavenintegers)

一天到晚红烧的鱼 算法基础篇 55 0
不断提升技能,才能在职场中立于不败之地!全网最全C++题库,助您成为编程领域的佼佼者。
You have N integers A1, A2, ... , AN. You are asked to write a program to receive and execute two kinds of instructions: 1. C a b means performing Ai = for all Ai such that a ≤ i ≤ b. 2. Q a b means query the sum of Aa, Aa+1, ..., Ab. Note that the sum is not taken modulo 2018.

You have N integers A1, A2, ... , AN. You are asked to write a program to receive and execute two kinds of instructions: 1. C a b means performing Ai = (Ai2 mod 2018) for all Ai such that a ≤ i ≤ b. 2. Q a b means query the sum of Aa, Aa+1, ..., Ab. Note that the sum is not taken modulo 2018.

HBC17383A Simple Problem with Integers题解
(youhavenintegers)-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
成为编程大师,不再是梦想!全网最全C++题库,助您开启编程新篇章。

标签: HBC17383A Simple Problem with Integers题解