|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
Combined Volume of Cuboids
An axis-aligned cuboid, specified by parameters { (x0,y0,z0), (dx,dy,dz) }, consists of all points (X,Y,Z) such that x0 ≤ X ≤ x0+dx, y0 ≤ Y ≤ y0+dy and z0 ≤ Z ≤ z0+dz. The volume of the cuboid is the product, dx × dy × dz. The combined volume of a collection of cuboids is the volume of their union and will be less than the sum of the individual volumes if any cuboids overlap.
Let C1,...,C50000 be a collection of 50000 axis-aligned cuboids such that Cn has parameters
x0 = S6n-5 modulo 10000
y0 = S6n-4 modulo 10000
z0 = S6n-3 modulo 10000
dx = 1 + (S6n-2 modulo 399)
dy = 1 + (S6n-1 modulo 399)
dz = 1 + (S6n modulo 399)
where S1,...,S300000 come from the "Lagged Fibonacci Generator":
For 1 ≤ k ≤ 55, Sk = [100003 - 200003k + 300007k3] (modulo 1000000)
For 56 ≤ k, Sk = [Sk-24 + Sk-55] (modulo 1000000)
Thus, C1 has parameters {(7,53,183),(94,369,56)}, C2 has parameters {(2383,3563,5079),(42,212,344)}, and so on.
The combined volume of the first 100 cuboids, C1,...,C100, is 723581599.
What is the combined volume of all 50000 cuboids, C1,...,C50000 ?
题目:
由 { (x0,y0,z0), (dx,dy,dz) } 来指定的轴对齐长方体里,包括所有的满足 x0 ≤ X ≤ x0+dx, y0 ≤ Y ≤ y0+dy 以及 z0 ≤ Z ≤ z0+dz 的点 (X,Y,Z)。
长方体的体积就是 dx × dy × dz 所得的乘积。多个长方体的联合体积是它们的并集的体积,如果它们中有重叠的话,联合体积则会比单纯的体积之和小。
定义 C1,...,C50000 为 50000 万个轴对称长方体,每个长方体 Cn 具有如下参数:
x0 = S6n-5 modulo 10000
y0 = S6n-4 modulo 10000
z0 = S6n-3 modulo 10000
dx = 1 + (S6n-2 modulo 399)
dy = 1 + (S6n-1 modulo 399)
dz = 1 + (S6n modulo 399)
其中 S1,...,S300000 由“缓慢型 Fibonacci 生成器” 生成:
对于 1 ≤ k ≤ 55, Sk = [100003 - 200003k + 300007k3] (modulo 1000000)
对于 56 ≤ k,Sk = [Sk-24 + Sk-55] (modulo 1000000)
所以,C1 的参数为 {(7,53,183),(94,369,56)},C2 的参数为 {(2383,3563,5079),(42,212,344)},以此类推。
前 100 个长方体 C1,...,C100 的联合体积为 723581599,那么,全部 50000 个长方体 C1,...,C50000 的联合体积为多少?
|
|