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 27, 2026 19:43TudyMTudyMScore: 313,320Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 27, 2026 19:44307,152140,817,659102,884,00019,977,0002,314,240
2Apr 27, 2026 19:44309,630141,300,877108,870,00014,982,0002,301,952
3Apr 27, 2026 19:44311,562148,077,033110,555,00014,070,0002,314,240
4Apr 27, 2026 19:44313,247144,700,629112,268,00013,031,0002,310,144
5Apr 27, 2026 19:44313,320145,970,226111,292,00014,036,0002,314,240
6Apr 27, 2026 19:44315,147146,043,351114,054,00012,005,0002,318,336
7Apr 27, 2026 19:44316,952143,484,368107,814,00018,967,0002,306,048
8Apr 27, 2026 19:44317,320142,597,234110,937,00015,991,0002,379,776
9Apr 27, 2026 19:44319,417143,560,429112,795,00014,972,0002,297,856