problem: (F) Best Edge Weight Solve in C/C++ Archive