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 19, 2025 18:16Yuriy LyfenkoYuriy LyfenkoScore: 9,790Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 19, 2025 18:158,62516,142,0103,450,00002,285,568
2Nov 19, 2025 18:158,97321,650,5513,589,00002,285,568
3Nov 19, 2025 18:159,05019,677,9503,620,00002,277,376
4Nov 19, 2025 18:169,10820,139,0562,429,0001,214,0002,293,760
5Nov 19, 2025 18:159,29316,861,3333,717,00002,285,568
6Nov 19, 2025 18:159,50521,911,0623,802,00002,289,664
7Nov 19, 2025 18:169,79018,572,0433,916,00002,289,664
8Nov 19, 2025 18:159,79318,858,3183,917,00002,289,664
9Nov 19, 2025 18:169,80020,765,7862,940,000980,0002,285,568
10Nov 19, 2025 18:159,80321,552,1982,941,000980,0002,281,472
11Nov 19, 2025 18:159,88319,979,7102,965,000988,0002,277,376
12Nov 19, 2025 18:159,90519,941,6212,972,000990,0002,375,680