algorithm,C,C++