CF73A The Elder Trolls IV: Oblivon
题目描述
瓦西亚被要求杀死一个怪物。怪物的形状非常有趣,看起来像一个大小为 $x \times y \times z$ 的长方体,由不可破坏的 $1 \times 1 \times 1$ 大小的单元组成。
瓦西亚可以沿着假想的网格切割怪物,即从平行于平行六面体一侧的平面切割怪物。
每次切割后,怪物的所有部分均不会掉落,它们会完全保留在其位置上。也就是说瓦西亚可以同时切割多次。
瓦西亚想知道他切割 $k$ 次后最多可以将怪物切成的最大块数。
我们认为瓦西亚使用无限长和无限细的剑。
输入格式
输入共一行,包含四个整数 $x,y,z,k$ $(1 \leqslant x,y,z \leqslant 10^{6},0 \leqslant k \leqslant 10^{9})$ ,意义如题面所述。
输出格式
输出共一行,一个整数表示问题的答案。
说明/提示
In the first sample Vasya make 3 pairwise perpendicular cuts. He cuts monster on two parts with the first cut, then he divides each part on two with the second cut, and finally he divides each of the 4 parts on two.