Fast Matrix Calculation

HDU - 4965