Thealgorithmforaproblemintopcode'sSRM.