modify solve_linear_equation. add find_pr(int64 p, const vector<pair<int64, int> >& f)