Deep in the forest, swift in the night.
They come out, with the frightening shouting under the moonlight.
You stare at the horrible figures. They are real, alive.
I promise you've never experienced a worse night.
They come nearer, nearer, till a meter left.
You see their real faces. Scary eyes and hair in a mess.
You think they coming for you, then you are wrong.
They only want your delicious cheese, which is produced in a scary farm.
That's what happens in the forest. Enjoy your time!
请注意,本题的时间限制为 5s!
探险家小 A 和小 B 需要用灯泡照亮这个森林。
有 个灯泡,编号为 。小 A 用 条红色绳子把它们连成了一棵树,小 B 用 条蓝色绳子把它们连成了另一棵树。
一开始所有灯泡都是熄灭的,现在要点亮若干个灯泡。小 A 喜欢联通块,而小 B 喜欢链。他们想知道:有多少种点亮灯泡的方案,满足点亮的灯泡在小 A 的树上形成一个联通块,在小 B 的树上形成一条链呢?