摘要: #include <bits/stdc++.h> using namespace std; const int maxn=1e5+10; struct node{ int next,to,val; }e[maxn<<1]; int head[maxn<<1],k; void add(int from 阅读全文
posted @ 2021-05-21 18:48 Acception 阅读(29) 评论(0) 推荐(0)
摘要: 给定一个长度为 N的数列,A1,A2,...An,如果其中一段连续的子序列 Ai,Ai+1,…AjAi,Ai+1,…Aj 之和是 KK 的倍数,我们就称这个区间 [i,j][i,j] 是 KK 倍区间。 你能求出数列中总共有多少个 KK 倍区间吗? 输入格式 第一行包含两个整数 NN 和 KK。 以 阅读全文
posted @ 2021-05-21 14:47 Acception 阅读(153) 评论(0) 推荐(0)
摘要: #include <bits/stdc++.h> using namespace std; using ll = long long; int fan(int n){ for(ll i=n-1;i>=0;i--){ n&=i; if(n==0){ return i; } } } inline int 阅读全文
posted @ 2021-05-21 00:46 Acception 阅读(35) 评论(0) 推荐(0)