上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 24 下一页
摘要: https://vjudge.net/problem/24768/origin#include#include#include#include#include#include#include#include#include#include#include#define... 阅读全文
posted @ 2018-08-23 13:15 erge1998 阅读(123) 评论(0) 推荐(0) 编辑
摘要: #include#define MAX_N 50005using namespace std;//求欧拉函数值 O(n^0.5)int euler[MAX_N];int sum[MAX_N];//o(MAX_N)时间筛出欧拉函数值的表void euler_phi2()... 阅读全文
posted @ 2018-08-23 13:13 erge1998 阅读(98) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#includeusing namespace std; const int ma =30000005;int ans[30000005];void solve(){ int top=ma >> 1,b; f... 阅读全文
posted @ 2018-08-23 13:12 erge1998 阅读(59) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#include#define maxn 10000000using namespace std;int a[maxn];int b[maxn];int n;long long pow(int a,int b){ ... 阅读全文
posted @ 2018-08-23 13:09 erge1998 阅读(87) 评论(0) 推荐(0) 编辑
摘要: #include#include#includeusing namespace std;const int MAX_N=100000000;int prime[MAX_N];//素数表bool is_prime[MAX_N+1];int n;//返回n以内的素数的个数... 阅读全文
posted @ 2018-08-23 13:07 erge1998 阅读(86) 评论(0) 推荐(0) 编辑
摘要: //求欧拉函数值 O(n^0.5)int euler_phi(int n){ int res=n; for(int i=2;i*i<=n;i++){ if(n%i==0){ res=res/i*(i-1); ... 阅读全文
posted @ 2018-08-22 20:01 erge1998 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 分析:a1 xor a2 xor a3 ... xor an !=0 则为必胜态a1 xor a2 xor a3 ... xor an ==0 则为必败态也就是说只要计算异或值,如果非零则A赢,否则B赢证:首先从xor为零的状态取走至少一颗石子,xor就一定会变成非零... 阅读全文
posted @ 2018-08-18 22:02 erge1998 阅读(96) 评论(0) 推荐(0) 编辑
摘要: #include#define mod 1000000009using namespace std;typedef long long ll;typedef long long LL;struct Mat{ LL mat[3][3]; Mat() ... 阅读全文
posted @ 2018-08-18 21:41 erge1998 阅读(148) 评论(0) 推荐(0) 编辑
摘要: #include#define mod 1000000007using namespace std;typedef long long ll;ll moni[1000005];ll exgcd(ll a, ll b, ll &x, ll &y){ if (b =... 阅读全文
posted @ 2018-08-16 21:04 erge1998 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 默慈金数 编辑本词条缺少信息栏、名片图,补充相关内容使词条更完整,还能快速升级,赶紧来编辑吧!默慈金数是在数学中,一个给定的数n的默慈金数是“在一个圆上的n个点间,画出彼此不相交的弦的全部方法的总数”。目录1 定义 2 演算推论定义编辑默慈金数在几何、组合数学和数论等... 阅读全文
posted @ 2018-08-16 20:08 erge1998 阅读(205) 评论(0) 推荐(0) 编辑
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 24 下一页