![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
hdu
Knight.Panda
ᕕ(˵•̀෴•́˵)ᕗ上分吗
展开
-
HDU3340 Rain in ACStar 线段树+几何
LINK #include<bits/stdc++.h>using namespace std;const int N=125010;int n,xx;map<int,int>x;int q[N]; struct N{ int x[7],y[7]; int n;}p[N];struct node{ int l,r,len; double lp,...原创 2019-12-05 12:29:16 · 111 阅读 · 0 评论 -
线段树扫描线模板
线段树 扫描线 HDU1542 HDU 1255 HDU 3642原创 2019-11-30 22:31:58 · 132 阅读 · 0 评论 -
Blank 滚动数组+dp
LINK Problem DescriptionThere are N blanks arranged in a row. The blanks are numbered 1,2,…,N from left to right.Tom is filling each blank with one number in {0,1,2,3}. According to his thought, th...原创 2019-11-02 16:08:30 · 188 阅读 · 0 评论 -
Mosaic 二维线段树板子(真
LINKMosaicTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 102400/102400 K (Java/Others)Total Submission(s): 2904 Accepted Submission(s): 1272Problem DescriptionThe God of sheep decide...原创 2019-10-22 11:09:27 · 644 阅读 · 0 评论 -
Matrix Searching 二维线段树
LINKMatrix SearchingTime Limit: 10000 msMemory Limit: 32768 KBGiven an n*n matrix A, whose entries Ai,j are integer numbers ( 1 <= i <= n, 1 <= j <= n ). An operation FIND the minimun n...原创 2019-10-21 21:33:21 · 137 阅读 · 0 评论 -
Luck and Love 二维树状数组
HDULuck and LoveTime Limit: 10000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8904 Accepted Submission(s): 2320Problem Description世界上上最远的距离不是相隔天涯海角而...原创 2019-10-20 21:36:12 · 123 阅读 · 0 评论 -
Another LIS 线段树处理空位+LIS
LINKAnother LISTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2100 Accepted Submission(s): 763Problem DescriptionThere is a sequence fi...原创 2019-10-19 16:06:17 · 136 阅读 · 0 评论 -
Gcd & Lcm game 线段树 +位运算操作
LINKGcd & Lcm gameTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1260 Accepted Submission(s): 298Problem DescriptionTired of playin...原创 2019-10-19 12:55:05 · 165 阅读 · 0 评论 -
// DP+模拟打怪 Warcraft
HDU3008#include<bits/stdc++.h>using namespace std;int a[110],b[110],dp[110][110];int main(){ int n,t,q; while(~scanf("%d%d%d",&n,&t,&q),n+t+q) { int maxx=100/q; if(100%q)//...原创 2019-09-19 13:22:26 · 122 阅读 · 0 评论 -
// DP +大数 Regular Words HDU1502
HDU 1502#include<bits/stdc++.h>using namespace std;string dp[61][61][61];string sum(string s,string t){ if(s.length()<t.length()) { string ss=s; s=t; t=ss; } for(int i...原创 2019-09-19 13:48:15 · 90 阅读 · 0 评论 -
// DP LCS 回溯 Advanced Fruits
Advanced FruitsHDU1503 #include<bits/stdc++.h>#define www printf("!!!\n");using namespace std;char s[110],t[110];int bz[110][110];int dp[110][110];int len1,len2;void LCS()//lcs dp 最长公共子...原创 2019-09-19 13:54:40 · 120 阅读 · 0 评论 -
//状压DP HDU 1074 Doing Homework
15->考虑状态压缩考虑完成一堆任务的时间开销是一样的 (想象成首位相连的线段)考虑选择一个任务点的集合 分别把每个点作为最后一个实现的 任务点那么容易得到这个点的罚时就是完成所有点的时间之后减去这个点的ddl (提前完成则不见),其他点完成的情况就继承dp[其他完成](表示其他点完成的最小罚时)HDU1074#include<bits/stdc++.h>usin...原创 2019-09-20 21:14:39 · 91 阅读 · 0 评论 -
//DFS OR 判断可行性的DP Zipper
HDU1501’\0’是判定字符数组结束的标识,表示这串字符到结尾了;DFS +标记)#include<bits/stdc++.h>using namespace std;char s[210],t[210],r[410];int ls,lt,len;int ff=0;int vis[210][210];void dfs(int now,int ss,in...原创 2019-09-20 23:38:50 · 129 阅读 · 0 评论 -
// 经典DP +货仓选址 Fast Food hdu1227
InputThe input file contains several descriptions of fastfood chains. Each description starts with a line containing the two integers n and k. n and k will satisfy 1 <= n <= 200, 1 <= k <...原创 2019-09-21 00:54:07 · 237 阅读 · 0 评论 -
//单调队列 HDU 3530Subsequence
单调队列#include<bits/stdc++.h>using namespace std;const int N=100010;int q1[N],q2[N],a[N];int main(){ int n,l,r; while(~scanf("%d%d%d",&n,&l,&r)) { for(int i=1;i<=n;i++) s...原创 2019-09-27 16:30:21 · 87 阅读 · 0 评论 -
// 树状数组+逆序 HDUMinimum Inversion Number
HDU 1394感觉模拟一遍的话很有帮助的题意就是不断地把第一个元素放在最后的位置,求这个过程中 最小的逆序数首先 树状数组维护前面出现的数sum(n+1) 就是n+1内所有出现的数的个数sum(a[i]+1)就是大小为a[i]+1内所有出现数的个数这样就可以得到刚开始的时候的逆序数对于 数列 0 3 2 1 4 //n=5最开始的逆序对 是3->3 2 1 4 ...原创 2019-09-27 21:55:30 · 77 阅读 · 0 评论 -
//树状数组 +逆序+滑动窗口 HDU Inversion
HDU5497(get skill 滑动窗口,首先对于一个数列 把他分段想成A B CB的长度就是题目中要求的mA B C -转化为>A ’ B’ C’1)把B中的第一个元素X舍弃 放在A '中,2)再从C中拿走第一个元素Y放在B中1)增加的逆序对就是A中比X大的数的个数+C中比X小的数的个数2)减少的逆序对的个数就是A’中比Y大的数的个数+C中比Y小的数的...原创 2019-09-28 10:43:32 · 122 阅读 · 0 评论 -
// DP 多重背包 +二进制优化 Dividing
HDU#include<bits/stdc++.h>using namespace std;int dp[130000];int mp[10];struct Good{ int v; int w;} ;int main(){ int cas=0; while(1) { vector<Good>goods; int sum=0; mem...原创 2019-09-17 23:56:00 · 104 阅读 · 0 评论 -
//DP HDU龟兔赛跑
HDU题目#include<bits/stdc++.h>using namespace std;double d[110];double dp[110];const int inf=0x3f3f3f;int main(){ int l; while(~scanf("%d",&l)) { int n,c,t;scanf("%d%d%d",&n,&am...原创 2019-09-17 23:52:57 · 112 阅读 · 0 评论 -
//DP How many ways
LINK: http://acm.hdu.edu.cn/showproblem.php?pid=1978Sample Input16 64 5 6 6 4 32 2 3 1 7 21 1 4 6 2 75 8 4 3 9 57 6 6 2 1 53 1 1 3 7 2Sample Output3948#include<bits/stdc++.h>using n...原创 2019-09-16 23:57:18 · 88 阅读 · 0 评论 -
连连看 hdu
连连看Time Limit : 20000/10000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 124 Accepted Submission(s) : 42Problem Description“连连看”相信很多人都玩过。没玩过也没关系,下面我给大家介绍一下游戏规则:...原创 2019-01-31 22:10:59 · 276 阅读 · 0 评论 -
诡异的楼梯 hdu
诡异的楼梯Time Limit : 2000/1000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other)Total Submission(s) : 93 Accepted Submission(s) : 39Problem DescriptionHogwarts正式开学以后,Harry发现在Hogwarts里,某些楼...原创 2019-02-02 12:01:03 · 104 阅读 · 0 评论 -
变形课hdu
变形课Time Limit : 2000/1000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other)Total Submission(s) : 94 Accepted Submission(s) : 44Problem Description呃......变形课上Harry碰到了一点小麻烦,因为他并不像Hermion...原创 2019-02-02 13:18:26 · 118 阅读 · 0 评论 -
胜利大逃亡hdu
#include<queue>#include<cstdio>#include<cstring>using namespace std;int a,b,c,t;int dt[50][50][50];int vis[50][50][50]; struct node{ int x;int y;int z; int step;};int mai...原创 2019-02-03 13:10:35 · 298 阅读 · 0 评论 -
非常可乐hdu
非常可乐Time Limit : 2000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 69 Accepted Submission(s) : 45Problem Description大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。...原创 2019-02-12 22:37:16 · 248 阅读 · 0 评论 -
逃离迷宫 hdu
逃离迷宫Time Limit : 1000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 84 Accepted Submission(s) : 40Problem Description 给定一个m × n (m行, n列)的迷宫,迷宫中有两个位置,glori...原创 2019-02-12 23:23:05 · 229 阅读 · 0 评论 -
推箱子hdu
Input输入数据的第一行是一个整数T(1&lt;=T&lt;=20),代表测试数据的数量.然后是T组测试数据,每组测试数据的第一行是两个正整数M,N(2&lt;=M,N&lt;=7),代表房间的大小,然后是一个M行N列的矩阵,代表房间的布局,其中0代表空的地板,1代表墙,2代表箱子的起始位置,3代表箱子要被推去的位置,4代表搬运工的起始位置.Output对于每组测试数据,输出搬运工最少需要...原创 2019-02-13 12:53:00 · 273 阅读 · 0 评论 -
Rightmost Digit hdu
Rightmost DigitTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 74332 Accepted Submission(s): 27415Problem DescriptionGiven a positive int...原创 2019-03-06 23:53:12 · 108 阅读 · 0 评论 -
Easy Summation h'du
Easy SummatiohduTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 4448 Accepted Submission(s): 1761Problem DescriptionYou are encountered ...原创 2019-03-07 00:09:20 · 114 阅读 · 0 评论 -
Sum hdu
SumTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 5322 Accepted Submission(s): 2099Problem DescriptionSample Input2Sample Output2H...原创 2019-03-07 00:43:50 · 112 阅读 · 0 评论 -
A hard puzzle hdu
A hard puzzleTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 52841 Accepted Submission(s): 19381Problem Descriptionlcy gives a hard puzzl...原创 2019-03-07 09:52:46 · 113 阅读 · 0 评论 -
悼念512汶川大地震遇难同胞——珍惜现在,感恩生活 hdu
悼念512汶川大地震遇难同胞——珍惜现在,感恩生活Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 41251 Accepted Submission(s): 17498Problem Description急!灾区的食物依然短...原创 2019-12-11 14:18:12 · 145 阅读 · 0 评论 -
I Hate It 线段树
I Hate ItTime Limit : 9000/3000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 59 Accepted Submission(s) : 38Problem Description很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数...原创 2019-05-18 20:07:41 · 66 阅读 · 0 评论 -
N! 大数万进制
N! 大数万进制Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 100122 Accepted Submission(s): 29953Problem DescriptionGiven an integer N(0 ≤ ...原创 2019-07-30 16:55:44 · 136 阅读 · 0 评论 -
Saving Beans 组合数学
Saving Beans 组合数学Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8943 Accepted Submission(s): 3542Problem DescriptionAlthough winter is f...原创 2019-08-12 10:22:22 · 104 阅读 · 0 评论 -
// DP Max Sum Plus Plus(最大M子段和问题)
LINK :http://acm.hdu.edu.cn/showproblem.php?pid=1024Max Sum Plus PlusTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 45134 Accepted Submis...原创 2019-09-16 23:47:56 · 197 阅读 · 0 评论 -
畅通工程 并集查找
畅通工程Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 72731 Accepted Submission(s): 38744Problem Description某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道...原创 2018-12-28 13:00:55 · 117 阅读 · 0 评论