2012年10月31日
摘要: POJ_2891 两个同余方程是可以合并成一个同余方程的,就这样一直合并直到没法合并为止,注意运算过程中要合理地使用模操作来避免中间结果超出long long。#include<stdio.h>#include<string.h>#include<algorithm>typedef long long LL;int K;void exgcd(LL a, LL b, LL &d, LL &x, LL &y){ if(b == 0) d = a, x = 1, y = 0; else exgcd(b, a % b, d, y, x), y 阅读全文
posted @ 2012-10-31 15:31 Staginner 阅读(374) 评论(0) 推荐(0)