Difference between revisions of "2018 Multi-University, HDU Day 7"

From EOJ Wiki
Jump to navigation Jump to search
Line 36: Line 36:
  
 
Solved by kblack. 00:43 (+1)
 
Solved by kblack. 00:43 (+1)
 +
 +
题意:$\left\{\begin{eqnarray*} F_1 &=& A \\ F_2 &=& B \\ F_n &=& C\cdot{}F_{n-2}+D\cdot{}F_{n-1}+\left\lfloor\frac{P}{n}\right\rfloor \end{eqnarray*}\right.$ 给定  A, B, C, D, P, n 求 $F_n$。
 +
 +
题解:$\lfloor{\frac{P}{n}}\rfloor$ 只有 $\sqrt{P}$ 种,分段快速幂就好了,注意分段的间隔。
  
 
== Problem K ==
 
== Problem K ==
  
 
Solved by zerol. 02:04 (+)
 
Solved by zerol. 02:04 (+)

Revision as of 10:20, 13 August 2018

Problem A

Solved by kblack. 01:47 (+2)

题意:给一个边上带颜色的无向图,走的边颜色变化一次花 1,求最短路。

题解:边上加个点,到两个端点距离为 1,一个点出去的同色边缩一下,因为距离都是 1,跑 bfs 就好了,卡常。。。

Problem B

Solved by ultmaster. 04:56 (+4)

Problem C

Problem D

Upsolved by kblack. (-2)

Problem E

Solved by ultmaster. 00:57 (+1)

Problem F

Problem G

Problem H

Solved by ultmaster. 01:41 (+)

Problem I

Solved by zerol. 01:26 (+1)

Problem J

Solved by kblack. 00:43 (+1)

题意:$\left\{\begin{eqnarray*} F_1 &=& A \\ F_2 &=& B \\ F_n &=& C\cdot{}F_{n-2}+D\cdot{}F_{n-1}+\left\lfloor\frac{P}{n}\right\rfloor \end{eqnarray*}\right.$ 给定 A, B, C, D, P, n 求 $F_n$。

题解:$\lfloor{\frac{P}{n}}\rfloor$ 只有 $\sqrt{P}$ 种,分段快速幂就好了,注意分段的间隔。

Problem K

Solved by zerol. 02:04 (+)