Problem Solving IV Note 07 2019-06-16 Chapter 31: 数论算法123456789int exgcd (int a, int b, int &x, int &y) { if (!b) { x = 1, y = 0; return a; } int ans = exgcd (b, a % b, y, x); y -= a / b * x; return ans;} Last updated: 2019-06-16 20:47:30 Link:https://Maxwell-lyu.github.io/2019/06/16/Learn-PS-20190616-PS-IV-07/ Prev DB-PRE Next Probability Ch8