- 博客(62)
- 收藏
- 关注
原创 codeforce 6C
http://codeforces.com/problemset/problem/6/CAlice and Bob like games. And now they are ready to start a new game. They have placed n chocolate bars in a line. Alice starts to eat chocolate bar
2014-05-31 18:54:40 1158
原创 codeforce 6A
http://codeforces.com/problemset/problem/6/AJohnny has a younger sister Anne, who is very clever and smart. As she came home from the kindergarten, she told his brother about the task that her
2014-05-31 16:58:22 892
原创 poj 3009 dfs
http://poj.org/problem?id=3009DescriptionOn Planet MM-21, after their Olympic games this year, curling is getting popular. But the rules are somewhat different from ours. The game is played on
2014-05-31 12:21:24 696
原创 hdu 2196 树形dp
http://acm.hdu.edu.cn/showproblem.php?pid=2196Problem DescriptionA school bought the first computer some time ago(so this computer's id is 1). During the recent years the school bought N-1 n
2014-05-30 21:34:42 714
原创 2014acm北京邀请赛A题
http://wenku.baidu.com/link?url=ch5OM3LjZ9mH2FicoEW_f9QnXgDrWmSRXa1N_Tk-CZCAB7lrllWAvgtFNCBplfgbAdgWw8S77fSXPbpfyXfuhPfXoor6LZ8z_UtlAY6AwNi
2014-05-29 13:55:21 909
原创 hdu 1520 树形dp
http://acm.hdu.edu.cn/showproblem.php?pid=1520Problem DescriptionThere is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierarchic
2014-05-29 10:55:10 667
原创 light oj 1031 区间dp+博弈
http://lightoj.com/volume_showproblem.php?problem=1031You are playing a two player game. Initially there are n integer numbers in an array and player A and B get chance to take them alternatively.
2014-05-28 17:01:35 797
原创 运行有惊喜!!!!表白专用
#include #include #define N 50HANDLE hConsole;void gotoxy(int x, int y){ COORD coord; coord.X = x; coord.Y = y; SetConsoleCursorPosition(hConsole, coord);}int main(){ int i,j,k; hConsole
2014-05-27 21:18:42 915
原创 区间dp
http://acm.hdu.edu.cn/showproblem.php?pid=4632Problem DescriptionIn mathematics, a subsequence is a sequence that can be derived from another sequence by deleting some elements without chang
2014-05-27 19:31:02 757
原创 hdu 4293 区间dp
http://acm.hdu.edu.cn/showproblem.php?pid=4293Problem Description After the regional contest, all the ACMers are walking alone a very long avenue to the dining hall in groups. Groups can va
2014-05-26 11:40:36 682
原创 lightoj 1033 区间dp
http://lightoj.com/volume_showproblem.php?problem=1033By definition palindrome is a string which is not changed when reversed. "MADAM" is a nice example of palindrome. It is an easy job to test wh
2014-05-25 21:35:32 942
原创 poj 1738 取石子游戏 区间dpgarsiawachs算法
http://poj.org/problem?id=1738DescriptionThere is an old stone game.At the beginning of the game the player picks n(1At each step of the game,the player can merge two adjoining piles to a ne
2014-05-25 20:24:46 781
原创 sdut 1309 不老的传说 区间dp(较难)
http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=1309题目描述一位先知告诉dynamic,在遥远的地方,有一处不老的泉水,在那里,他可以找到他人生的意义。按照先知的指引,dynamic出发了。翻越雪山,穿过丛林,渡过汪洋,终于来到了沙漠的最深处。按照先知的说法,泉水就在这个地方。然而
2014-05-24 18:18:12 878
原创 zoj 3469 区间dp
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3469When we are focusing on solving problems, we usually prefer to stay in front of computers rather than go out for lunch. At this tim
2014-05-23 21:35:22 699
原创 动态规划之矩阵连乘
问题描述:给定n个矩阵:A1,A2,...,An,其中Ai与Ai+1是可乘的,i=1,2...,n-1。确定计算矩阵连乘积的计算次序,使得依此次序计算矩阵连乘积需要的数乘次数最少。输入数据为矩阵个数和每个矩阵规模,输出结果为计算矩阵连乘积的计算次序和最少数乘次数。 问题解析:由于矩阵乘法满足结合律,故计算矩阵的连乘积可以有许多不同的计算次序。这种计算次序可以用加括号的方式来确定。
2014-05-23 16:22:32 1534
原创 poj 1651 区间dp+矩阵连乘DP
http://poj.org/problem?id=1651DescriptionThe multiplication puzzle is played with a row of cards, each containing a single positive integer. During the move player takes one card out of the ro
2014-05-23 09:57:24 771
原创 poj 2955 区间dp
http://poj.org/problem?id=2955DescriptionWe give the following inductive definition of a “regular brackets” sequence:the empty sequence is a regular brackets sequence,if s is a regular b
2014-05-22 11:27:16 702
转载 Zoj 3537 Cake (区间DP_最优三角形剖分)
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3537题目大意:给定n个点的坐标,先问这些点是否能组成一个凸包,如果是凸包,问用不相交的线来切这个凸包使得凸包只由三角形组成,根据costi, j = |xi + xj| * |yi + yj| % p算切线的费用,问最少的切割费用。
2014-05-21 15:50:25 757
原创 nefu 459 矩阵连乘
http://acm.nefu.edu.cn/JudgeOnline/problemshow.php?problem_id=459descriptionLele now is thinking about a simple function f(x).If x < 10 f(x) = x.If x >= 10 f(x) = a0 * f(x-1)
2014-05-20 15:44:55 662
原创 NEFU 457 矩阵连乘
http://acm.nefu.edu.cn/JudgeOnline/problemshow.php?problem_id=457
2014-05-20 12:05:20 621
原创 矩阵的乘法和矩阵快速幂
代码如下:#include #include #include using namespace std;typedef long long LL;const int N = 2,M=2,P=2;const int MOD=1000000007;struct Matrix{ LL m[N][N];};Matrix A={1,1, 1,0};
2014-05-20 09:12:23 2233
原创 codeforce 432B - Football Kit 思维题
http://codeforces.com/problemset/problem/432/BB. Football Kittime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output
2014-05-16 16:54:19 950
原创 hdu 1864 01背包变形(浮点化整)
http://acm.hdu.edu.cn/showproblem.php?pid=1864Problem Description现有一笔经费可以报销一定额度的发票。允许报销的发票类型包括买图书(A类)、文具(B类)、差旅(C类),要求每张发票的总额不得超过1000元,每张发票上,单项物品的价值不得超过600元。现请你编写程序,在给出的一堆发票中找出可以报销的、不超过给定额度的
2014-05-16 10:03:05 757
原创 hdu 2571 数塔变形
http://acm.hdu.edu.cn/showproblem.php?pid=2571Problem Description穿过幽谷意味着离大魔王lemon已经无限接近了!可谁能想到,yifenfei在斩杀了一些虾兵蟹将后,却再次面临命运大迷宫的考验,这是魔王lemon设下的又一个机关。要知道,不论何人,若在迷宫中被困1小时以上,则必死无疑!可怜的yifenfei
2014-05-15 21:26:12 513
原创 hdu 1171 背包
http://acm.hdu.edu.cn/showproblem.php?pid=1171Problem DescriptionNowadays, we all know that Computer College is the biggest department in HDU. But, maybe you don't know that Computer College
2014-05-15 21:22:10 747
原创 hdu 1069 dp
http://acm.hdu.edu.cn/showproblem.php?pid=1069Problem DescriptionA group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a build
2014-05-15 19:06:02 562
原创 hdu 2955 01 背包(浮点数)
http://acm.hdu.edu.cn/showproblem.php?pid=2955Problem DescriptionThe aspiring Roy the Robber has seen a lot of American movies, and knows that the bad guys usually gets caught in the end, of
2014-05-15 14:16:46 1751
原创 UVA 11489 博弈思维题
http://vjudge.net/contest/view.action?cid=46225#problem/H Two players, S and T, are playing a game where they make alternate moves. S plays first. In this game, they start with an integer N. I
2014-05-14 16:23:24 774
原创 hdu 3594 强连通判断一条边是否只属于一个环
http://acm.hdu.edu.cn/showproblem.php?pid=3594Problem Description1. It is a Strongly Connected graph.2. Each edge of the graph belongs to a circle and only belongs to one circle.We call
2014-05-14 16:07:45 770
原创 UVA10892 最小公倍数素因子分解
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1833A pair of numbers has a unique LCM but a single number can be the LCM of more than one possible p
2014-05-13 21:05:26 1158
原创 UVA 12167 加最少的边让其变为连通图
ejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=&problem=3319&mosmsg=Submission+received+with+ID+13628687
2014-05-13 20:34:16 934
原创 Uva 10780 素因子分解的应用(n的分解、n!的分解)
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1721
2014-05-13 10:47:53 950
原创 zoj 3654
Letty Whiterock is a seasonal youkai who's only seen during winter. She seems fittingly cold towards most of the humans she meets, and many humans fear her abilities. However, because she shares the s
2014-05-13 09:04:07 604
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人