摘要:
动态规划是一个很神奇的东西,总结一下自己写动态规划是的一些盲区!有时候在定义状态的时候,可以用一定的方法,可以达到对转移时的时间复杂度起到很大的优化作用,以下面的题目来说明这点。Writing CodeProgrammers working on a large project have just ... 阅读全文
摘要:
DescriptionGive a tree with n vertices,each edge has a length(positive integer less than 1001).Define dist(u,v)=The min distance between node u and v.... 阅读全文
摘要:
题意 在一个N*M的矩阵中给每个格子染上黑白色,要求任意一个2*2的矩阵颜色不能一样,N0) { n = cin.nextBigInteger(); m = cin.nextInt(); p = cin.nextInt(); Matrix A = new Matrix(10) ... 阅读全文