Optimized by adding 1 extra row to the head of percollation matrix.
This allows to check for percollation with only 1 element from the first line instead of N elements as before