随笔分类 - 随笔
摘要:先上快速幂板子: #define int long long int fast_power(int x,int y,int mod){ int res=1; while(y){ if(y&1) res=(res*x)%mod; x=(x*x)%mod; y>>=1; } return res; }
阅读全文
摘要:参考链接:https://blog.csdn.net/weixin_44965308/article/details/104928695 练习题目:迷宫问题 POJ - 3984 //听说是水题,直接打印都可以过去的那种 方式一: dfs暴力搜索 几个月前的代码了,当时太菜鸡了,能看懂的就看懂把,b
阅读全文
摘要:参考链接:https://cloud.tencent.com/developer/article/2054290 朴素素数: bool rule(int n){ for(int i=2;i*i<=n;i++) if(n%i==0) return false; return true; } 埃氏筛法
阅读全文