some solutions of PAT advanced problems with c or c++