递归View Code #include <cstdio>#include <cstring>#define LL __int64LL a, b, x, y, mod, n;void gao(LL n, LL &x, LL &y){ if(n == 1) { x = a % mod, y = b % mod; return; } LL tx, ty; gao(n>>1, tx, ty); x = (tx * tx - ty * ty) % mod; y = 2 * tx * ty % mod; if(n & 1) ... Read More
posted @ 2012-12-16 14:38 To be an ACMan Views(216) Comments(0) Diggs(0)