ZOJ 2672 Fibonacci Subsequence(动态规划+hash)

AlphaBlend实现透明效果,只是仅仅能针对某块区域进行alpha操作,透明度可设。

TransparentBlt能够针对某种颜色进行透明,只是透明度不可设。

AlphaBlend:






BLENDFUNCTION bn;

bn.AlphaFormat = 0;

bn.BlendFlags = 0;

bn.BlendOp = AC_SRC_OVER;

bn.SourceConstantAlpha = 0; //透明度设置,0为不透明;255为全然透明

AlphaBlend(hMemDC,0,385,320,95,hBackGroundDC,0,385,320,95,bn);

bn.SourceConstantAlpha =
0:                           
 bn.SourceConstantAlpha = 100:
    

bn.SourceConstantAlpha = 255:

TransparentBlt:





TransparentBlt(hMemDC,10,0,296,20,hBarDCW,0,0,296,20,RGB(0,0,0));//指定RGB(0,0,0)透明

BitBlt(hMemDC, 10, 21, 296, 20, hBarDCW, 0, 0,
SRCCOPY);

时间: 2024-10-25 16:05:16

ZOJ 2672 Fibonacci Subsequence(动态规划+hash)的相关文章

LC 873. Length of Longest Fibonacci Subsequence

A sequence X_1, X_2, ..., X_n is fibonacci-like if: n >= 3 X_i + X_{i+1} = X_{i+2} for all i + 2 <= n Given a strictly increasing array A of positive integers forming a sequence, find the length of the longest fibonacci-like subsequence of A.  If on

ZOJ 3349 Special Subsequence

Special Subsequence Time Limit: 5000ms Memory Limit: 32768KB This problem will be judged on ZJU. Original ID: 334964-bit integer IO format: %lld      Java class name: Main There a sequence S with n integers , and A is a special subsequence that satis

zoj 1828 Fibonacci Numbers

ZOJ Problem Set - 1828 Fibonacci Numbers Time Limit: 2 Seconds      Memory Limit: 65536 KB A Fibonacci sequence is calculated by adding the previous two members of the sequence, with the first two members being both 1. f(1) = 1, f(2) = 1, f(n > 2) =

HDU 1159 Common Subsequence 动态规划

2017-08-06 15:41:04 writer:pprp 刚开始学dp,集训的讲的很难,但是还是得自己看,从简单到难,慢慢来(如果哪里有错误欢迎各位大佬指正) 题意如下: 给两个字符串,找到其中大的公共子序列,每个样例输出一个数: 最长公共子串(Longest Common Substirng)和最长公共子序列(Longest Common Subsequence,LCS)的区别为: 子串是串的一个连续的部分,子序列则是从不改变序列的顺序,而从序列中去掉任意的元素而获得新的序列: 也就是说

HDU-1159 Common Subsequence(动态规划2)

Description A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = < x1, x2, ..., xm > another sequence Z = < z1, z2, ..., zk > is a subsequence of X if there exists a strictly

BZOJ 1090 SCOI2003 字符串折叠 动态规划+Hash

题目大意:给定一个字符串,求按照题中所给的压缩方式最短能压缩到多长 区间DP 令f[i][j]表示[i,j]区间内的字符串最短能压缩到多长 普通的区间DP:f[i][j]=min{f[i][k]+f[k+1][j]} (i<=k<=j-1) 此外如果对这段字符串进行压缩,那么我们可以枚举循环节,用Hash来判断 如果k是一个循环节,那么有f[i][j]=min(f[i][j],f[i][i+k-1]+digit[len/k]+2) 其中len=j-i+1,digit表示一个数在十进制下的长度

ZOJ 3774 Fibonacci的K次方和

In mathematics, Fibonacci numbers or Fibonacci series or Fibonacci sequence are the numbers of the following integer sequence: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, ... By definition, the first two numbers in the Fibonacci sequence are

zoj 2060 Fibonacci Again(fibonacci数列规律、整除3的数学特性)

题目链接: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2060 题目描述: There are another kind of Fibonacci numbers: F(0) = 7, F(1) = 11, F(n) = F(n-1) + F(n-2) (n>=2) Input Input consists of a sequence of lines, each containing an integer n. (

873. Length of Longest Fibonacci Subsequence

A sequence X_1, X_2, ..., X_n is fibonacci-like if: n >= 3 X_i + X_{i+1} = X_{i+2} for all i + 2 <= n Given a strictly increasing array A of positive integers forming a sequence, find the length of the longest fibonacci-like subsequence of A.  If on