Maximum tiling order

Maximum tiling order

Ritratto di academicrobot

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 post / 0 new
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione
Ritratto di Rama Kishan Malladi (Intel)

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

Ritratto di academicrobot
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.

Ritratto di mdma

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.

Ritratto di 邓辉

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

Otherwise out of range

写字楼里写字间,写字间里程序员 程序人员写程序,又拿程序换酒钱 酒醒只在网上坐,酒醉还来网下眠 酒醉酒醒日复日,网上网下年复年
Ritratto di Rama Kishan Malladi (Intel)

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

Accedere per lasciare un commento.