该文被密码保护。 阅读全文
posted @ 2020-02-14 20:25 谨川 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 比赛时找规律发现以0为起点的子串且包含1的数量=以其后面最近的1为起点的子串数量 且m=1时令k=(n+1)/2 (/为整除)答案为 k*(n+1-k) 但没想到正难则反,换言之相对于不考虑包含1的子串的数量($\frac{n(n+1)}{2}$)减少了该0所在位置至其后面距离他最近的1的距离 而m 阅读全文
posted @ 2020-02-14 15:36 谨川 阅读(147) 评论(0) 推荐(0) 编辑
摘要: ai等于ci时 ci和bi交换 bi等于ci时 ci和ai交换 ci要么和ai交换 要么和bi交换 不能不换 #include<bits/stdc++.h> #define ll long long using namespace std; const int N=1e2+5; char a[N], 阅读全文
posted @ 2020-02-14 13:44 谨川 阅读(135) 评论(0) 推荐(0) 编辑