Maximum tiling order

Maximum tiling order

Will there by a maximum on the number of squares per candidate tiling?

From another thread, it was said that a dimension of an encoded rectangle would be within a signed 32-bit, which implies that the largest case (largest rectangle: 2^31-1 x 2^31-1, smallest squares: 1x1) is nearly 2^62 squares.

6 帖子 / 0 全新
最新文章
如需更全面地了解编译器优化,请参阅优化注意事项

Hi,
We haven't set a limit on the maximum and I did not understand why this would be a concern for coding this problem statement. Can you please clarify?

Thanks
-Rama

Quoting Rama Kishan Malladi (Intel)
We haven't set a limit on the maximum and I did not understand why this would be a concern for coding this problem statement. Can you please clarify?
Ok, sorry for the noise.

I think there's a need to know the maximum order - some languages can't allocate an array with more than 2^31 elements. If we know for sure that the maximum order is less than (say 2^30), then a simple array will suffice. If the order is larger, then we need more exotic storage schemes.

邓辉的头像

For example, the calculation of area you need to use int64.

Otherwise out of range

写字楼里写字间,写字间里程序员 程序人员写程序,又拿程序换酒钱 酒醒只在网上坐,酒醉还来网下眠 酒醉酒醒日复日,网上网下年复年

Hi,
Use datatypes as you feel appropriate and necessary. We would have the dimensions of the rectangle created to fit into a 32-bit signed integer.

Thanks
-Rama

登陆并发表评论。