Template:cpp/algorithm/dsc for each n