摘要:
给定一个长度为 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
阅读(145)
评论(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
阅读(34)
评论(0)
推荐(0)

浙公网安备 33010602011771号