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 listNov 20, 2025 20:23izotoffizotoffScore: 1,308,043Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 20, 2025 20:231,307,258550,994,661519,904,0002,999,0002,326,528
2Nov 20, 2025 20:231,307,310545,766,723519,925,0002,999,0002,326,528
3Nov 20, 2025 20:231,307,683547,089,245521,073,0002,000,0002,387,968
4Nov 20, 2025 20:231,307,848552,781,529521,139,0002,000,0002,326,528
5Nov 20, 2025 20:231,308,043543,803,807523,217,00002,326,528
6Nov 20, 2025 20:231,308,150548,720,064523,260,00002,392,064
7Nov 20, 2025 20:231,308,475552,235,305523,390,00002,326,528
8Nov 20, 2025 20:231,308,610550,566,352523,444,00002,326,528
9Nov 20, 2025 20:231,309,383547,470,854520,755,0002,998,0002,383,872