摘要:
先上快速幂板子: #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; } 阅读全文
摘要:
之前某个省赛当时玩麻了 有 1° = π/180弧度180° = π弧度 C++版本 圆周函数 #define PI 3.1415926535 sin(x*1.0/180*PI); cos(x*1.0/180*PI); python版本 函数描述 sin(x) 返回x弧度的正弦值 cos(x) 返回 阅读全文
摘要:
参考链接: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; } 埃氏筛法 阅读全文