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 21, 2026 08:58Charles CabergsCharles CabergsScore: 191,472Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 21, 2026 08:59188,075104,252,47339,120,00036,110,0002,252,800
2Apr 21, 2026 08:59188,227104,565,46235,136,00040,155,0002,506,752
3Apr 21, 2026 08:59188,362105,471,87337,170,00038,175,0002,256,896
4Apr 21, 2026 08:59188,525100,697,12437,202,00038,208,0002,252,800
5Apr 21, 2026 08:59191,47292,810,56140,310,00036,279,0002,277,376
6Apr 21, 2026 08:59202,107107,747,26835,930,00044,913,0002,314,240
7Apr 21, 2026 08:59202,405114,463,36531,985,00048,977,0002,297,856
8Apr 21, 2026 08:59203,51298,150,57236,180,00045,225,0002,351,104
9Apr 21, 2026 08:59203,705104,671,59140,238,00041,244,0002,387,968