摘要: 参考自:https://blog.csdn.net/XY20130630/article/details/50635756 题意:一个序列被称为是不无聊的,仅当它的每个连续子序列存在一个独一无二的数字,即每个子序列里至少存在一个数字只出现一次。给定一个整数序列,请你判断它是不是不无聊的。 分析:预处 阅读全文
posted @ 2019-09-16 01:16 *Zzz 阅读(237) 评论(0) 推荐(0) 编辑
摘要: B题:Crazy Binary String 把0看成-1,前缀和,pos[ 0+n ] = 0 #include <bits/stdc++.h> using namespace std; const int maxn = 1e5+3; int a[maxn]; int pos[maxn<<1]; 阅读全文
posted @ 2019-09-16 01:11 *Zzz 阅读(235) 评论(0) 推荐(0) 编辑