accepted 10012 in C++