摘要:
HDU4773 Problem of Apollonius(反演变换) 题意: 给定两个相离的圆,一个点P,求出过点P并且和两个圆都外切的所有圆。 思路: 以P为反演中心将两个圆O1,O2分别反演,得到O1',O2',则和O1,O2相切的圆反演后是一条不经过P点且与O1'、O2‘相切的直线。显然这条 阅读全文
摘要:
/* T组输入,给定n,判断n是否为素数,若不为素数输出最大的质因数 */ #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef __int128 lll; const int S = 20;//随机算 阅读全文
摘要:
typedef long long ll; typedef __int128 lll; const int S = 20;//随机算法判定次数,S越大,判错概率越小,一般5~20 inline ll fp(ll b, ll p, ll mod) { ll ans = 1; while (p) { i 阅读全文