摘要: #include #include #include #include using namespace std; const int maxn=500009; const int oo=2147483647; int T; int nn=0; int ch[maxn*50][2]={0},siz[maxn*50]={0},pri[maxn*50]={0},ky[maxn*50]={0}; in... 阅读全文
posted @ 2018-03-02 21:36 ws_zzy 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 题解:贪心,从高位到低位考虑这一位到底是1还是0 O(nlogn) 阅读全文
posted @ 2018-03-02 18:27 ws_zzy 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 题解:线段树 3操作的l,r没赋初始值竟然过了样例??? 阅读全文
posted @ 2018-03-02 15:06 ws_zzy 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 题解: 设N为任何人都没获胜的状态 设仅有两个人 A=TTH B=HTT 另P(NTTH)表示出现NTTH串的概率,为0.125 另P(A)表示A获胜的概率 跟距前后缀关系列方程 则P(NTTH)=P(A)+0.25P(B)+0.5P(B) 三个人的话同理即可 还有P(A)+P(B)==1 n+1个 阅读全文
posted @ 2018-03-02 14:57 ws_zzy 阅读(206) 评论(0) 推荐(0) 编辑