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 listMay 9, 2026 19:19E SequeiraE SequeiraScore: 1,532,277Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 9, 2026 19:231,527,867640,015,867483,034,000128,113,000454,656
2May 9, 2026 19:231,529,825649,655,081483,467,000128,463,000483,328
3May 9, 2026 19:231,532,005653,129,207483,590,000129,212,000471,040
4May 9, 2026 19:231,532,082665,140,678483,573,000129,260,000430,080
5May 9, 2026 19:231,532,277651,833,594484,017,000128,894,000454,656
6May 9, 2026 19:231,532,692645,302,891483,514,000129,563,000561,152
7May 9, 2026 19:231,533,932646,899,977483,272,000130,301,000368,640
8May 9, 2026 19:231,535,485660,744,097483,885,000130,309,000430,080
9May 9, 2026 19:231,536,222654,154,061483,691,000130,798,000430,080