Largest Square Submatrix of all 1's NoSIMD_C#

Find the largest square submatrix consisting entirely of 1s as fast as possible.

Input

A 10,000 x 10,000 matrix of uint8 values (0 or 1) on STDIN.

0, 1, 0, 1, 1
0, 1, 1, 1, 1
0, 0, 1, 0, 0
1, 0, 1, 1, 0

Output

Print the side length of the largest all-ones square submatrix to STDOUT. The answer is guaranteed to be greater than 1.

For the example above, the output is:

2
Back to listApr 20, 2026 16:46BenBenScore: 1,152,887Success
Source Code

Source code access is restricted. Log in to request access.

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 20, 2026 16:511,152,305483,202,213458,923,0001,999,0002,277,376
2Apr 20, 2026 16:511,152,322489,586,640458,930,0001,999,0002,256,896
3Apr 20, 2026 16:511,152,332488,281,789457,934,0002,999,0002,273,280
4Apr 20, 2026 16:511,152,402490,540,119458,962,0001,999,0002,482,176
5Apr 20, 2026 16:511,152,887489,413,271460,155,0001,000,0002,461,696
6Apr 20, 2026 16:511,152,947483,597,308460,179,0001,000,0002,465,792
7Apr 20, 2026 16:511,152,950482,508,331460,180,0001,000,0002,260,992
8Apr 20, 2026 16:511,153,005482,602,497460,202,0001,000,0002,469,888
9Apr 20, 2026 16:511,153,227489,607,426460,291,0001,000,0002,469,888