码迷,mamicode.com
首页 >  
搜索关键字:hdu 1069 monkey and    ( 31863个结果
E - The Tower HDU - 6559
#include <set> #include <map> #include <deque> #include <queue> #include <stack> #include <cmath> #include <ctime> #include <bitset> #include <cstdio> ...
分类:其他好文   时间:2020-01-28 19:16:21    阅读次数:99
Doing Homework HDU - 1074 状态压缩
#include<iostream> #include<cstring> #include<cstdio> #include<string> #include<cmath> using namespace std; const int INF=0x3f3f3f3f; const int MAXN=( ...
分类:其他好文   时间:2020-01-28 17:52:40    阅读次数:61
免费馅饼 HDU - 1176 基础dp
/*题都是有一个状态转移方程式 , 只要推出方程式就问题不大了,首 先对于gameboy来说他下一秒只能 在0~10这十一个位置移动, 而对于1~9这九个位置来说他可以移动(假设他现在的位置为x)到x+1,或者x-1,或者x; 0和10这两个位置只有两个位置可以移动, 可以用dp[t][x],t秒的 ...
分类:其他好文   时间:2020-01-28 17:42:43    阅读次数:88
威佐夫博弈
HDU P2177 https://vjudge.net/problem/HDU-2177 内容:必败态(特殊态)为两个数中较小数等于两数之差乘以(sqrt(5)+1)/2; ...
分类:其他好文   时间:2020-01-28 17:35:27    阅读次数:50
Tickets HDU - 1260 简单dp
#include<iostream> using namespace std; const int N=1e5; int T,n; int a[N],b[N]; int dp[N]; int main() { cin>>T; while(T--) { cin>>n; for(int i=1;i<=n ...
分类:其他好文   时间:2020-01-28 17:35:08    阅读次数:48
Piggy-Bank HDU - 1114 完全背包
#include<iostream> #include<cstring> using namespace std; const int INF=0x3f3f3f3f; int t,e,f,n,dp[10010]; struct node { int p, w; //价值 重量 } no[10000] ...
分类:其他好文   时间:2020-01-28 17:27:44    阅读次数:70
FatMouse's Speed HDU - 1160 最长上升序列,
#include<cstdio> #include<cstdlib> #include<cstring> #include<algorithm> using namespace std; struct node { int w, s; int index; //储存标号 } mouse[1005]; ...
分类:其他好文   时间:2020-01-28 17:24:42    阅读次数:90
HDU 6521 Party(线段树)
题目意思:有n个人,一开始相互不认识。他们要去参加party,每次参加的人是编号在区间[l,r]内的人。参加完一次party之后,这区间内的人就会相互认识。每次会有有多少对人会新认识。那么用f[i] = j 表示 j - i的人都互相认识了,初始化f[i] = i,那么每次更新l,r话只需要找到是否 ...
分类:其他好文   时间:2020-01-28 17:22:09    阅读次数:63
Monkey and Banana HDU - 1069 有点像背包,又像最长上升序列
#include<iostream> #include<algorithm> #include<cstring> #include<vector> using namespace std; const int INF=0x3f3f3f3f; struct node{ int l,s,h; }; ve ...
分类:其他好文   时间:2020-01-28 15:50:15    阅读次数:83
Max Sum Plus Plus HDU - 1024 基础dp 二维变一维的过程,有点难想
/* dp[i][j]=max(dp[i][j-1]+a[j],max(dp[i-1][k])+a[j]) (0<k<j) dp[i][j-1]+a[j]表示的是前j-1分成i组,第j个必须放在前一组里面。 max( dp[i-1][k] ) + a[j] )表示的前(0<k<j)分成i-1组,第j ...
分类:其他好文   时间:2020-01-28 15:40:55    阅读次数:46
31863条   上一页 1 ... 55 56 57 58 59 ... 3187 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!