Sparse Graph HDU - 5876(求补图最短路BFS)

Sparse Graph HDU - 5876 In graph theory, the complement of a graph G is a graph H on the same vertices such that two distinct vertices of H are adja...

2018-08-31 19:11:46

阅读数:39

评论数:0

Function HDU - 5875(暴力+思维)

Function HDU - 5875 The shorter, the simpler. With this problem, you should be convinced of this truth. You are given an array A of N postive integ...

2018-08-31 18:43:33

阅读数:31

评论数:0

Friends and Enemies HDU - 5874(思维)

Friends and Enemies HDU - 5874 On an isolated island, lived some dwarves. A king (not a dwarf) ruled the island and the seas nearby, there are abun...

2018-08-31 18:30:37

阅读数:16

评论数:0

Football Games HDU - 5873(兰道定理)

Football Games HDU - 5873 A mysterious country will hold a football world championships—Abnormal Cup, attracting football teams and fans from all ar...

2018-08-31 18:15:20

阅读数:30

评论数:0

graph HDU - 5607(矩阵快速幂+K步可达路径)

graph HDU - 5607 In a directed graph which has N points and M edges,points are labled from 1 to n.At first I am at point u,at each step I will choos...

2018-08-31 10:12:08

阅读数:51

评论数:0

So Easy! HDU - 4565(构造共轭+矩阵快速幂)

So Easy! HDU - 4565 A sequence S n is defined as: Sn=⌈(a+b√)n⌉%mSn=⌈(a+b)n⌉%mS_n = \lceil(a+\sqrt{b})^n\rceil\%m Where a, b, n, m are positive int...

2018-08-31 08:54:36

阅读数:38

评论数:0

斐波那契数列通项公式推导及其类似构造共轭公式反求递推式

一、斐波那契数列通项公式推导 我们知道斐波那契数列递推公式fn=fn−1+fn−2(n≥2)fn=fn−1+fn−2(n≥2)f_n = f_{n-1} + f_{n-2} (n \ge 2) 即fn−fn−1−fn−2=0fn−fn−1−fn−2=0f_{n} - f_{n-1} - f_{...

2018-08-31 07:47:42

阅读数:64

评论数:0

Best Solver HDU - 5451(共轭构造+循环节+快速幂)

Best Solver HDU - 5451 The so-called best problem solver can easily solve this problem, with his/her childhood sweetheart. It is known that y=(5+26...

2018-08-30 16:44:28

阅读数:50

评论数:0

Jesus Is Here HDU - 5459(思维+数学递推)

Jesus Is Here HDU - 5459 I’ve sent Fang Fang around 201314 text messages in almost 5 years. Why can’t she make sense of what I mean? But Jesus is h...

2018-08-30 14:23:17

阅读数:63

评论数:0

The Best Path HDU - 5883(欧拉路径/回路+异或和最大)

The Best Path HDU - 5883 Alice is planning her travel route in a beautiful valley. In this valley, there are N lakes, and M rivers linking these lak...

2018-08-30 10:45:39

阅读数:36

评论数:0

Problem I. Count HDU - 6434(欧拉函数)

Problem I. Count HDU - 6434 Multiple query, for each n, you need to get n i-1 ∑ ∑ [gcd(i + j, i - j) = 1] i=1 j=1 Input On the first line, ...

2018-08-27 17:03:15

阅读数:48

评论数:0

Problem G. Cyclic HDU - 6432(容斥原理)

Problem G. Cyclic HDU - 6432 Count the number of cyclic permutations of length n with no continuous subsequence [i, i + 1 mod n]. Output the answer...

2018-08-27 16:41:03

阅读数:71

评论数:1

Tree and Permutation HDU - 6446(树形dp)

Tree and Permutation HDU - 6446 There are N vertices connected by N−1 edges, each edge has its own length. The set { 1,2,3,…,N } contains a total o...

2018-08-27 16:15:09

阅读数:61

评论数:0

Average distance HDU - 2376(树形dp求树上任意两点距离和的平均值)

Average distance HDU - 2376 Given a tree, calculate the average distance between two vertices in the tree. For example, the average distance between...

2018-08-27 15:01:02

阅读数:143

评论数:0

Buy and Resell HDU - 6438(贪心+优先队列)

Buy and Resell HDU - 6438 The Power Cube is used as a stash of Exotic Power. There are n cities numbered 1,2,…,n where allowed to trade it. The trad...

2018-08-27 13:45:59

阅读数:59

评论数:0

Buy Low Sell High CodeForces - 867E(贪心+优先队列)

Buy Low Sell High CodeForces - 867E You can perfectly predict the price of a certain stock for the next N days. You would like to profit on this kno...

2018-08-27 13:29:41

阅读数:50

评论数:0

Find Integer HDU - 6441(费马大定理+勾股数)

Find Integer HDU - 6441 people in USSS love math very much, and there is a famous math problem . give you two integers n,a,you are required to find...

2018-08-27 11:07:44

阅读数:52

评论数:0

Gcd(莫比乌斯反演)

Gcd 给定整数N,求1<=x,y<=N且Gcd(x,y)为素数的 数对(x,y)有多少对. Input 一个整数N Output 如题 Sample Input 4 Sample Output 4 Hint ...

2018-08-23 08:23:05

阅读数:67

评论数:0

Mophues(莫比乌斯反演+分段)

Mophues As we know, any positive integer C ( C >= 2 ) can be written as the multiply of some prime numbers: C = p1×p2× p3× ... × pk ...

2018-08-22 20:02:36

阅读数:56

评论数:0

Primes in GCD Table SPOJ - PGCD(莫比乌斯反演+分段)

Primes in GCD Table SPOJ - PGCD Johnny has created a table which encodes the results of some operation -- a function of two arguments. But instead o...

2018-08-21 20:29:47

阅读数:67

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭