![](https://img-blog.csdnimg.cn/20190918135101160.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
HDU习题集
hdu题目集合
等我学会后缀自动机
侠影之谜
展开
-
HDU 5614 Baby Ming and Matrix tree (树链剖分+线段树区间修改)
#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll long long#define lrt int l,int r,int rt#define lson l,m...原创 2020-04-17 10:43:37 · 146 阅读 · 0 评论 -
HDU 4866 Shooting (主席树+离散化优化+初始化问题)
#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll long long#define lrt int l,int r,int rt#define lson l,m...原创 2020-04-04 21:17:18 · 143 阅读 · 0 评论 -
HDU 4912 Paths on the tree (树链剖分+线段树+DP)
#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll long long#define lrt int l,int r,int rt#define lson l,m...原创 2020-03-31 19:54:28 · 189 阅读 · 0 评论 -
HDU 5029 Relief grain (树链剖分+权值线段树思想)
#include<bits/stdc++.h>using namespace std;#define debug cout<<"YES\n";#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll long long#define lrt int l,int r,int rt#define ...原创 2020-03-26 18:10:52 · 187 阅读 · 0 评论 -
HDU 5296 Annoying problem (树剖求LCA+链的距离)
#include<bits/stdc++.h>using namespace std;#define debug cout<<"YES\n";#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll long long#define lrt int l,int r,int rt#define ...原创 2020-03-23 19:32:29 · 115 阅读 · 0 评论 -
HDU 5293 Tree chain problem (树链剖分+LCA+树形DP)
#include<bits/stdc++.h>using namespace std;#pragma comment(linker, "/STACK:1024000000,1024000000") #define debug cout<<"YES\n";#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#de...原创 2020-03-21 11:34:28 · 159 阅读 · 0 评论 -
HDU 5452 Minimum Cut (树链剖分)
#include<bits/stdc++.h>using namespace std;#define debug cout<<"YES\n";#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll long long#define lrt int l,int r,int rt#define ...原创 2020-03-17 15:17:23 · 126 阅读 · 1 评论 -
HDU 6393 Traffic Network in Numazu (树链剖分+线段树)
#include<bits/stdc++.h>using namespace std;#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll long long#define lrt int l,int r,int rt#define lson l,mid,rt<<1#define rson...原创 2020-02-18 16:38:35 · 128 阅读 · 0 评论 -
HDU 6162 Ch’s gift (树链剖分+线段树维护)
#include<bits/stdc++.h>using namespace std;#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll long long#define lrt int l,int r,int rt#define lson l,mid,rt<<1#define rson...原创 2020-02-14 10:58:17 · 119 阅读 · 0 评论 -
HDU 5807 Keep In Touch 优化DP思维+倒序
#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define per(x,y,z) for(int (x)=(y);(x)>=(z);(x)--)#define ll lon...原创 2020-02-09 23:53:54 · 148 阅读 · 0 评论 -
HDU 6540 Neko and tree(树形DP+思维)
#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll long long#define lrt int l,int r,int rt#define lson l,m...原创 2020-02-07 18:31:52 · 244 阅读 · 0 评论 -
HUD 4300 Claire's Message (kmp应用)
Clairewd’s messageTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8379 Accepted Submission(s): 3071Problem Description Clairewd is a member o...原创 2018-05-01 08:40:17 · 70 阅读 · 0 评论 -
HDU 3746 Cyclic Nacklace(kmp+循环节)
Cyclic NacklaceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 12493 Accepted Submission(s): 5250Problem Description CC always becomes very d...原创 2018-05-01 09:01:36 · 100 阅读 · 0 评论 -
HUD 3336 Count the string(kmp+思维)
Count the string Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 12914 Accepted Submission(s): 5948 Problem DescriptionIt is we...原创 2018-05-01 09:09:10 · 123 阅读 · 0 评论 -
HDU 1867 A+B for you again(简单kmp)
A + B for you againTime Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8938 Accepted Submission(s): 2166Problem Description Generally speaking, t...翻译 2018-05-02 19:23:43 · 94 阅读 · 0 评论 -
HDU 4647 Another Graph Game ( 贪心 +思维)
Another Graph GameTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2179 Accepted Submission(s): 854Problem Description Alice and Bob are playi...原创 2018-05-10 19:36:39 · 199 阅读 · 0 评论 -
HDU 4968 Improving The GPA
Improving the GPATime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 820 Accepted Submission(s): 586Problem Description Xueba: Using the 4-P...原创 2018-06-17 08:21:23 · 122 阅读 · 0 评论 -
HDU 4968 简单dp背包问题
Improving the GPATime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 820 Accepted Submission(s): 586Problem Description Xueba: Using the 4-P...原创 2018-04-26 20:23:08 · 140 阅读 · 0 评论 -
HDU 1269 迷宫城堡(深搜水过)
迷宫城堡Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 20170 Accepted Submission(s): 8810Problem Description 为了训练小希的方向感,Gardon建立了一座大城堡,里面有N个房间(N...原创 2018-05-12 07:00:17 · 108 阅读 · 0 评论 -
HDU 3577 Fast Arrangement (简单线段树lazy)
Fast ArrangementTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 3561 Accepted Submission(s): 1024Problem Description Chinese always have the ...原创 2018-05-12 16:11:56 · 155 阅读 · 0 评论 -
HDU 4939 The Stupid Tower Defense (dp+思维构造)
Stupid Tower DefenseTime Limit: 12000/6000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 2442 Accepted Submission(s): 685Problem Description FSF is addicted...原创 2018-05-19 10:54:32 · 135 阅读 · 0 评论 -
HDU 1142 A Walk Through the Forest(记忆化DFS+DIJKS最短路算法)
A Walk Through the ForestTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9641 Accepted Submission(s): 3545Problem Description Jimmy experienc...原创 2018-05-07 17:51:42 · 121 阅读 · 0 评论 -
HDU 4901 The Romantic Hero (计数dp)
The Romantic HeroTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 2058 Accepted Submission(s): 897Problem Description There is an old cou...原创 2018-05-21 07:56:31 · 134 阅读 · 0 评论 -
HDU 1158 Employment Planing (简单dp)
Employment PlanningTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5955 Accepted Submission(s): 2571Problem Description A project manager wan...原创 2018-05-22 09:51:07 · 90 阅读 · 0 评论 -
HDU 3308 LCIS (线段树区间合并)
LCIS Time Limit : 6000/2000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 1 Accepted Submission(s) : 1Font: Times New Roman | Verdana | Georgia Font Size: ← →Probl...原创 2018-05-22 15:46:41 · 176 阅读 · 0 评论 -
HDU 4339 Query(线段树+搜索技巧)
QueryTime Limit: 20000/10000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 3274 Accepted Submission(s): 1078Problem Description You are given two strings s1[0..l...原创 2018-05-22 18:42:27 · 334 阅读 · 0 评论 -
HDU 5355 Cake (构造+简单回溯)
CakeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 3255 Accepted Submission(s): 689Special JudgeProblem Description There are m soda and t...原创 2018-05-30 08:09:19 · 223 阅读 · 0 评论 -
HDU 5573 Binary Tree(构造技巧)
Binary TreeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1615 Accepted Submission(s): 960Special JudgeProblem DescriptionThe Old Frog King ...原创 2018-05-30 22:35:39 · 264 阅读 · 0 评论 -
HDU 6071 Lazy Running (构造同余最短路+思维好题)
Lazy RunningTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 1598 Accepted Submission(s): 677Problem DescriptionIn HDU, you have to run alon...原创 2018-06-23 08:29:34 · 234 阅读 · 0 评论 -
HDU 5710 Digit-Sum (数学规律题)
Digit-Sum Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 848 Accepted Submission(s): 260Problem Description Let S(N) be digit-sum of N, i.e ...原创 2018-06-23 17:43:39 · 316 阅读 · 0 评论 -
HDU 5441 Travel (最小生成树+离线处理)
TravelTime Limit: 1500/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 4420 Accepted Submission(s): 1462Problem DescriptionJack likes to travel around the w...原创 2018-06-16 17:25:58 · 368 阅读 · 3 评论 -
HDU 6134 Battlestation Operational (容斥定理+打表)
Battlestation OperationalTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 734 Accepted Submission(s): 406Problem Description> The Death Sta...原创 2018-06-17 08:13:40 · 194 阅读 · 0 评论 -
HDU 1728 逃离迷宫(BFS+搜索方法改进)
#include<iostream>#include<cstring>#include<cstdio>#include<cstdlib>#include<algorithm>#include<queue>#include<stack>#include<cmath>usin原创 2018-06-17 08:18:44 · 106 阅读 · 0 评论 -
HDU 4300 Ciairewd's message(kmp应用)
Clairewd’s messageTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8379 Accepted Submission(s): 3071Problem Description Clairewd is a member o...原创 2018-06-17 08:20:19 · 98 阅读 · 0 评论 -
HDU 6143
Killer NamesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1745 Accepted Submission(s): 857Problem Description > Galen Marek, codenamed S...原创 2018-06-18 11:51:05 · 166 阅读 · 0 评论 -
HDU 5492 Find a path (巧妙三维dp思维)
Find a pathTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2064 Accepted Submission(s): 889Problem DescriptionFrog fell into a maze. This maz...原创 2018-06-26 08:25:42 · 176 阅读 · 0 评论 -
HDU 6090 Rikka with Graph(贪心)
Rikka with GraphTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1140 Accepted Submission(s): 636Problem Description As we know, Rikka is poor...原创 2018-06-27 00:16:34 · 154 阅读 · 0 评论 -
HDU 3887 Counting Offspring (DFS序构造+线段树)*
Counting OffspringTime Limit: 15000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3472 Accepted Submission(s): 1184 Problem DescriptionYou are given...原创 2018-07-19 12:01:44 · 188 阅读 · 0 评论 -
HDU Difference (折半二分思想 + 数据结构的使用)
DifferenceTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1432 Accepted Submission(s): 392Problem DescriptionLittle Ruins is playing a number...原创 2018-07-13 23:36:43 · 200 阅读 · 1 评论 -
HDU 3887 Counting Offstring (DFS序+线段树结构模板题)*
Counting OffspringTime Limit: 15000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3457 Accepted Submission(s): 1181Problem Description You are given a tree,...原创 2018-07-15 10:57:51 · 166 阅读 · 0 评论