ground ref. source 差分

更新时间:2023-07-02 05:06:47 阅读: 评论:0

鸿运当头书法>九月菊
ground ref. source 差分
You are a denizen of Linetopia,who n major cities happen to be equally spaced along an east-west line.In fact,they are often numbered in order from 1 to n,where 1 is the westmost city and n is the eastmost city.
Linetopia was a lovely place to live until forces from neighboring Trapez invaded.As part of Linetopia’s Shielding Lives and Protecting Citizens initiative,you have been called upon to process information about Trapezoid troop movements so we can determine which cities have been hardest hit and know where to nd reinforcements.
Linetopia intelligence has discovered that the Trapezoid forces are attacking in the following pattern.They are nding massive aircraft to drop troops on Linetopia cities.Each aircraft starts at some city i,dropping s soldiers.The aircraft then proceeds tofly either east or west.Each time itflies over another city,it drops a more soldiers than it dropped on the previous city it pasd.After performing d drops,the aircraft returns to Trapez to resupply.
You will be receiving intel updates that inform you of the specs of each Trapezoid aircraft passing over Linetopia.You want to answer queries that ask how many Trapezoid troops have been dropped on a particular city.Are you up to the task?
输入
命题专家
The first line of input contains a single integer T(1≤T≤10),the number of test cas.The first line of each test ca contains two integers:m(1≤m≤10,000),the number of updates and queries and n(1≤n≤500,000),the number of cities in Linetopia.
The next m lines of input are either updates or queries.Update lines begin with a capital U,then contain either a capital E(east)or W(west)to indicate direction,and then contain four integers i(1≤i≤n),s(1≤s≤10,000),a(0≤a≤10,000),and d(1≤d≤n).The integers signify the starting city,the starting number of soldiers,the increa in soldiers per city,and the number of drops,respectively.You can assume d never results in an aircraft flying to the west of city 1 or to the east of city n.打虎上山简谱>发酵技术
王孙贾Query lines begin with a capital Q,and then contain a single integer i(1≤i≤n)indicating the city being queried.马兰头的功效与作用

本文发布于:2023-07-02 05:06:47,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/89/1064102.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:技术   鸿运   命题   功效
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图