多校
文章平均质量分 79
圣诞老人家
这个作者很懒,什么都没留下…
展开
-
hdu 6068 Classic Quotation
这个博客讲的非常好 点击打开链接Description 给出一个长度为n的字符串S和一个长度为m的字符串T,有q次查询,每次查询给出一个区间[L,R],求对所有1Input 第一行一整数T表示用例组数,每组用例首先输入三个整数n,m,q分别表示S串串长和T串串长以及查询次数,之后输入串S和串T,两个串均由小写字母构成,最后q行每行输入两个整数L,R表示一次查询 (1O转载 2017-08-30 15:38:47 · 352 阅读 · 0 评论 -
hdu 6047 Maximum Sequence
Maximum SequenceTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 0 Accepted Submission(s): 0Problem DescriptionSteph is extrem原创 2017-07-27 21:07:03 · 179 阅读 · 0 评论 -
hdu 6045 Is Derek lying?
Problem DescriptionDerek and Alfia are good friends.Derek is Chinese,and Alfia is Austrian.This summer holiday,they both participate in the summer camp of Borussia Dortmund.During the summer原创 2017-07-27 20:55:50 · 186 阅读 · 0 评论 -
hdu 6038
FunctionTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1353 Accepted Submission(s): 623Problem DescriptionYou are given a原创 2017-07-27 20:49:02 · 242 阅读 · 0 评论 -
hdu6034 Balala Power!
Talented Mr.Tang has n strings consisting of only lower case characters. He wants to charge them with Balala Power (he could change each character ranged from a to z into each number ranged from 0 t原创 2017-07-27 20:33:53 · 427 阅读 · 0 评论 -
hdu 6105 Gameia 思维+策略
题 目 传 送 门题意:给出一棵树,Alice 和 Bob 轮流操作, Alice先手, Alice的操作是选一个未染色的点将其染成白色,Bob的操作是选一个未染色的点将其染成黑色,并且和这个点有直连边的点也被强制染成黑色(无论这些直连点之前是否有颜色),Bob还有一个小技能是去掉一条边,最后当所有点都有颜色的时候,如果有白色点则Alice赢,否则Bob赢。思路:官方题解:原创 2017-08-11 19:24:00 · 300 阅读 · 0 评论 -
hdu 6070 枚举答案+线段树
题目传送门:http://acm.hdu.edu.cn/showproblem.php?pid=6070题意:给你长度为n的序列,求某个区间[l,r]使得区间内的数字种类/区间长度最小输出这个最小值官方题解:思路详解:首先从答案入手,二分答案每次二分的答案我们要找是否存在区间满足size(l,r)+mid*l然后我们从左往右枚举r,每次就相当于插入一个新原创 2017-08-04 14:14:13 · 207 阅读 · 0 评论 -
欢迎使用CSDN-markdown编辑器
欢迎使用Markdown编辑器写博客本Markdown编辑器使用StackEdit修改而来,用它写博客,将会带来全新的体验哦:Markdown和扩展Markdown简洁的语法代码块高亮图片链接和图片上传LaTex数学公式UML序列图和流程图离线写博客导入导出Markdown文件丰富的快捷键快捷键加粗 Ctrl + B 斜体 Ctrl + I 引用 Ctrl原创 2017-08-04 13:44:07 · 138 阅读 · 0 评论 -
hdu 6143 Killer Names dp
题 目 传 送 门:题意:给出一个m个字母的字母表,问我们能生成多少对字符串,该对字符串长度为n。并且字符串之间不能存在相同的字母思路1:dp[i][j]表示用j中颜色去涂i个格子(j中颜色全用上),然后直接dp。状态转移方程为:dp[i][j]=dp[i-1][j]*j+dp[i-1][j-1]*(m-(j-1));ac代码:#include using names原创 2017-08-18 12:10:35 · 208 阅读 · 0 评论 -
hdu 6103 Kirinriki 枚举+尺取
题 目 传 送 门题意:首先定义了两个串之间的距离 然后给我们一个串让我们找到这个串中两个不重叠的最长子串(两子个串长度相同),满足两个子串的距离思路:由于两个串是不重叠的,所以我们首先可以枚举两个串的对称轴,但这时候我们又需要分为两种情况讨论1.2.枚举完对称轴然后尺取法找最大长度就可以了ac代码:#include原创 2017-08-11 10:19:43 · 243 阅读 · 0 评论 -
hdu6090 Rikka with Graph
题 目 传 送 门题意:给定n个点,m条边,让你安排点和边构成一个无向图。dis(i,j),表示i到j最小的边数,如果无法到达,dis(i,j)为n,问每个点到其他所有的点的dis之和。思路:简单的贪心策略问题,有两种情况1.当m>n-1(连通)的时候2*m个dis(i,j)为1,其余为22.当m(1)m+1个点是联通的和1一样(2)n-(m原创 2017-08-09 13:39:03 · 256 阅读 · 0 评论 -
hdu 6058 Kanade's sum 维护链表
Problem DescriptionGive you an array A[1..n]of length n. Let f(l,r,k) be the k-th largest element of A[l..r].Specially , f(l,r,k)=0 if r−l+1k.Give you k , you need to calculate ∑原创 2017-08-02 11:05:25 · 284 阅读 · 0 评论 -
2017 Multi-University Training Contest 3
2017 Multi-University Training Contest 3 solutions BY 洪华敦发表回复1001考虑容斥,枚举哪些限制强制不满足,把n减去这些不满足限制的和,然后计算组合数. 注意到组合数有点难算,注意到可以把组合数看成一个mm阶多项式,就可以把问题转换成对每一个1\leq k\leq m1≤k≤m计算kk次方的和. 如果c转载 2017-08-01 19:08:44 · 575 阅读 · 0 评论 -
hdu 6040 Hints of sd0061
Problem Descriptionsd0061, the legend of Beihang University ACM-ICPC Team, retired last year leaving a group of noobs. Noobs have no idea how to deal with m coming contests.sd0061 has left a set原创 2017-07-29 18:50:16 · 255 阅读 · 0 评论 -
hdu 6033 Add More Zero
There is a youngster known for amateur propositions concerning several mathematical hard problems.Nowadays, he is preparing a thought-provoking problem on a specific type of supercomputer which ha原创 2017-07-27 20:12:59 · 198 阅读 · 0 评论 -
hdu 6043 KazaQ's Socks
Problem DescriptionKazaQ wears socks everyday.At the beginning, he has n pairs of socks numbered from 1 to n in his closets. Every morning, he puts on a pair of socks which has the sma原创 2017-07-27 20:16:11 · 362 阅读 · 0 评论 -
hdu 6053
TrickGCDTime Limit: 5000/2500 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 969 Accepted Submission(s): 372Problem DescriptionYou are given an原创 2017-07-28 10:33:04 · 387 阅读 · 0 评论 -
hdu 6178 dfs+超神读入挂
Problem DescriptionThere is a tree having N vertices. In the tree there are K monkeys (K <= N). A vertex can be occupied by at most one monkey. They want to remove some edges and leave minimum edg原创 2017-08-29 21:23:10 · 361 阅读 · 0 评论 -
hdu 6044 dfs+组合数
Problem DescriptionAs to a permutation p1,p2,⋯,pn from 1 to n, it is uncomplicated for each 1≤i≤n to calculate (li,ri) meeting the condition that min(pL,pL+1,⋯,pR)=pi if and only if li≤L≤i原创 2017-08-29 20:41:28 · 323 阅读 · 0 评论 -
hdu 6161
Problem DescriptionYou are given a complete binary tree with n nodes. The root node is numbered 1, and node x's father node is ⌊x/2⌋. At the beginning, node x has a value of exactly x. We de原创 2017-08-28 14:52:34 · 229 阅读 · 0 评论 -
hdu 5773 策略+最长上升子序列
Problem Description?? gets an sequence S with n intergers(0 < n <= 100000,0<= S[i] <= 1000000).?? has a magic so that he can change 0 to any interger(He does not need to change all 0 to the same i原创 2017-09-05 21:42:12 · 248 阅读 · 0 评论 -
hdu 6039 线段树+dfs序
constroy has some gears, each with a radius. Two gears are considered adjacent if they meet one of the following conditions: 1. They share a common edge (i.e. they have equal linear velocity).原创 2017-08-27 21:35:46 · 304 阅读 · 0 评论 -
hdu6171 双向搜索+hash
Suppose that you are an admiral of a famous naval troop. Our naval forces have got 21 battleships. There are 6 types of battleships.First, we have got one flagship in which the admiral must be and i原创 2017-08-26 22:02:02 · 596 阅读 · 0 评论 -
hdu 6170 模拟
Problem DescriptionGiving two strings and you should judge if they are matched.The first string contains lowercase letters and uppercase letters.The second string contains lowercase letters, u原创 2017-08-23 10:49:43 · 302 阅读 · 1 评论 -
hdu 6168 模拟+优先队列
zk has n numbers a1,a2,...,an. For each (i,j) satisfying 1≤i(ai+aj). These new numbers could make up a new sequence b1,b2,...,bn(n−1)/2.LsF wants to make some trouble. While zk is sleeping, Lsf原创 2017-08-23 10:46:39 · 223 阅读 · 0 评论 -
hdu 5745 dp+bitset
Professor Zhang would like to solve the multiple pattern matching problem, but he only has only one pattern string p=p1p2...pmp=p1p2...pm. So, he wants to generate as many as possible pattern string原创 2017-09-04 20:51:17 · 209 阅读 · 0 评论 -
hdu 6136 模拟+优先队列
Problem Description> During the Trade Federation invasion of Naboo, Anakin Skywalker won the Boonta Eve Classic on Tatooine, securing his freedom from a life of slavery. Betting on the races was a原创 2017-08-22 21:06:40 · 313 阅读 · 0 评论 -
hdu 6138 ac自动机
Problem Description> The Eternal Fleet was built many centuries ago before the time of Valkorion by an unknown race on the planet of Iokath. The fate of the Fleet's builders is unknown but their l原创 2017-08-22 10:14:12 · 380 阅读 · 0 评论 -
hdu 6180 贪心+multiset
Problem DescriptionThere are N schedules, the i-th schedule has start time si and end time ei (1 timeend and timestart , where time_{end} is time to turn off the machine and timestart is t原创 2017-08-25 10:26:23 · 270 阅读 · 0 评论 -
hdu 6035 Colorful Tree 树状dp
Problem DescriptionThere is a tree with n nodes, each of which has a type of color represented by an integer, where the color of node i is ci.The path between each two different nodes is uni原创 2017-07-29 11:30:25 · 231 阅读 · 0 评论 -
hdu 6052 To my boyfriend 暴力枚举+容斥去重
Problem DescriptionDear LiaoI never forget the moment I met with you. You carefully asked me: "I have a very difficult problem. Can you teach me?". I replied with a smile, "of course". You rep原创 2017-07-29 17:42:19 · 533 阅读 · 0 评论 -
Fang Fang 思维题
Fang Fang says she wants to be remembered. I promise her. We define the sequence F F of strings. F 0 = ‘‘f", F0 = ‘‘f",F 1 = ‘‘ff", F1 = ‘‘ff",F 2 = ‘‘cff", F2 = ‘‘cff",F n = F原创 2017-06-22 20:31:56 · 478 阅读 · 0 评论 -
hdu5972 Regular Number
Using regular expression to define a numeric string is a very common thing. Generally, use the shape as follows: (0|9|7) (5|6) (2) (4|5) Above regular expression matches 4 digits:The first is one原创 2017-06-09 23:13:46 · 336 阅读 · 0 评论 -
Little Tiger vs. Deep Monkey
A crowd of little animals is visiting a mysterious laboratory �C The Deep Lab of SYSU.“Are you surprised by the STS (speech to speech) technology of Microsoft Research and the cat face recogniti原创 2017-04-09 16:16:33 · 912 阅读 · 0 评论 -
- Hard Code
Some strange code is sent to Da Shan High School. It's said to be the prophet's note. The note is extremely hard to understand. However, Professor Meng is so smart that he successfully found the patte原创 2017-04-09 16:09:36 · 454 阅读 · 0 评论 -
uva1592 Database
Peter studies the theory of relational databases. Table in the relational database consists of values tare arranged in rows and columns.There are di?erent normal forms that database may adhere to.原创 2017-04-08 22:10:27 · 486 阅读 · 0 评论 -
Gym - 101308H
Problem H. HeadshotInput file: headshot.inOutput file: headshot.outYou have a revolver gun with a cylinder that has n chambers. Chambers are located in a circle on acylinder. Each chamber can原创 2017-04-08 21:58:24 · 366 阅读 · 0 评论 -
B - Foosball Dynasty
桌游游戏题意就是告诉你Balaji and his coworkers like to play Foosball on their lunch break. Foosball is a game typicallyplayed by 2 players (individual matchup) or 4 players (team play). However, due to the i原创 2017-03-29 20:50:05 · 568 阅读 · 0 评论 -
poj 3863 Business Center
International Cyber Police Corporation (ICPC) had built a new mega-tall business center to host itsheadquarters and to lease some space for extra profit. It has so many floors, that it is impractica原创 2017-04-07 19:17:19 · 584 阅读 · 0 评论 -
non-random numbers
Vasya is a schoolboy who was playing around with a random number generator and noticed that it never generates numbers with the value of a specific digit equal to the position of that digit in the原创 2017-03-11 11:34:11 · 443 阅读 · 0 评论