当前位置:网站首页>Three body attack (three-dimensional split plus two points)
Three body attack (three-dimensional split plus two points)
2022-06-28 08:35:00 【Angeliaaa】
Title Description
The triad will attack the earth . To defend against attack , The earth people sent A × B × C warship , Line up in space A layer B That's ok C The cube of columns . among , The first i Layer j Xing di k The ships of the line ( It's a warship (i, j, k)) The life value of is d(i, j, k).
The triad will launch a war against the earth m round “ Cube attack ”, Each attack deals the same damage to all warships in a cube . In particular , The first t Round attack 7 Parameters lat, rat, lbt, rbt, lct, rct, ht describe ;
All satisfied i ∈ [lat, rat],j ∈ [lbt, rbt],k ∈ [lct, rct] The warships of (i, j, k) Will receive ht The damage of . If a warship's total cumulative damage exceeds its defense , Then this warship will explode .
Earth Commander wants you to tell him , After which attack did the first warship explode .
Input
The first line includes 4 A positive integer A, B, C, m;
The second line contains A × B × C It's an integer , Among them the first ((i − 1)×B + (j − 1)) × C + (k − 1)+1 The number is d(i, j, k);
The first 3 To the first m + 2 In line , The first (t − 2) Line inclusion 7 A positive integer lat, rat, lbt, rbt, lct, rct, ht.
A × B × C ≤ 10^6, m ≤ 10^6, 0 ≤ d(i, j, k), ht ≤ 10^9.
Output
The warship that outputs the first explosion exploded after which round of attack . There must be such a warship .
The sample input
2 2 2 3
1 1 1 1 1 1 1 1
1 2 1 2 1 1 1
1 1 1 2 1 2 1
1 1 1 1 1 1 2
Sample output
2
https://www.cnblogs.com/scx2015noip-as-php/p/2018_10_18.html( Reprint the boss's )
边栏推荐
- 【Go ~ 0到1 】 第一天 6月24 变量,条件判断 循环语句
- Two tips for block level elements
- Tree
- Goldbach`s Conjecture
- 抖音服务器带宽有多大,才能供上亿人同时刷?
- Loss损失函数
- Set the encoding of CMD to UTF-8
- Chenglian premium products donated love materials for flood fighting and disaster relief to Yingde
- PLSQL installation under Windows
- Kubernetes notes and the latest k3s installation introduction
猜你喜欢

Chenglian premium products donated love materials for flood fighting and disaster relief to Yingde

抖音服務器帶寬有多大,才能供上億人同時刷?

Large current and frequency range that can be measured by Rogowski coil

887. egg drop

PMP从报考到拿证基本操作,了解PMP必看篇
![[untitled]](/img/bb/213f213c695795daecb81a4cf2adcd.jpg)
[untitled]

JS rounding tips

App automated testing appium Tutorial Part 1 - advanced supplementary content

Build an integrated kubernetes in Fedora

广州:金融新活水 文企新机遇
随机推荐
Set<String>
找合适的PMP机构只需2步搞定,一查二问
探讨gis三维系统在矿山行业中的应用
[go ~ 0 to 1] on the first day, June 24, variables, conditional judgment cycle statement
After installing NRM, the internal/validators js:124 throw new ERR_ INVALID_ ARG_ TYPE(name, ‘string‘, value)
CloudCompare&PCL 点云SVD分解
Wasmedge 0.10.0 release! New plug-in extension mechanism, socket API enhancement, llvm 14 support
B_ QuRT_ User_ Guide(27)
AWS builds a virtual infrastructure including servers and networks (2)
AWS saves data on the cloud (3)
【Go ~ 0到1 】 第二天 6月25 Switch语句,数组的声明与遍历
RAC enable archive log
The Falling Leaves
Sword finger offer 03 Duplicate number in array
Login common test case
DELL R730服务器开机报错:[XXX] usb 1-1-port4: disabled by hub (EMI?), re-enabling...
[learning notes] differential constraint
整数划分
与普通探头相比,差分探头有哪些优点
【Go ~ 0到1 】 第一天 6月24 变量,条件判断 循环语句