随机化检测
UMR小豪
这个作者很懒,什么都没留下…
展开
-
F - Finding Lines UVALive - 6955 (随机数优化,检测)
题目链接:https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4967判断是不是存在有百分之p的点在一条直线上。嗯,学习了随机化优化的算法。#include using namespace std;const int M原创 2017-02-22 20:42:51 · 522 阅读 · 0 评论 -
费马检测(判断一个数是不是素数)
#include using namespace std; typedef long long ll using namespace std; ll Quick_Mod(ll a, ll b, ll mod)//快速幂 { ll res = 1,term = a % mod; while(b) { if(b原创 2017-02-22 19:52:33 · 3555 阅读 · 0 评论