摘要:
火柴棍等式 不知道为什么错了的搜索。。。 cpp include using namespace std; const int a[]={6,2,5,5,4,5,6,3,7,6}; int ans,n,e[2002]; void dfs(int sum,int x,int val,int bef,i 阅读全文
摘要:
CH6801 棋盘覆盖 cpp include using namespace std; const int N=2e4+10,M=210; int head[N],nxt[N 2],to[N 2],a[M][M],vis[N],match[N]; int num,m,n,ans; void add 阅读全文
摘要:
解法 splay的基本操作加上一个区间翻转。 代码 cpp include using namespace std; const int N=1e5+5; int read() { int x=0,p=1; char ch=getchar(); while((ch'9')&&ch!=' ') ch= 阅读全文
摘要:
解法 暴力算每个数的质因子复杂度和为n×sqrt(n)。 先筛出1~n的质数,p的次数为n/(p^k),p^k using namespace std; typedef long long LL; const int N=1e6+5; int prime[N],v[N]; int n,num; in 阅读全文