[Problem Solution] [IOI 2001] Mobile Phones (two-dimensional tree array)_ioi2001__BOSS_’s blog

class=”markdown_views prism-atom-one-light”> Title 【Title Description】 Suppose T a m p e r e Tampere Tamper e The fourth-generation mobile phone base station in the area operates as follows. The area is divided into some squares (phalanx). These squares form a S S S╳ S S S matrix, matrix row and columns are numbered from 0 0 0 to S − 1 S-1 S−1. Each square contains a base station. Since a cell phone may move from one square to another, or the cell phone may be switched on or off, the number of cell phones in use within a square may vary from time to time. Sometimes, each base station needs to report changes in the number of handsets in use to the main base station using the rows and columns of the matrix. Write a program that receives these reports and answers queries about the total number of cell phones currently in use within any rectangular area. 【Input】 Input is to read an integer from standard input, and the answer to a query is to write an integer to standard output. The input format is as follows. Each input occupies one line, and each line consists of a flag…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索