2022-2023 ICPC Brazil Subregional Programming Contest VP
SerialABCDEFGHIJKLMNSolve●●●●●●◉●●●○○○●
A.Finding Maximal Non-Trivial Monotones
找连续且长度大于等于a
的子串长度和。直接记录加和即可。
#include
#define int long long
#define endl '\n'
using namespace std;
const int N = 1e5 + 10;
int a[N];
inline void solve(){
int n = 0; cin >> n;
string s; cin >> s, s = '@' + s;
int cnt = 0, ans = 0;
for(int i = 1; i = 2) ans += cnt;
cnt = 0;
}
}
if(cnt >= 2) ans += cnt;
cout =1,(x*=x)%=mod) if(y&1) (res*=x)%=mod;
return res;
}
int ck(int x,int y,int z){
int res=0;
for(int i=0;i>i)&1),fg2=((y>>i)&1),fg3=((z>>i)&1);
if(fg1!=fg2){
res+=(fg1>i)&1);
int now=fg1*4+fg2*2+fg3;
for(auto t:way){
for(int j=0;j>l1>>r1>>l2>>r2>>l3>>r3;
int ans1=dfs(r1,r2,r3),
ans2=dfs(r1,r2,l3-1),
ans3=dfs(r1,l2-1,r3),
ans4=dfs(r1,l2-1,l3-1),
ans5=dfs(l1-1,r2,r3),
ans6=dfs(l1-1,r2,l3-1),
ans7=dfs(l1-1,l2-1,r3),
ans8=dfs(l1-1,l2-1,l3-1);
int fenzi=((ans1-ans2-ans3+ans4-ans5+ans6+ans7-ans8)%mod+mod)%mod;
int fenmu=(r1-l1+1)*(r2-l2+1)%mod*(r3-l3+1)%mod;
cout p[i].y;
int lastx = 0, lasty = 0;
for(int i = 1; i
关注
打赏
热门博文
- 回坑记之或许是退役赛季?
- [LCT刷题] P1501 [国家集训队]Tree II
- [LCT刷题] P2147 洞穴勘测
- 2022-2023 ICPC Brazil Subregional Programming Contest VP记录
- [线段树套单调栈] 2019-2020 ICPC Asia Hong Kong Regional Contest H.[Hold the Line]
- The 2021 ICPC Asia Nanjing Regional Contest E.Paimon Segment Tree 区间合并线段树/维护矩阵乘法
- CF580E - Kefa and Watch 线段树维护哈希
- HDU5869 Different GCD Subarray Query 离线查询/区间贡献
- 27.CF1004F Sonya and Bitwise OR 区间合并线段树
- 26.CF1000F One Occurrence