08 2017 档案
2017ACM暑期多校联合训练 - Team 9 1005 HDU 6165 FFF at Valentine (dfs)
摘要:" 题目链接 " Problem Description At Valentine's eve, Shylock and Lucar were enjoying their time as any other couples. Suddenly, LSH, Boss of FFF Group cau 阅读全文
posted @ 2017-08-23 11:11 渡…… 阅读(235) 评论(0) 推荐(0)
2017ACM暑期多校联合训练 - Team 9 1010 HDU 6170 Two strings (dp)
摘要:" 题目链接 " Problem Description Giving two strings and you should judge if they are matched. The first string contains lowercase letters and uppercase le 阅读全文
posted @ 2017-08-23 09:52 渡…… 阅读(135) 评论(0) 推荐(0)
2017 ACM暑期多校联合训练 - Team 9 1008 HDU 6168 Numbers (模拟)
摘要:" 题目链接 " Problem Description zk has n numbers a1,a2,...,an. For each (i,j) satisfying 1≤i using namespace std; const int maxn = 1e4; typedef long long 阅读全文
posted @ 2017-08-22 19:28 渡…… 阅读(158) 评论(0) 推荐(0)
2017中国大学生程序设计竞赛 - 网络选拔赛 1004 HDU 6153 A Secret (字符串处理 KMP)
摘要:" 题目链接 " Problem Description Today is the birthday of SF,so VS gives two strings S1,S2 to SF as a present,which have a big secret.SF is interested in 阅读全文
posted @ 2017-08-19 21:13 渡…… 阅读(264) 评论(0) 推荐(0)
2017中国大学生程序设计竞赛 - 网络选拔赛 1005 HDU 6154 CaoHaha's staff (找规律)
摘要:" 题目链接 " Problem Description "You shall not pass!" After shouted out that,the Force Staff appered in CaoHaha's hand. As we all know,the Force Staff is 阅读全文
posted @ 2017-08-19 20:48 渡…… 阅读(213) 评论(0) 推荐(0)
2017中国大学生程序设计竞赛 - 网络选拔赛 1003 HDU 6152 Friend-Graph (模拟)
摘要:" 题目链接 " Problem Description It is well known that small groups are not conducive of the development of a team. Therefore, there shouldn’t be any smal 阅读全文
posted @ 2017-08-19 19:10 渡…… 阅读(188) 评论(0) 推荐(0)
2017ACM暑期多校联合训练 - Team 8 1006 HDU 6138 Fleet of the Eternal Throne (字符串处理 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. T 阅读全文
posted @ 2017-08-18 16:10 渡…… 阅读(283) 评论(0) 推荐(0)
2017ACM暑期多校联合训练 - Team 8 1002 HDU 6134 Battlestation Operational (数论 莫比乌斯反演)
摘要:" 题目链接 " Problem Description The Death Star, known officially as the DS 1 Orbital Battle Station, also known as the Death Star I, the First Death Star 阅读全文
posted @ 2017-08-18 10:13 渡…… 阅读(174) 评论(0) 推荐(0)
2017ACM暑期多校联合训练 - Team 8 1011 HDU 6143 Killer Names (容斥+排列组合,dp+整数快速幂)
摘要:" 题目链接 " Problem Description Galen Marek, codenamed Starkiller, was a male Human apprentice of the Sith Lord Darth Vader. A powerful Force user who li 阅读全文
posted @ 2017-08-17 21:39 渡…… 阅读(185) 评论(0) 推荐(1)
2017ACM暑期多校联合训练 - Team 8 1008 HDU 6140 Hybrid Crystals (模拟)
摘要:" 题目链接 " Problem Description Kyber crystals, also called the living crystal or simply the kyber, and known as kaiburr crystals in ancient times, were 阅读全文
posted @ 2017-08-17 20:10 渡…… 阅读(233) 评论(0) 推荐(0)
2017ACM暑期多校联合训练 - Team 7 1009 HDU 6128 Inverse of sum (数学计算)
摘要:" 题目链接 " Problem Description There are n nonnegative integers a1…n which are less than p. HazelFan wants to know how many pairs i,j(1≤i0的这些对数减掉。 这样求出来 阅读全文
posted @ 2017-08-16 20:19 渡…… 阅读(302) 评论(0) 推荐(1)
2017ACM暑期多校联合训练 - Team 7 1002 HDU 6121 Build a tree (深搜+思维)
摘要:" 题目链接 " Problem Description HazelFan wants to build a rooted tree. The tree has n nodes labeled 0 to n−1, and the father of the node labeled i is the 阅读全文
posted @ 2017-08-16 16:50 渡…… 阅读(276) 评论(0) 推荐(0)
2017ACM暑期多校联合训练 - Team 7 1010 HDU 6129 Just do it (找规律)
摘要:" 题目链接 " Problem Description There is a nonnegative integer sequence a1...n of length n. HazelFan wants to do a type of transformation called prefix X 阅读全文
posted @ 2017-08-16 09:54 渡…… 阅读(592) 评论(0) 推荐(0)
2017ACM暑期多校联合训练 - Team 7 1008 HDU 6127 Hard challenge (极角排序)
摘要:" 题目链接 " Problem Description There are n points on the plane, and the ith points has a value vali, and its coordinate is (xi,yi). It is guaranteed tha 阅读全文
posted @ 2017-08-16 08:20 渡…… 阅读(146) 评论(0) 推荐(0)
2017ACM暑期多校联合训练 - Team 6 1001 HDU 6096 String (字符串处理 字典树)
摘要:" 题目链接 " Problem Description Bob has a dictionary with N words in it. Now there is a list of words in which the middle part of the word has continuous 阅读全文
posted @ 2017-08-14 20:54 渡…… 阅读(135) 评论(0) 推荐(0)
2017ACM暑期多校联合训练 - Team 6 1002 HDU 6097 Mindis (数学)
摘要:" 题目链接 " Problem Description The center coordinate of the circle C is O, the coordinate of O is (0,0) , and the radius is r. P and Q are two points no 阅读全文
posted @ 2017-08-11 21:17 渡…… 阅读(182) 评论(0) 推荐(0)
2017ACM暑期多校联合训练 - Team 6 1010 HDU 6105 Gameia (博弈)
摘要:" 题目链接 " Problem Description Alice and Bob are playing a game called 'Gameia ? Gameia !'. The game goes like this : 0. There is a tree with all node u 阅读全文
posted @ 2017-08-11 16:52 渡…… 阅读(586) 评论(1) 推荐(0)
2017ACM暑期多校联合训练 - Team 6 1008 HDU 6103 Kirinriki (模拟 尺取法)
摘要:" 题目链接 " Problem Description We define the distance of two strings A and B with same length n is disA,B=∑i=0n−1|Ai−Bn−1−i| The difference between the 阅读全文
posted @ 2017-08-11 09:57 渡…… 阅读(143) 评论(0) 推荐(0)
2017ACM暑期多校联合训练 - Team 6 1011 HDU 6106 Classes (容斥公式)
摘要:" 题目链接 " Problem Description The school set up three elective courses, assuming that these courses are A, B, C. N classes of students enrolled in thes 阅读全文
posted @ 2017-08-10 19:48 渡…… 阅读(253) 评论(1) 推荐(0)
2017ACM暑期多校联合训练 - Team 6 1003 HDU 6098 Inversion (模拟)
摘要:" 题目链接 " Problem Description Give an array A, the index starts from 1. Now we want to know Bi=maxi∤jAj , i≥2. Input The first line of the input gives 阅读全文
posted @ 2017-08-10 19:28 渡…… 阅读(347) 评论(0) 推荐(0)
AC自动机算法详解 (转载)
摘要:首先简要介绍一下AC自动机:Aho Corasick automation,该算法在1975年产生于贝尔实验室,是著名的多模匹配算法之一。一个常见的例子就是给出n个单词,再给出一段包含m个字符的文章,让你找出有多少个单词在文章里出现过。要搞懂AC自动机,先得有模式树(字典树)Trie和KMP模式匹配 阅读全文
posted @ 2017-08-10 09:54 渡…… 阅读(41070) 评论(9) 推荐(19)
2017ACM暑期多校联合训练 - Team 5 1001 HDU 6085 Rikka with Candies (模拟)
摘要:" 题目链接 " Problem Description As we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. 阅读全文
posted @ 2017-08-09 17:53 渡…… 阅读(303) 评论(0) 推荐(0)
2017ACM暑期多校联合训练 - Team 5 1006 HDU 5205 Rikka with Graph (找规律)
摘要:" 题目链接 " Problem Description As we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. 阅读全文
posted @ 2017-08-09 11:50 渡…… 阅读(207) 评论(0) 推荐(0)
2017 ACM暑期多校联合训练 - Team 5 1008 HDU 6092 Rikka with Subset (找规律)
摘要:" 题目链接 " Problem Description As we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. 阅读全文
posted @ 2017-08-09 09:57 渡…… 阅读(190) 评论(0) 推荐(0)
2008 Round 1A C Numbers (矩阵快速幂)
摘要:题目描述: 请输出(3+√5)^n整数部分最后3位。如果结果不超过2位,请补足前导0. 分析: 我们最容易想到的方法肯定是直接计算这个表达式的值,但是这样的精度是不够的。朴素的算法没有办法得到答案。但是我们根据分析可以发现这个问题不用求出√5的值也可以得到答案。 我们可以发现,将(3+√5)^n这个 阅读全文
posted @ 2017-08-07 10:18 渡…… 阅读(322) 评论(0) 推荐(0)
2017 ACM暑期多校联合训练 - Team 4 1007 HDU 6073 Matching In Multiplication (模拟)
摘要:" 题目链接 " Problem Description In the mathematical discipline of graph theory, a bipartite graph is a graph whose vertices can be divided into two disjo 阅读全文
posted @ 2017-08-06 11:21 渡…… 阅读(133) 评论(0) 推荐(0)
2017 ACM暑期多校联合训练 - Team 4 1012 HDU 6078 Wavel Sequence (模拟)
摘要:" 题目链接 " Problem Description Have you ever seen the wave? It's a wonderful view of nature. Little Q is attracted to such wonderful thing, he even like 阅读全文
posted @ 2017-08-05 08:52 渡…… 阅读(159) 评论(0) 推荐(0)
2017ACM暑期多校联合训练 - Team 4 1003 HDU 6069 Counting Divisors (区间素数筛选+因子数)
摘要:" 题目链接 " Problem Description In mathematics, the function d(n) denotes the number of divisors of positive integer n. For example, d(12)=6 because 1,2, 阅读全文
posted @ 2017-08-04 14:46 渡…… 阅读(145) 评论(0) 推荐(0)
2017ACM暑期多校联合训练 - Team 4 1004 HDU 6070 Dirt Ratio (线段树)
摘要:" 题目链接 " Problem Description In ACM/ICPC contest, the ''Dirt Ratio'' of a team is calculated in the following way. First let's ignore all the problems 阅读全文
posted @ 2017-08-04 11:40 渡…… 阅读(372) 评论(0) 推荐(0)
2017ACM暑期多校联合训练 - Team 3 1003 HDU 6058 Kanade's sum (模拟)
摘要:" 题目链接 " Problem Description Give 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+ 阅读全文
posted @ 2017-08-02 13:58 渡…… 阅读(211) 评论(0) 推荐(0)
2017 ACM暑期多校联合训练 - Team 3 1008 HDU 6063 RXD and math (莫比乌斯函数)
摘要:" 题目链接 " Problem Description RXD is a good mathematician. One day he wants to calculate: ∑i=1nkμ2(i)×⌊nki−−−√⌋ output the answer module 109+7. 1≤n,k≤1 阅读全文
posted @ 2017-08-02 10:42 渡…… 阅读(165) 评论(0) 推荐(0)
2017ACM暑期多校联合训练 - Team 3 1005 RXD and dividing
摘要:" 题目链接 " Problem Description RXD has a tree T, with the size of n. Each edge has a cost. Define f(S) as the the cost of the minimal Steiner Tree of th 阅读全文
posted @ 2017-08-02 10:12 渡…… 阅读(161) 评论(0) 推荐(0)