
暑期多校联合训练赛数据结构试题
文章平均质量分 55
Davenny
O ever youthful,O ever weeping.
展开
-
hdu 4366
http://acm.hdu.edu.cn/showproblem.php?pid=4366 SuccessorTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 4340 Accepted S原创 2017-07-15 16:45:45 · 423 阅读 · 0 评论 -
hdu6058-Kanade's sum
Give you an array A[1..n]A[1..n]of length nn. Let f(l,r,k)f(l,r,k) be the k-th largest element of A[l..r]A[l..r]. Specially , f(l,r,k)=0f(l,r,k)=0 if r−l+1#include <cstdio>#include <cstring>#include原创 2017-08-02 10:46:13 · 563 阅读 · 0 评论 -
Counting Divisors
Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others) Total Submission(s): 0 Accepted Submission(s): 0Problem Description In mathematics, the function d(n) denotes转载 2017-08-03 19:08:46 · 334 阅读 · 0 评论 -
hdu6070 Dirt Ratio
n ACM/ICPC contest, the ”Dirt Ratio” of a team is calculated in the following way. First let’s ignore all the problems the team didn’t pass, assume the team passed X problems during the contest, and su转载 2017-08-03 21:07:16 · 1406 阅读 · 2 评论 -
hdu 6096 String 字典树
String Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others) Total Submission(s): 0 Accepted Submission(s): 0Problem Description Bob has a dictionary with N words in转载 2017-08-11 10:35:09 · 408 阅读 · 0 评论 -
hdu 6035 Colorful Tree(dfs)
题意: 一棵有n个点的树,树上每个点都有颜色c[i],保证每两个点之间的路径只有一天,定义每条路径的值为这条路径上经过的不同颜色数量和。求所有路径的值。解题思路: 可以把问题转化为对每种颜色有多少条不同的路径至少经过这种颜色的点,然后加和。 求有多少条路径经过可以转换为总路径数-没有经过的路径数,只要求出没有经过的路径数就好了。对于每种颜色没有经过自己的路径条数我们可以通过一遍dfs求得。一个转载 2017-07-27 09:16:23 · 390 阅读 · 0 评论 -
hdu6133
Though being cruel and merciless in the battlefields, the total obedience to the command hierarchy makes message delivering between Stormtroopers quite inefficient, which finally caused the escape of L转载 2017-08-18 16:48:29 · 408 阅读 · 0 评论