摘要:
题目描述 In this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping two ad 阅读全文
摘要:
一、费马小定理,快速幂(需mod为质数) 二、扩展欧几里得算法 三、 非原创 当p是个质数的时候有inv(a) = (p - p / a) * inv(p % a) % p 证明:设x = p % a,y = p / a于是有 x + y * a = p(x + y * a) % p = 0移项得 阅读全文