← 返回 amazon 的题目列表Lazy Array
类型:online_judge
Implement a Lazy Array, which computes elements only when they are accessed, thus reducing unnecessary computations. Ensure that only necessary and uncomputed elements are calculated during access. Provide a method to access elements and a preprocessing method.
Example
Input
2