动态规划——DP 优化
动态规划优化
Alex_McAvoy
想要成为渔夫的猎手
展开
-
传纸条(洛谷-P1006)
题目描述 小渊和小轩是好朋友也是同班同学,他们在一起总有谈不完的话题。一次素质拓展活动中,班上同学安排做成一个m行n列的矩阵,而小渊和小轩被安排在矩阵对角线的两端,因此,他们就无法直接交谈了。幸运的是,他们可以通过传纸条来进行交流。纸条要经由许多同学传到对方手里,小渊坐在矩阵的左上角,坐标 (1,1),小轩坐在矩阵的右下角,坐标 (m,n)。从小渊传到小轩的纸条只可以向下或者向右传递...原创 2018-08-20 17:08:00 · 532 阅读 · 0 评论 -
Fence(CF-324F)
Problem Description Vasya should paint a fence in front of his own cottage. The fence is a sequence ofnwooden boards arranged in a single row. Each board is a1centimeter wide rectangle. Let's num...原创 2019-07-31 11:13:05 · 263 阅读 · 0 评论 -
Blank(HDU-6578)
Problem Description There areNblanks arranged in a row. The blanks are numbered1,2,…,Nfrom left to right. Tom is filling each blank with one number in{0,1,2,3}. According to his thought, the fo...原创 2019-09-22 21:49:11 · 327 阅读 · 1 评论 -
Labyrinth(HDU-4826)
Problem Description 度度熊是一只喜欢探险的熊,一次偶然落进了一个m*n矩阵的迷宫,该迷宫只能从矩阵左上角第一个方格开始走,只有走到右上角的第一个格子才算走出迷宫,每一次只能走一格,且只能向上向下向右走以前没有走过的格子,每一个格子中都有一些金币(或正或负,有可能遇到强盗拦路抢劫, 度度熊身上金币可以为负,需要给强盗写欠条),度度熊刚开始时身上金币数为0,问度度熊走出迷宫时候身...原创 2019-01-14 21:04:13 · 220 阅读 · 0 评论 -
Dividing(HDU-1059)
Problem Description Marsha and Bill own a collection of marbles. They want to split the collection among themselves so that both receive an equal share of the marbles. This would be easy if all t...原创 2018-03-30 23:18:54 · 243 阅读 · 0 评论 -
Coins(HDU-2844)
Problem Description Whuacmers use coins.They have coins of value A1,A2,A3...An Silverland dollar. One day Hibix opened purse and found there were some coins. He decided to buy a very nice watch i...原创 2018-03-30 23:19:00 · 304 阅读 · 0 评论