![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
玲珑杯
文章平均质量分 55
lrccccc
靡不有初 鲜克有终
展开
-
玲珑杯 Black and White 【dp】
1091 - Black and White Time Limit:4s Memory Limit:128MByte Submissions:246Solved:78 DESCRIPTION Constroy likes the game called Reversi. He has a long paper tape with nn gri原创 2017-02-18 15:35:58 · 858 阅读 · 0 评论 -
玲珑OJ 1152 - Expected value of the expression 【DP】
题目链接显然可以拆位,20个位单独考虑 dp[i][j]=前i对OiAi,满足第j位为1的概率dp[i][j]=前i对O_iA_i,满足第j位为1的概率 dp[i][j]=dp[i−1][j]+(1−dp[i−1][j])∗(1−pi) Oi= or 且(ai>>j) and 1=1dp[i][j]=dp[i-1][j]+(1-dp[i-1][j])*(1-p_i)原创 2017-07-30 14:57:10 · 323 阅读 · 0 评论 -
玲珑OJ 1149 - Buildings 【尺取法】
题目链接<\a>显然通过尺取法可以找到每次以j为结尾,包含j的区间,往左延伸,最左能到i (i<=j) 于是以j为结尾的区间有(j-i+1)个 累加即可#include<stdio.h> #include<bits/stdc++.h> #define ll long long #define pii pair<int,int> #define pll pair<ll,ll> #define ME原创 2017-07-30 15:09:42 · 417 阅读 · 0 评论